Release job#97
Conversation
|
Warning Review limit reached
Next review available in: 58 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (13)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Why is this change necessary?
The template had no
Releaseworkflow. The existingPublish/Publish to Stagingworkflows re-run lint/test/build themselves, duplicating everything CI already does for the commit. We want a release path that instead relies on a passing CI run — modeled on thecopier-nuxt-python-intranet-apprelease.yaml— while publishing to PyPI (using the existingpublish.yamlas the PyPI reference).While wiring this up we also found that instantiated repos hit pylint
R0801 duplicate-codebetweengit_tag.pyandextract_project_version.py, because this repo carried a pre-refactor fork ofgit_tag.py(symlinked fromcopier_template_resources/) that parsedpyproject.tomlitself.How does this change address the issue?
buildjob toci.yaml.jinjathat runsuv build --no-sourcesand uploads apython-package-distributionsartifact (if-no-files-found: error), wired intoworkflow-summary(needs + fail-check).release.yaml.jinja. Manualworkflow_dispatchwith adry_runinput, generated for both libraries and executables. Aguardjob requires the ci.yaml run for the current commit to becompleted/success(including theworkflow-summaryjob), extracts the version viaextract_project_version.py, and confirms the tag is absent — real releases must run frommain. The flow then branches ondeploy_as_executable:v<version>tag, publish to PyPI and verify again, then create a GitHub Release with generated notes.v<version>tag, download everyexe-{os}-{python}artifact the CIexecutablejob built, package each (tar on Linux / zip on Windows), and attach them all to a GitHub Release. No PyPI publish.All tag/publish/release jobs are skipped on
dry_run.git_tag.pywith base/nuxt. Replaced the local fork with the base version (--versionrequired, nopyproject.tomlparsing), and collapsed thecopier_template_resources/symlink into a real file attemplate/.github/workflows/git_tag.py(matching its siblingextract_project_version.py). Updated all call sites inpublish.yamlandrelease.yamlto source the version fromextract_project_version.pyand pass--version.Releaseworkflow in the generated README, plus a TODO to eventually mergePublish/Publish to StagingintoRelease.What side effects does this change have?
buildjob on every run (gated{% if not is_frozen_executable %}to matchpublish.yaml).git_tag.py's CLI changed:--versionis now required and it no longer prints/parses the version. Any external caller relying on the old no-arg print behavior must switch toextract_project_version.py.create-taggained aneedsdependency (guardinrelease.yaml,get-valuesinpublish.yaml) to obtain the version.template/.github/workflows/git_tag.pychanged from a symlink to a regular file;copier_template_resources/git_tag.pywas deleted.How is this change tested?
Rendered the template with
copier(data1 / PyPI) and verified:ci.yaml,release.yaml,publish.yamlall parse as YAML; job graph,needs, anddry_runguards asserted correct.git_tag.pycall sites pass--version; version sourced fromextract_project_version.py.10.00/10(previously exit 8 /R0801). ruff and pyright pass on the sourcegit_tag.py.Final enforcement happens in the
lint-matrixCI job, which generates across data1/2/3 and runs pre-commit on the output.Other
is_frozen_executable(used to gateentrypoint.py,main.py,publish.yaml,publish_to_staging.yaml) is undefined and evaluates falsy — so executable projects shipped with noentrypoint.py/main.pyyet still got PyPI publish workflows. Renamed all guards (plus the CIbuildjob) to the realdeploy_as_executablequestion.release.yamlis intentionally ungated — it serves both cases and branches internally;publish.yaml/publish_to_staging.yamlstay library-only. Verified renders: executables now getentrypoint.py/main.py, no publish, and arelease.yamlthat attaches the CI-built executables; libraries get publish/release + the CI build job and no entrypoint/main.tests/copier_datafile is PyPI + library (data1/data3 = PyPI + executable, data2 = CodeArtifact + library), solint-matrixno longer exercises the PyPI-library publish/release path. Consider a data file withpython_package_registry: PyPIanddeploy_as_executable: no.release.yaml'screate-tagpushes the tag beforepublish-to-primary; the GitHub Release step then attaches to that existing tag (softprops/action-gh-release handles a pre-existing tag gracefully — no conflict).