You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(deploy): report the release version from the control plane image - #307
The control plane image now carries SHIPKEEP_VERSION in its runtime stage, so a release reports its own version at /api/v1/health and in the OpenAPI document.
Why
release.yml passes the version as a build argument, but only the build stage declared it, to stamp the agent binaries. The API reads SHIPKEEP_VERSION from its environment when it runs. The published v0.1.0-alpha.1 therefore answers {"status":"ok","version":"dev"}.
The fix reaches users with the next prerelease; v0.1.0-alpha.1 keeps answering dev.
How it was tested
On the local Docker rig, which was running the published v0.1.0-alpha.1 with a server enrolled and an application deployed:
before: GET /api/v1/health on the published image answers "version":"dev";
an image built from this branch with --build-arg SHIPKEEP_VERSION=0.1.0-alpha.2-test, put in .env in place of the published one, then docker compose up -d: the one-shot steps ran again, the control plane came back healthy and answers "version":"0.1.0-alpha.2-test"; the OpenAPI document reports the same version;
the existing account still signs in and the enrolled server is still ready.
Not built: the image without the build argument. The default stays dev, as declared in the Dockerfile.
Security considerations
The version of a release is public. No secret, route or permission changes.
Summary by CodeRabbit
New Features
The health endpoint now reports the control plane’s version. Builds can specify a version, and builds without one report dev by default. This makes the running version visible in health information.
The version was passed to the build stage only, to stamp the agent
binaries. The API reads SHIPKEEP_VERSION when it runs, so the published
0.1.0-alpha.1 answers "dev" at /api/v1/health and in its OpenAPI
document. The runtime stage now carries it.
Signed-off-by: samuel mbabhazi <[email protected]>
This change lets released control plane images report their version at the health endpoint instead of always reporting dev. No actionable merge risk remains.
Security architecture risk: Minimal · up to bc27a
The change corrects release-version reporting without introducing a new endpoint, permission, secret, or persistent-state transition. No material security risk was identified in the changed flow.
Retained concerns
No architecture-level concerns identified.
Security review details
Security Blast Radius
inferred — The changed exposure is the release-version string reported by control-plane instances using the rebuilt image. The inspected consumers use it as response or document metadata, not as an authorization decision or privileged command.
Trust Boundaries and Controls
observed — The version originates in existing build configuration and is read from the process environment, not from the health request. The runtime remains configured as USER node, and the PR leaves release publishing permissions and credential handling unchanged.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title names the main change: the control plane image now carries the release version so /api/v1/health and the OpenAPI document report it. The raw summary confirms the Dockerfile now declares SH…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: the control plane image now carries the release version so /api/v1/health and the OpenAPI document report it. The raw summary confirms the Dockerfile now declares SHIPKEEP_VERSION (default dev) in the runtime stage, matching the title's intent. The title uses the conventional commit form and is specific, so it passes.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Reviewing files that changed from the base of the PR and between 92a8321 and bc27a4a.
Files selected for processing: 1
deploy/control-plane.Dockerfile
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The control plane image now carries
SHIPKEEP_VERSIONin its runtime stage, so a release reports its own version at/api/v1/healthand in the OpenAPI document.Why
release.ymlpasses the version as a build argument, but only the build stage declared it, to stamp the agent binaries. The API readsSHIPKEEP_VERSIONfrom its environment when it runs. The publishedv0.1.0-alpha.1therefore answers{"status":"ok","version":"dev"}.The fix reaches users with the next prerelease;
v0.1.0-alpha.1keeps answeringdev.How it was tested
On the local Docker rig, which was running the published
v0.1.0-alpha.1with a server enrolled and an application deployed:GET /api/v1/healthon the published image answers"version":"dev";--build-arg SHIPKEEP_VERSION=0.1.0-alpha.2-test, put in.envin place of the published one, thendocker compose up -d: the one-shot steps ran again, the control plane came back healthy and answers"version":"0.1.0-alpha.2-test"; the OpenAPI document reports the same version;ready.Not built: the image without the build argument. The default stays
dev, as declared in the Dockerfile.Security considerations
The version of a release is public. No secret, route or permission changes.
Summary by CodeRabbit
devby default. This makes the running version visible in health information.