Skip to content

Add build version to /__axon/info endpoint#89

Merged
ashiramin merged 2 commits intomainfrom
ashir/relay-version-info
Mar 15, 2026
Merged

Add build version to /__axon/info endpoint#89
ashiramin merged 2 commits intomainfrom
ashir/relay-version-info

Conversation

@ashiramin
Copy link
Copy Markdown
Contributor

Summary

  • Adds a version field to the /__axon/info JSON response, read from the AXON_BUILD_VERSION env var (defaults to "dev")
  • Threads the git ref + SHA into the Docker image via a BUILD_VERSION build arg in the Dockerfile
  • Updates the CI workflow to pass BUILD_VERSION when building the image

How it works

CI (github.ref_name + github.sha)
  → docker build --build-arg BUILD_VERSION=...
    → ENV AXON_BUILD_VERSION baked into image
      → GET /__axon/info returns {"version": "main-abc123..."}

Test plan

  • Verify /__axon/info returns "version": "dev" when AXON_BUILD_VERSION is unset
  • Verify /__axon/info returns the correct value when AXON_BUILD_VERSION is set
  • Verify Docker build passes BUILD_VERSION correctly via --build-arg

🤖 Generated with Claude Code

Copy link
Copy Markdown
Collaborator

@shawnburke shawnburke left a comment

Choose a reason for hiding this comment

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

looks good, one nit

tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
BUILD_VERSION=${{ github.ref_name }}-${{ github.sha }}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

cool will this pick up tags?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yes sir

CleanShot 2026-03-14 at 21 48 16@2x

Alias string `json:"alias"`
Handlers []string `json:"handlers"`
InstanceID string `json:"instance_id"`
Version string `json:"version"`
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Maybe name "BuildVersion" for consistency?

ashiramin and others added 2 commits March 14, 2026 21:47
Thread the git ref and SHA into the Docker image as AXON_BUILD_VERSION
so the relay can report its version at runtime via the /__axon/info
endpoint. This lets the Relay Dispatcher know which version each
relay is running.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ashiramin ashiramin force-pushed the ashir/relay-version-info branch from 8d6cacc to 6144bcb Compare March 15, 2026 02:47
@ashiramin ashiramin requested a review from shawnburke March 15, 2026 02:48
@ashiramin ashiramin merged commit 2ec2ec1 into main Mar 15, 2026
16 checks passed
@ashiramin ashiramin deleted the ashir/relay-version-info branch March 15, 2026 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants