feat(cli): stamp global.agent.version from the image tag on helm deploys - #504
Open
max-parke-scale wants to merge 4 commits into
Open
max-parke-scale wants to merge 4 commits into
max-parke-scale wants to merge 4 commits into
Conversation
With agentex-agent chart >=0.6.0 (sgp#5466) the value lands as the pod's AGENT_VERSION, which the SGP tracing processor stamps onto every span as __agent_version__. Old charts ignore the key, so ordering is free. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
stainless-app
Bot
force-pushed
the
next
branch
from
September 15, 2026 00:35
55a0178 to
a71fa67
Compare
Takes next's .stats.yml (Stainless codegen metadata from release #506); no source conflicts. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
global.agent.version was set from the pre-merge tag, so a helm_overrides entry that replaced global.image.tag alone shipped the override image stamped with the earlier tag. It is now derived from the merged tag, via setdefault so an explicit global.agent.version override still wins. Chart >=0.6.0 renders global.agent.version as its own AGENT_VERSION env entry, so a deployment that already declares AGENT_VERSION (manifest agent.env, environments.yaml env, or a credential mapping) received two entries, the operator's winning only by template order. The generated value is skipped in that case: an explicit AGENT_VERSION is a deliberate pin, and skipping rather than rejecting keeps existing manifests that pin it deploying unchanged. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
CLI (classic helm) deploys now set
global.agent.versionto the resolved image tag in the rendered helm values. With agentex-agent chart ≥ 0.6.0 (scaleapi/sgp#5466) that lands as the pod'sAGENT_VERSIONenv var, which the SGP tracing processor (agentex-sdk ≥ 0.25.0, #469) stamps onto every span as__agent_version__— build provenance on traces, keyed by the same image identity the lineage build/deploy graph uses.Ordering is free in both directions: old charts ignore the key; the new chart omits the env var when the key is absent. Siblings: chart = scaleapi/sgp#5466; agentex cloud deploy = scaleapi/scaleapi#158940. Set the version via the image tag here or an explicit
AGENT_VERSIONin manifestenv, not both — repeating a chart-generated name renders duplicate env entries.🧑💻🤖 — posted via Claude Code
The PR appears safe to merge.
Summary
Classic Helm deploys now copy the resolved image tag into
global.agent.version, so supported charts can expose the same build identity to tracing. ExplicitAGENT_VERSIONsettings still take priority to avoid duplicate environment entries.Diagram
sequenceDiagram participant User participant CLI participant Values as Helm values participant Helm User->>CLI: Deploy manifest and overrides CLI->>Values: Build image and agent values CLI->>Values: Merge environment Helm overrides alt AGENT_VERSION is declared CLI->>Values: Keep the declared environment value else No AGENT_VERSION is declared CLI->>Values: Set global.agent.version from final image tag end CLI->>Helm: Install or upgrade with merged valuesReviews (3) · Last reviewed commit: "fix(cli): derive agent version after ove..."