fix(version): derive __version__ from importlib.metadata, bump to 0.1.3#3
Open
anthrax63 wants to merge 1 commit into
Open
fix(version): derive __version__ from importlib.metadata, bump to 0.1.3#3anthrax63 wants to merge 1 commit into
anthrax63 wants to merge 1 commit into
Conversation
- __init__.py: read version from installed package metadata so pyproject.toml is the single source of truth. Fixes stale /healthz.version=0.1.1 after v0.1.2 was released with __version__ string not bumped (AGG-105). - pyproject.toml, chart/Chart.yaml: 0.1.2 -> 0.1.3 (0.1.2 tag is already burned with the wrong /healthz.version, cut new tag). - tests: add test_healthz_version_matches_pyproject to guarantee the two sources stay in sync going forward. Co-authored-by: multica-agent <github@multica.ai>
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
Fixes AGG-105 (косметическая часть). After v0.1.2 was released,
/healthzkept returning"version":"0.1.1"becausepyproject.tomlandChart.yamlwere bumped butsrc/kz_scoring_api/__init__.pywasn't.__init__.pynow reads the version fromimportlib.metadata.version("kz-scoring-api")—pyproject.tomlis the single source of truth going forward.pyproject.tomlandchart/Chart.yamlbumped to0.1.3(the0.1.2tag is already published with the wrong/healthz.version, so cut a fresh tag).test_healthz_version_matches_pyprojectso the two sources can't drift again.The pipeline_run hang (
pipeline run 21481 not done in 30.0s) is investigated separately — root cause and findings posted on AGG-105. Fix lives in vaultee-pipelines, not here.Test plan
pytest tests/— 41 passed (was 40 before, new test added).ruff check .— clean.v0.1.3tag, verifyghcr.io/aggregion/kz-scoring-api:v0.1.3is built. DevOps bumps overlay in kartel-deploy.GET /healthzreturns"version":"0.1.3".