ci(agent-helper): version image independently of app release#772
Conversation
Decouple the agent-helper image version from the main devsy release: track it in images/agent-helper/VERSION and republish only when image sources or that file change (or via manual dispatch). Move version resolution into the agent_helper_image tool as a version subcommand, and skip the push when the resolved tag already exists.
✅ Deploy Preview for devsydev canceled.
|
|
Warning Review limit reached
Next review available in: 45 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe agent-helper image workflow now runs on main pushes and manual dispatches, uses Go subcommands for building, version resolution, and registry checks, and conditionally pushes new image tags. The default image version is set to ChangesAgent-helper image publishing
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant GitHubActions
participant AgentHelper
participant GHCR
participant DockerBuildPush
GitHubActions->>AgentHelper: Resolve image version
AgentHelper-->>GitHubActions: Return version output
GitHubActions->>AgentHelper: Check target image tag
AgentHelper->>GHCR: Inspect image manifest
GHCR-->>AgentHelper: Return tag existence
GitHubActions->>DockerBuildPush: Build image
DockerBuildPush->>GHCR: Push when tag is absent and event is not a PR
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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 |
✅ Deploy Preview for images-devsy-sh canceled.
|
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 @.github/workflows/publish-agent-helper.yml:
- Around line 43-51: Replace direct GitHub Actions expression interpolation in
the `version` step and the publish step with `env:` bindings, then reference
those values as shell variables in each `run` command. Update the commands
around `steps.version.outputs.value`, `inputs.tag`, and the publish references
to `env.IMAGE` so untrusted input is not inserted into shell source while
preserving the existing version and image behavior.
In `@hack/agent_helper_image/main.go`:
- Around line 124-141: Update runExists to capture docker manifest inspect
stderr and exit status instead of treating every failure as absence. Set
exists=false only when the captured error output indicates a not-found or
manifest-unknown response; return a descriptive error for authentication,
network, rate-limit, permission, and other failures, while preserving the
existing notice and writeOutput behavior for successful checks.
🪄 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: CHILL
Plan: Pro Plus
Run ID: 8356ca61-fc41-426b-991b-0700744c341f
📒 Files selected for processing (3)
.github/workflows/publish-agent-helper.ymlhack/agent_helper_image/main.goimages/agent-helper/VERSION
Bind untrusted workflow_dispatch input and step outputs to env vars in the run steps to avoid shell injection. In the exists check, distinguish an absent tag/package from unexpected (network/transient) failures instead of treating every docker error as absence.
Summary
Decouples the
agent-helperimage version from the main devsy application release cadence so it does not change on every release.images/agent-helper/VERSION(seeded at0.1.0).pushtomainscoped to image paths (andworkflow_dispatch) instead ofrelease: published, so the image republishes only when its sources orVERSIONchange.versionsubcommand on theagent_helper_imageGo tool (honors a-tagoverride, else readsVERSION, emitsvalue=<version>to$GITHUB_OUTPUT).Summary by CodeRabbit
New Features
Bug Fixes