Repository navigation
feat: copy VERSION into the image for runtime version lookup - #16
Merged
Merged
Conversation
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.
Summary
Copy the repo's
VERSIONfile into the image, so the running container can tell which release it is. Apollo's/api/statusreads it through a/versionshell2http route added to its compose files.+COPY VERSION /opt/VERSION ENTRYPOINT ["bash", "/opt/entrypoint.sh"]Copied last, so a version bump rebuilds only that layer.
VERSIONhas matched the git tag at every release since v1.1.0, so it must keep being bumped before tagging.Evidence
Local Apollo dev stack,
pymlservice running the current image vs. the same image plusCOPY VERSION /opt/VERSION:GET /version-> 200, empty body;/api/status->"pyml": {"version": null}After:
GET /version-> 200,v1.7.0;/api/status->"pyml": {"version": "1.7.0"}Merge Danger
Door: two-way
One extra file in the image; entrypoint and results unchanged.
Blast Radius: none
Images built before this PR keep working with the new Apollo: they answer an empty body and Apollo reports
null.