Skip to content

fix: preserve URL query parameters in storage flash for signed URLs#435

Open
ambient-code[bot] wants to merge 2 commits intomainfrom
fix/271-complex-url-handling
Open

fix: preserve URL query parameters in storage flash for signed URLs#435
ambient-code[bot] wants to merge 2 commits intomainfrom
fix/271-complex-url-handling

Conversation

@ambient-code
Copy link
Copy Markdown
Contributor

@ambient-code ambient-code bot commented Apr 8, 2026

Summary

  • Fix operator_for_path() to preserve URL query parameters (e.g. ?Expires=...&Signature=...&Key-Pair-Id=...) when creating OpenDAL HTTP operators, so signed URLs are fetched correctly
  • Fix bearer token path in flash() to similarly preserve query params
  • Update _filename(), _get_decompression_command(), and _transfer_bg_thread() to properly strip query parameters when extracting filenames for storage and compression detection

Fixes #271

Test plan

  • Added unit tests for operator_for_path with query params
  • Added unit tests for _filename with query params
  • Added unit tests for _get_decompression_command with query params
  • Added integration test for signed URL flash flow
  • All existing tests pass (44 flashers tests, 31 opendal tests)

🤖 Generated with Claude Code

URLs with query parameters (e.g. CloudFront signed URLs with
?Expires=...&Signature=...&Key-Pair-Id=...) were being silently
stripped during URL parsing, causing the download to receive an
error/empty response instead of the actual image.

Fixes #271

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 8, 2026

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8f2ef871-c132-4adb-b41d-61c8e1741151

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/271-complex-url-handling

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.

@mangelajo mangelajo requested a review from bennyz April 8, 2026 15:43
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 8, 2026

Deploy Preview for jumpstarter-docs ready!

Name Link
🔨 Latest commit 0e5b701
🔍 Latest deploy log https://app.netlify.com/projects/jumpstarter-docs/deploys/69d6848081369f00081ceb9f
😎 Deploy Preview https://deploy-preview-435--jumpstarter-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@mangelajo
Copy link
Copy Markdown
Member

@ambient-code CI is failing here, can you check?

@mangelajo
Copy link
Copy Markdown
Member

@ambient-code handle comments

On macOS, /tmp is a symlink to /private/tmp, so Path.resolve() returns
/private/tmp/... instead of /tmp/.... Compare against the resolved path
to make the test pass on both Linux and macOS.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ambient-code
Copy link
Copy Markdown
Contributor Author

ambient-code bot commented Apr 8, 2026

CI Fix Pushed

Root cause: The test_operator_for_path_preserves_query_params test in driver_test.py was failing on macOS because /tmp is a symlink to /private/tmp. The test asserted str(path) == "/tmp/image.raw.xz" but Path.resolve() (called inside operator_for_path) returns /private/tmp/image.raw.xz on macOS.

Fix (0e5b701): Changed the filesystem path assertion to compare against Path("/tmp/image.raw.xz").resolve() instead of the hardcoded string, so the test passes on both Linux and macOS.

Other failing jobs:

  • pytest job: Not related to this PR — it's a gate job that unconditionally runs exit 1
  • Other matrix jobs (ubuntu 3.11, ubuntu 3.12, macos 3.11, macos 3.12): Were cancelled after the macOS 3.13 failure, not independent failures
  • ubuntu 3.13: Passed successfully

No unaddressed review comments — only bot comments from CodeRabbit and Netlify were present.

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.

'j storage flash' does not work well with complex url(with parameters like Expires,Signature,Key-Pair-Id)

1 participant