Use ruby 4.0 package#2769
Conversation
WalkthroughThe change migrates Director, Health Monitor, and NATS packaging and jobs from Ruby 3.4 to Ruby 4.0. Gem specifications now require Ruby 3.4.0 or newer. Blobstore client unit tests update identifier fixtures and related command expectations, method calls, and error messages. The CI vendored-package check also tracks the Ruby 4.0 package. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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
Updates the BOSH release packaging and related Ruby components to use the director-ruby-4.0 package, aligning compilation/runtime environments and adjusting Ruby compatibility metadata and specs.
Changes:
- Switch package/job dependencies and packaging scripts from
director-ruby-3.4todirector-ruby-4.0. - Update gemspec minimum Ruby requirement to
>= 3.4.0. - Rename RSpec
let(:object_id)tolet(:entity_id)in blobstore client unit specs to avoidObject#object_idname collision.
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/bosh-nats-sync/bosh-nats-sync.gemspec | Bump required Ruby version to >= 3.4.0. |
| src/bosh-monitor/bosh-monitor.gemspec | Bump required Ruby version to >= 3.4.0. |
| src/bosh-director/bosh-director.gemspec | Bump required Ruby version to >= 3.4.0. |
| src/bosh-common/bosh-common.gemspec | Bump required Ruby version to >= 3.4.0. |
| src/bosh-director/spec/unit/bosh/director/blobstore/s3cli_blobstore_client_spec.rb | Rename object_id test helper to entity_id. |
| src/bosh-director/spec/unit/bosh/director/blobstore/gcscli_blobstore_client_spec.rb | Rename object_id test helper to entity_id. |
| src/bosh-director/spec/unit/bosh/director/blobstore/davcli_blobstore_client_spec.rb | Rename object_id test helper to entity_id. |
| src/bosh-director/spec/unit/bosh/director/blobstore/azurestoragecli_blobstore_client_spec.rb | Rename object_id test helper to entity_id. |
| packages/nats/spec | Depend on director-ruby-4.0. |
| packages/nats/packaging | Source Ruby 4.0 compile env for gem build/bundling. |
| packages/health_monitor/spec | Depend on director-ruby-4.0. |
| packages/health_monitor/packaging | Source Ruby 4.0 compile env for gem build/bundling. |
| packages/director/spec | Depend on director-ruby-4.0. |
| packages/director/packaging | Source Ruby 4.0 compile env for gem build/bundling. |
| jobs/nats/templates/bosh_nats_sync | Source Ruby 4.0 runtime env for execution. |
| jobs/nats/spec | Include director-ruby-4.0 as a job package dependency. |
| jobs/health_monitor/templates/health_monitor | Source Ruby 4.0 runtime env for execution. |
| jobs/health_monitor/spec | Include director-ruby-4.0 as a job package dependency. |
| jobs/director/templates/env.erb | Source Ruby 4.0 runtime env and update GEM_HOME path to ruby/4.0.0. |
| jobs/director/spec | Include director-ruby-4.0 as a job package dependency. |
| ci/pipeline.yml | Update the CVE/package check list to director-ruby-4.0. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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 `@packages/nats/packaging`:
- Line 12: Update the BPM gem-home paths in jobs/nats/templates/bpm.yml and
jobs/health_monitor/templates/bpm.yml: at packages/nats/packaging lines 12-12,
use /var/vcap/packages/nats/gem_home/ruby/4.0.0; at jobs/health_monitor/spec
lines 16-16, use /var/vcap/packages/health_monitor/gem_home/ruby/4.0.0.
In
`@src/bosh-director/spec/unit/bosh/director/blobstore/azurestoragecli_blobstore_client_spec.rb`:
- Around line 114-116: Update the error examples under each describe '`#exists`?'
block to invoke exists?(entity_id) instead of create. Apply this change in
src/bosh-director/spec/unit/bosh/director/blobstore/azurestoragecli_blobstore_client_spec.rb
lines 114-116, davcli_blobstore_client_spec.rb lines 179-184,
gcscli_blobstore_client_spec.rb lines 113-117, and
s3cli_blobstore_client_spec.rb lines 196-198; no other behavior needs changing.
🪄 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: 680b9fdd-876c-412f-9332-22d9b47f530a
📒 Files selected for processing (23)
ci/pipeline.ymljobs/director/specjobs/director/templates/env.erbjobs/health_monitor/specjobs/health_monitor/templates/health_monitorjobs/nats/specjobs/nats/templates/bosh_nats_syncpackages/director/packagingpackages/director/specpackages/director/spec.ymlpackages/health_monitor/packagingpackages/health_monitor/specpackages/health_monitor/spec.ymlpackages/nats/packagingpackages/nats/specsrc/bosh-common/bosh-common.gemspecsrc/bosh-director/bosh-director.gemspecsrc/bosh-director/spec/unit/bosh/director/blobstore/azurestoragecli_blobstore_client_spec.rbsrc/bosh-director/spec/unit/bosh/director/blobstore/davcli_blobstore_client_spec.rbsrc/bosh-director/spec/unit/bosh/director/blobstore/gcscli_blobstore_client_spec.rbsrc/bosh-director/spec/unit/bosh/director/blobstore/s3cli_blobstore_client_spec.rbsrc/bosh-monitor/bosh-monitor.gemspecsrc/bosh-nats-sync/bosh-nats-sync.gemspec
💤 Files with no reviewable changes (2)
- packages/director/spec.yml
- packages/health_monitor/spec.yml
Replaces the use of Ruby 3.4, the ruby-3.4 package will be removed in a later commit.
cc7efb9 to
f1843ad
Compare
Using `object_id` in `let()` causes warnings
ragaskar
left a comment
There was a problem hiding this comment.
looks good to me, if the 3.0.0 -> 3.4.0 min required ruby is as intended
integration specs