Skip to content

[api] Serve full system version from /v1/version#10839

Draft
david-crespo wants to merge 2 commits into
system-version-apifrom
serve-zone-version
Draft

[api] Serve full system version from /v1/version#10839
david-crespo wants to merge 2 commits into
system-version-apifrom
serve-zone-version

Conversation

@david-crespo

Copy link
Copy Markdown
Contributor

Built on #10250. Temporarily pins omicron-zone-package to oxidecomputer/omicron-package#79 so we can test the file in the Nexus zone containing the full stamped version. At Nexus startup we read the version from that file into memory so future hits to the endpoint are cheap (because we want to serve it to unauthenticated users). See RFD 708.

--target test stamp nexus "$DEPLOY_SYSTEM_VERSION"
cp out/versioned/nexus.tar.gz out/nexus.tar.gz
printf '%s\n' "$DEPLOY_SYSTEM_VERSION" >out/deploy-system-version

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.

My tentative understanding is that it should be ok to stamp here because the only thing that reads this archive is the helios / deploy CI job, i.e., this shouldn't conflict with any actual release stamping business.

Read the full stamped version string (N.P.C-pre+gitHHHH) from a well-known
path inside the deployed zone (/var/oxide/system-version), falling back to the
compile-time SYSTEM_VERSION core when absent (dev/test, unstamped packages).
/v1/version now serves this via omicron_common::system_version().
echo "$VERSION_RESPONSE"
exit 1
fi

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.

This passes, so the whole thing works in a basic sense. Neat.

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.

1 participant