Skip to content

Cleanup packaging scripts#2782

Open
aramprice wants to merge 5 commits into
mainfrom
cleanup-packaging-scripts
Open

Cleanup packaging scripts#2782
aramprice wants to merge 5 commits into
mainfrom
cleanup-packaging-scripts

Conversation

@aramprice

Copy link
Copy Markdown
Member

No description provided.

This file is created by the `bosh_bundle_local` function used to
install gems during packaging, but because the function is not executed
while in `$BOSH_INSTALL_TARGET` the `.bundle/` directory is not present
in the package.
This appears to be a vestage from when Ruby shipped with a default json
gem that was > 2.0. This is no longer the case.
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The director, health monitor, and NATS packaging scripts now discover gemspecs with glob-based loops, build gems from their package directories, and move generated gems into vendor/cache. Install-target paths use quoted variable expansion. Generated Gemfiles remove explicit json constraints where applicable, and staged Bundler inputs now include .bundle alongside Gemfile and Gemfile.lock. The NATS package also installs its server binary under the install target.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning No pull request description was provided, so the required template sections and context are missing. Add the required sections: change summary, context, tests run, release note text, breaking-change impact, tags, and AI review feedback.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change: cleanup of packaging scripts across multiple packages.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cleanup-packaging-scripts

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.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 15, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/director/packaging (1)

10-16: 🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win

Pass the gemspec file to gem build in all three packaging scripts.

RubyGems expects a gemspec argument, so these loops will exit on the first iteration with set -e.

  • packages/director/packaging#L10-L16: gem build "$(basename "$gemspec")"
  • packages/health_monitor/packaging#L7-L13: gem build "$(basename "$gemspec")"
  • packages/nats/packaging#L11-L17: gem build "$(basename "$gemspec")"
🤖 Prompt for 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.

In `@packages/director/packaging` around lines 10 - 16, Update the gem build loops
in packages/director/packaging lines 10-16, packages/health_monitor/packaging
lines 7-13, and packages/nats/packaging lines 11-17 to pass the current gemspec
filename to gem build using the existing gemspec variable and basename handling.
🤖 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.

Outside diff comments:
In `@packages/director/packaging`:
- Around line 10-16: Update the gem build loops in packages/director/packaging
lines 10-16, packages/health_monitor/packaging lines 7-13, and
packages/nats/packaging lines 11-17 to pass the current gemspec filename to gem
build using the existing gemspec variable and basename handling.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 3590585f-42e8-4bca-aeff-8b42a02de434

📥 Commits

Reviewing files that changed from the base of the PR and between 6da5d39 and c2e482c.

📒 Files selected for processing (3)
  • packages/director/packaging
  • packages/health_monitor/packaging
  • packages/nats/packaging

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR cleans up BOSH release package packaging scripts for nats, health_monitor, and director, aiming to simplify directory creation, gem building, and what gets copied into ${BOSH_INSTALL_TARGET}.

Changes:

  • Consolidate install-target directory creation and improve quoting.
  • Refactor gem build loop to iterate over gemspecs and populate vendor/cache.
  • Copy Gemfile, Gemfile.lock, and .bundle into ${BOSH_INSTALL_TARGET} in one command.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
packages/nats/packaging Refactors gem build + caching flow; adjusts install target setup and file copying.
packages/health_monitor/packaging Refactors gem build + caching flow; adjusts install target setup and file copying.
packages/director/packaging Refactors gem build + caching flow; adjusts install target setup and file copying.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +7 to +14
for gemspec in ./*/*.gemspec; do
gem_dir="$(dirname "${gemspec}")"

pushd "${gem_dir}"
gem build
popd
done
mv ./*/*.gem vendor/cache/
Comment thread packages/nats/packaging
Comment on lines +14 to +18
pushd "${gem_dir}"
gem build
popd
done
mv ./*/*.gem vendor/cache/
Comment on lines +13 to +17
pushd "${gem_dir}"
gem build
popd
done
mv ./*/*.gem vendor/cache/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Pending Merge | Prioritized

Development

Successfully merging this pull request may close these issues.

2 participants