Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: AltimateAI/datapilot-cli
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: AltimateAI/datapilot-cli
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: feat/datapilot-debug-logging
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 11 files changed
  • 2 contributors

Commits on Jul 28, 2026

  1. feat: add --debug flag and DATAPILOT_DEBUG env var for verbose lo…

    …gging
    
    API failures were reported as a one-line summary such as `Error in uploading
    the manifest.` with no way to see why. `APIClient` already recorded the HTTP
    status and error body via `logger.debug`, but `dbt/cli/cli.py` pinned the root
    logger at `INFO` at import time, so every `DEBUG` record was discarded and
    there was no flag or env var to change it.
    
    Verbose output is now opt-in two ways, both resolving to the same click
    parameter: the `--debug` flag, and the `DATAPILOT_DEBUG` environment variable
    for CI/CD pipelines where the command line is generated and hard to edit.
    
    * Add `datapilot/utils/logging_utils.py` with `configure_logging()`,
      `is_debug_enabled()` and `redact_url()`.
    * Add a `debug_option` decorator and wire it into `dbt project-health` and
      `dbt onboard`.
    * Replace the import-time `logging.basicConfig(level=logging.INFO)` in
      `dbt/cli/cli.py` and `mcp.py` with `configure_logging()`, so
      `DATAPILOT_DEBUG` is honoured even on paths that never reach a command
      callback.
    * Debug is sticky, so an import-time call at `INFO` cannot undo `--debug`.
    * `configure_logging()` only installs a handler when the root logger has none,
      leaving handlers owned by embedding applications intact.
    
    Redact credentials, since debug output is meant to be shared with support:
    
    * Presigned upload URLs carry an AWS key and signature in the query string.
      `redact_url()` strips it in both the `put()` request log and the
      `Received signed URL` log, keeping the object path.
    * Hold `urllib3` at `INFO` in debug mode; it logs each request line verbatim,
      presigned query string included.
    * Log the `GET` request params instead, which identify the integration id,
      environment and file type without exposing secrets.
    
    Verified against `api.myaltimate.com`: the API token never appears in debug
    output, and a successful upload logs no `AWSAccessKeyId` or `Signature`.
    
    Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
    suryaiyer95 and claude committed Jul 28, 2026
    Configuration menu
    Copy the full SHA
    96eb7e3 View commit details
    Browse the repository at this point in the history
Loading