Repository navigation
fix(telemetry): report release version in operator-intake and export manifest - #4383
Merged
Merged
Conversation
…manifest trinity_version read GIT_COMMIT_SHORT, which nothing sets, so it was always "unknown". Use utils.app_version.resolve_release_version() instead.
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.
Fixes #4381
Description
trinity_versionin the operator-intake notice (operator_intake_service.py) and in the agent-data export manifest (routers/agent_data.py) was read fromGIT_COMMIT_SHORT, an environment variable nothing in the repo sets, so it was always"unknown". Both call sites now useutils.app_version.resolve_release_version()(theVERSIONenv var, then the VERSION file). Nothing readsGIT_COMMIT_SHORTany more (its only remaining mentions are the two regression-test comments that explain the bug), and the now-unusedimport osin the intake service is removed.The ent#466 spec mentioned in the issue lives outside this repo and is not touched here.
Related Issue
Fixes #4381
Journey Impact
Journey Impact: none: telemetry/export metadata value only; no journey promise changes
Type of Change
Testing
New: two cases added to
tests/unit/test_ent437_telemetry_consent.pyafter the existingresolve_release_versiontest (which already covers the env var with the+g<sha>suffix stripped):"unknown"only when neither env nor file exists, and the VERSION file used when env is unset. The two call sites are exercised end to end:test_operator_intake.py::test_payload_trinity_version_is_release_version(payload recorded by the existingRecordingClient) andtest_agent_data_endpoints.py::test_export_manifest_trinity_version_is_release_version(manifest.jsonread from theformat=base64export tar), both withVERSIONset via monkeypatch. No change totests/registry.json.Mutation: with the source change reverted, the two call-site tests fail (
trinity_versionis"unknown"); with it, they pass. Rantest_ent437_telemetry_consent.py,test_1810_1814_version_truth.py,test_operator_intake.py,test_agent_data_endpoints.py: 111 passed. The local venv does not carry themcp==1.30.0pin (pin conflict), and the full suite was not run.Checklist
This PR was prepared with AI assistance (Claude Code).