feat: startup version check, on by default - #5
Open
catinspace-au wants to merge 4 commits into
Open
Conversation
Stdlib-only (urllib + a daemon thread), no new dependencies. Off by default and always disable-able: it runs only when VERSION_CHECK_ENABLED and VERSION_CHECK_API_URL are both set, and any failure - unreachable endpoint, firewall, bad response - costs one warning log line and nothing else. The payload is product/version/os/arch plus a platform-derived instance id (config override, else k8s cluster CA + namespace, else app-scoped machine-id outside containers, else a persisted file, else ephemeral); VERSION_CHECK_SEND_INSTANCE_ID=false strips the id entirely. The UUIDv5 derivation is shared with the scalo chassis so one host reports one id across HyperI products. Seven new tests: disabled default spawns nothing, a mock server receives the exact payload shape, the id strips on request, an explicit id wins, resolution is stable, a closed port ends at the log line, and the derivation fixture matches scalo's.
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.
Adds the startup version check to the Hub's core API service -- stdlib only,
no new dependencies, ON by default with an explicit opt-out.
How it behaves:
line, nothing sent
or fail the service; an unreachable endpoint (firewall, air-gap, closed
port) costs 1 warning log line
instance id (UUIDv5); VERSION_CHECK_SEND_INSTANCE_ID=false strips the id
Done when the service boots, checks once, and a deployment can turn it off
with one env var.