Skip to content

Conversation

@Dev10-sys
Copy link

@Dev10-sys Dev10-sys commented Jan 22, 2026

What this PR does

  • Fixes duplicate GET request caused by repeated Accept-Encoding header during Vault-authenticated downloads
  • Cleans up CLI option descriptions for deploy command
  • Aligns README with current CLI options (including --validate-checksum)

Why

  • Duplicate headers caused redundant requests in some authenticated download scenarios
  • CLI help text and README were out of sync

Scope

  • No functional behavior change for existing users
  • Improves correctness and documentation clarity

Summary by CodeRabbit

  • New Features

    • Added --validate-checksum flag to validate downloaded file checksums and fail on mismatch.
  • Documentation

    • Expanded download command help to document additional options: --localdir, --databus, --vault-token, --databus-key, and --all-versions.
    • Clarified deploy option descriptions for --title, --abstract, and --description to indicate they apply to both artifact and version.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 22, 2026

📝 Walkthrough

Walkthrough

Removed the explicit Accept-Encoding: identity header from the Vault-authenticated download path, added a --validate-checksum CLI flag for download checksum validation, and updated help text for --title, --abstract, and --description to indicate they apply to both artifact and version.

Changes

Cohort / File(s) Summary
Download header change
databusclient/api/download.py
Removed the explicit Accept-Encoding: identity header on the Vault-authenticated download GET request.
CLI: new flag & help text
README.md, databusclient/cli.py
Added --validate-checksum download option; expanded/reorganized download help text and updated --title, --abstract, and --description help to state "Artifact & version" semantics.

Sequence Diagram(s)

sequenceDiagram
    participant CLI as CLI (user)
    participant Client as DatabusClient
    participant Vault as Vault
    participant Server as Storage Server
    participant FS as Local FS

    CLI->>Client: download --validate-checksum <object>
    Client->>Vault: request auth token
    Vault-->>Client: auth token
    Client->>Server: GET /object (no forced Accept-Encoding)
    Server-->>Client: response (maybe gzipped) + checksum metadata
    Client->>FS: stream write file
    Client->>Client: compute checksum
    alt checksum matches
        Client->>CLI: success
    else checksum mismatch
        Client->>CLI: error / fail
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • Integer-Ctrl
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive The PR description includes a clear 'What this PR does' section explaining the changes, 'Why' section with rationale, and 'Scope' addressing impact. However, the description does not follow the provided template structure with required sections like 'Type of change' and 'Checklist'. Align the description with the repository template by including the 'Type of change' checkboxes and completion checklist sections, even if marking items as not applicable.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: removing a duplicate Accept-Encoding header in Vault-authenticated downloads, which aligns with the primary code change in databusclient/api/download.py.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@README.md`:
- Around line 200-201: The README flag description for --validate-checksum says
it will "fail on mismatch" but the CLI help text in cli.py (the add_argument
call for "--validate-checksum") only says "Validate checksums of downloaded
files"; update the help string in the add_argument/argparse setup (the
"--validate-checksum" argument) to match README by appending the failure
behavior (e.g., "Validate checksums of downloaded files and fail on mismatch")
so both docs are consistent.
- Around line 297-299: The README option list is out of sync with the CLI: the
options --title, --abstract, and --description are declared with required=True
in cli.py, so update the README entries for these three flags to include the
“[required]” marker to match the actual CLI help output (alternatively, if you
intend them to be optional, remove required=True from the corresponding option
definitions in cli.py for --title, --abstract, and --description so the docs
remain correct).

@Dev10-sys
Copy link
Author

Thanks for the review.

Updated the README to align with the actual CLI output, including marking --title, --abstract, and --description as required.

Also aligned the --validate-checksum description between README and CLI help text to clearly indicate failure on checksum mismatch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant