Add S3 checksum properties to director blobstore configuration#2726
Add S3 checksum properties to director blobstore configuration#2726
Conversation
WalkthroughThree new S3 blobstore checksum configuration properties were added: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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. Comment |
There was a problem hiding this comment.
Pull request overview
This PR extends the director’s S3 blobstore configuration so checksum-calculation settings from the manifest are carried through to the rendered director.yml and into the s3cli config consumed by the director blobstore client.
Changes:
- Added three optional S3 checksum properties to the director job spec.
- Wired those properties into
jobs/director/templates/director.yml.erbfor S3 blobstores. - Added unit coverage for both template rendering and
S3cliBlobstoreClientconfig serialization.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/bosh-director/spec/unit/bosh/director/blobstore/s3cli_blobstore_client_spec.rb |
Adds coverage that checksum flags are written into the generated s3cli config. |
src/bosh-director/lib/bosh/director/blobstore/s3cli_blobstore_client.rb |
Passes the new checksum options through to the s3cli JSON config. |
spec/director.yml.erb_spec.rb |
Verifies the rendered director config includes the new S3 checksum properties. |
jobs/director/templates/director.yml.erb |
Maps new manifest properties into S3 blobstore options in rendered director config. |
jobs/director/spec |
Declares the new optional manifest properties for the director job. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Currently the s3 blobstore cli has compatbaility issues with dell ecs in certain configurations. There are flags to disable it but there need to be wired into the director manfiest as it maintains an allow list of properties which rejects unknown properties. Co-authored-by: Cursor <cursoragent@cursor.com>
ragaskar
left a comment
There was a problem hiding this comment.
I think ideally we rewrite the commit to be a little more descriptive about the problem we are solving with this change, but otherwise lgtm
01651e2 to
9689a2b
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@spec/director.yml.erb_spec.rb`:
- Around line 144-158: Add a complementary spec context that sets
merged_manifest_properties['blobstore']['request_checksum_calculation_enabled'],
['response_checksum_calculation_enabled'], and
['uploader_request_checksum_calculation_enabled'] to true and asserts
parsed_yaml['blobstore']['options'][...] equals true for each key; this
complements the existing false-case and ensures the ERB template handles true
values (look for the existing context block using merged_manifest_properties and
the expectations on parsed_yaml['blobstore']['options'] to copy structure).
In
`@src/bosh-director/spec/unit/bosh/director/blobstore/s3cli_blobstore_client_spec.rb`:
- Around line 136-151: Add a complementary spec that sets
request_checksum_calculation_enabled, response_checksum_calculation_enabled and
uploader_request_checksum_calculation_enabled to true and asserts those keys are
true in the parsed stored_config_file; specifically, duplicate the existing
context block but call described_class.new(options.merge({
request_checksum_calculation_enabled: true,
response_checksum_calculation_enabled: true,
uploader_request_checksum_calculation_enabled: true })) then parse JSON from
stored_config_file[0] and expect config['request_checksum_calculation_enabled'],
config['response_checksum_calculation_enabled'] and
config['uploader_request_checksum_calculation_enabled'] to eq(true).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 6a5f1881-bef0-441f-baf8-c18d46421b53
📒 Files selected for processing (5)
jobs/director/specjobs/director/templates/director.yml.erbspec/director.yml.erb_spec.rbsrc/bosh-director/lib/bosh/director/blobstore/s3cli_blobstore_client.rbsrc/bosh-director/spec/unit/bosh/director/blobstore/s3cli_blobstore_client_spec.rb
We don't think there's value in these suggestions (basically adding a non-interesting case for complete-ness sake).
Summary
request_checksum_calculation_enabled,response_checksum_calculation_enabled, anduploader_request_checksum_calculation_enabledto the director manifest spec for S3 blobstores.director.yml.erbtemplate.s3cliconfig file via theS3cliBlobstoreClient.Test plan
s3cli_blobstore_client_spec.rbanddirector.yml.erb_spec.rb.Made with Cursor