Repository navigation
fix(release): unblock the release pipeline - #7
Merged
Merged
Conversation
`RELEASE.yml` installs the release tooling unpinned:
pip install poetry python-semantic-release
python-semantic-release requires only `gitpython~=3.0`, and GitPython
3.1.60 removed `Actor.name_email_regex`, which python-semantic-release
reads unconditionally while loading its configuration. pip therefore
resolves a broken pair and the very first step of a release aborts:
::ERROR:: type object 'Actor' has no attribute 'name_email_regex'
No tag, no PyPI upload, no docs deploy - the whole pipeline stops before
it computes a version.
Verified against the real tooling: python-semantic-release 10.6.1 with
GitPython 3.1.60 fails as above; with 3.1.59 the same version resolves
this repository's configuration and `semantic-release version --print`
answers 2.2.1, and `--noop version` renders the full changelog.
Cap GitPython rather than pinning python-semantic-release, so the release
picks up the upstream fix when it lands.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S1CErYvpggWAogJ9MDVqj4
`version_variables` pointed at
`.../Sidebar.jsx:FlowyML v`, but semantic-release rewrites assignments -
it looks for `<variable> = "<current version>"`. The version was printed
straight into the JSX:
<p ...>FlowyML v2.2.0</p>
so there was nothing to match. semantic-release updated `pyproject.toml`
and `flowyml/__init__.py`, reported success, and silently left the sidebar
advertising the previous release.
Verified against the real tool: on a scratch clone of `main`,
`semantic-release version` bumps pyproject and `__init__.py` to 2.2.1 and
leaves `FlowyML v2.2.0` in place. With the version held in a constant it
bumps all three.
That also turned CI red on `main` after every release: the version commit
is pushed first and only the follow-up `[skip ci]` sync commit repaired
the sidebar with sed, so the push in between carried an inconsistent tree
that `test_the_frontend_sidebar_shows_the_current_version` rejects.
Hold the version in `const VERSION` and render `{VERSION}`, point
`version_variables` at the constant, and retarget the workflow's sed at
the new shape so the safety net still works.
Three tests: the sidebar constant tracks pyproject, no version is printed
inline in the markup again, and every `version_variables` entry matches
something semantic-release can actually rewrite.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S1CErYvpggWAogJ9MDVqj4
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.
Describe your changes shortly
Two defects that stop a release from working. The first aborts it immediately; the second makes it publish a UI advertising the previous version and leaves
mainred.1. The release cannot start — GitPython
RELEASE.ymlinstalls its tooling unpinned:python-semantic-release asks only for
gitpython~=3.0, and GitPython 3.1.60 removedActor.name_email_regex, which python-semantic-release reads unconditionally while loading its configuration. pip resolves the broken pair and the first step of the release dies:No tag, no PyPI upload, no docs deploy. This is what failed the last release attempt.
Reproduced against the real tooling: PSR 10.6.1 + GitPython 3.1.60 fails as above; 3.1.59 still has the attribute, 3.1.60 does not. Capping GitPython rather than pinning python-semantic-release, so the release picks up the upstream fix when it lands.
2. The sidebar version is never bumped
version_variablespointed at.../Sidebar.jsx:FlowyML v, but semantic-release rewrites assignments — it looks for<variable> = "<current version>". The version was printed straight into the JSX (<p ...>FlowyML v2.2.0</p>), so there was nothing to match. semantic-release updatedpyproject.tomlandflowyml/__init__.py, reported success, and left the sidebar showing the previous release.That also turned CI red on
mainafter every release: the version commit is pushed first, and only the follow-up[skip ci]sync commit repaired the sidebar withsed— so the push in between carried an inconsistent tree.The version now lives in
const VERSION, the JSX renders{VERSION},version_variablespoints at the constant, and the workflow'ssedsafety net is retargeted at the new shape.Verification
Dress-rehearsed on a scratch clone of this branch with the real tool (
semantic-release version --no-commit --no-tag --no-push):pyproject→ 2.2.1,__init__→ 2.2.1, sidebar stuck atFlowyML v2.2.0tests/test_version_consistency.pypasses on the bumped treeTests
Four new tests, all failing before these changes:
pyproject.tomlversion_variablesentry matches something semantic-release can actually rewriteFull suite: 1299 passed, 23 skipped. Frontend: 19 vitest tests pass, production build succeeds. All 12 pre-commit hooks pass.
poetry check --lockexits 0.Checklist
My code follows all rules defined in:
Generated by Claude Code