-
Notifications
You must be signed in to change notification settings - Fork 47
S3 presigned URL utilities #4945
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: nishad/job-runner-spec
Are you sure you want to change the base?
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ab29f5c5dd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| def test_generate_presigned_put_url(): | ||
| url = generate_presigned_put_url( | ||
| bucket="test-bucket", | ||
| key="jobs/123/results.json", | ||
| expiration_seconds=3600, | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid requiring real AWS creds in presign tests
These tests call generate_presigned_*_url without stubbing credentials. boto3 signs the request and raises NoCredentialsError when no AWS credentials are configured, which is the typical case in CI and local dev; the same issue applies to both tests. Consider injecting dummy credentials (e.g., via env), stubbing the client, or monkeypatching boto3.client so the tests don’t fail outside AWS-enabled environments.
Useful? React with 👍 / 👎.
ab29f5c to
ca526a7
Compare
50631d9 to
138b684
Compare
be9f9ad to
4c5f5f2
Compare
ca526a7 to
92a4fd1
Compare
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
92a4fd1 to
e19544d
Compare
4c5f5f2 to
a7c4b35
Compare

Helper functions for generating presigned S3 URLs.