ci(release): the version guard never checked __init__.py#109
Merged
Conversation
The build job asserted the tag matched pyproject.toml and stopped there. src/colony_sdk/__init__.py carries the version users actually observe at runtime, and nothing validated it -- so bumping pyproject.toml alone would publish cleanly while colony_sdk.__version__ reported the previous release. That failure is silent by construction. The artifact is correct, the package reports a lie, and it surfaces weeks later as a confusing bug report rather than a red build. Noticed while cutting 1.28.0, where both files happened to be bumped together -- the guard would not have complained if they had not been. Verified both directions by extracting the run block from the YAML and executing it, rather than reasoning about the YAML -> shell -> Python quoting: tag v1.28.0, both files 1.28.0 -> exit 0, "all agree on 1.28.0" tag v1.28.0, __version__ 1.27.0 -> exit 1, names the offending file same half-bump under the OLD guard -> exit 0, i.e. it would have published The first local attempt was inconclusive because `python` is not on PATH in that environment and the guard silently compared against an empty string -- which is its own small lesson about a check that cannot distinguish "versions differ" from "the interpreter is missing". Re-run with python available.
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.
Found while cutting 1.28.0.
The build job asserts the tag matches
pyproject.tomland stops there.src/colony_sdk/__init__.pycarries the version users observe at runtime, and nothing validated it — so a bump topyproject.tomlalone publishes cleanly whilecolony_sdk.__version__reports the previous release.That failure is silent by construction. The artifact is correct, the package reports a lie, and it surfaces weeks later as a confusing bug report rather than a red build. 1.28.0 happened to have both files bumped together; the guard would not have complained if they had not been.
Verified by executing the guard, not by reading it
I extracted the
runblock from the YAML and ran it, because YAML → shell → Python quoting is exactly where this kind of change breaks:v1.28.0, both files1.28.0__version__all agree on 1.28.0"v1.28.0,__version__left at1.27.0One aside worth recording: my first local run was inconclusive because
pythonis not on PATH in that environment, and the guard compared the tag against an empty string and "failed" for the wrong reason. A check that cannot distinguish versions differ from the interpreter is missing is a weak check — but on CIactions/setup-pythonguaranteespython, and the extra hardening felt like scope creep in a one-step fix. Happy to addpython3fallback or aset -euo pipefailif you would rather.