Quiet setup-uv warnings in publish job and no-op lockstep pins - #6965
Conversation
… noise
A release batch of ten packages posted 29 annotations, none of which
told anyone anything:
- 20 warnings, two per package, from the gated `publish` job. That job
deliberately never checks the repository out — it holds the only OIDC
privilege and runs nothing but `uv publish` on the artifact the
approval covered — so setup-uv finds an empty working directory: its
cache-dependency glob matches nothing ("The cache will never get
invalidated") and its empty-workdir check warns. Neither is a problem
to fix: the job installs no dependencies, so there is nothing to
cache. Pass `enable-cache: false` and `ignore-empty-workdir: true`
there, via a second render of the uv pin block for jobs without a
checkout, so the pins stay in one place.
- 9 notices, one per package, from `pin-lockstep` reporting that a
package has no exact-pin lockstep siblings. That is the normal case
for every package outside a lockstep group; a step that no-ops has
nothing an approver needs shown at the top of the run. Log it. Same
for `post-release` with no workflow configured.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HDhLwzkKAooYz8x4AB2Ygk
Greptile SummaryThe PR reduces release-workflow noise by disabling unnecessary setup-uv caching in the checkout-less publish job and replacing no-op annotations with ordinary log output.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| packages/reflex-release/src/reflex_release/scaffold.py | Adds a checkout-aware setup-uv rendering block that preserves normal settings for checked-out jobs. |
| packages/reflex-release/src/reflex_release/templates/workflows/publish.yml | Uses the checkout-less setup-uv placeholder only in the gated publish job. |
| packages/reflex-release/src/reflex_release/commands.py | Changes two no-op status messages from GitHub annotations to ordinary log output. |
| tests/units/reflex_release/test_scaffold.py | Adds bidirectional rendered-workflow coverage that rejects checkout-less settings on checked-out jobs and requires them on bare jobs. |
| tests/units/reflex_release/test_commands.py | Verifies no-op command paths remain visible without producing workflow annotations. |
| .github/workflows/publish.yml | Applies the generated cache and empty-workdir settings to the checkout-less publish job. |
Reviews (2): Last reviewed commit: "test(reflex-release): assert which uv pi..." | Re-trigger Greptile
Merging this PR will not alter performance
Comparing Footnotes
|
There was a problem hiding this comment.
All reported issues were addressed across 7 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
The broadened placeholder guard accepts either placeholder after any setup-uv step, and the semantic test only looked at jobs without a checkout — so a template change that put the quieting block on a checked-out job would turn that job's dependency cache off and no test would notice. Split the rendered setup-uv steps by whether their job checks out and assert both directions: a job with no checkout carries enable-cache false and ignore-empty-workdir true, a job that checked out carries neither. Cover every generated workflow rather than only the core ones, so the internal auto-release workflow is checked too. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HDhLwzkKAooYz8x4AB2Ygk
Type of change
Changes To Core Features
Description
This PR addresses two sources of unnecessary noise in release workflow runs:
Quiet setup-uv in the gated publish job: The publish workflow's approval job deliberately does not check out the repository, running
setup-uvin an empty working directory. This causes setup-uv to warn twice per released package:Since this job installs no dependencies (only runs
uv publish), there is nothing to cache anyway. The fix adds a second placeholder (@@UV_SETUP_NO_CHECKOUT@@) that passesenable-cache: falseandignore-empty-workdir: trueto silence these warnings.Log no-op lockstep pins without annotations: When
cmd_pin_lockstepruns on a package with no exact-pin siblings, it logs a message but was incorrectly usingnotice()(which creates a GitHub annotation). This creates one "nothing to do" line per package on every release batch summary. Changed to useecho()instead.Similarly,
cmd_post_releasewas usingnotice()for its no-op case; changed toecho()for consistency.Changes
scaffold.py:
_uv_setup_block()to accept acheckoutparameter; whenFalse, addsenable-cache: falseandignore-empty-workdir: truesettings@@UV_SETUP_NO_CHECKOUT@@placeholder to the render substitutionspublish.yml template & generated workflow:
@@UV_SETUP_NO_CHECKOUT@@instead of@@UV_SETUP_WITH@@commands.py:
cmd_pin_lockstep()to useecho()instead ofnotice()for the no-op messagecmd_post_release()to useecho()instead ofnotice()for the no-op messagetests:
test_every_template_pins_the_uv_it_installs()to accept either placeholdertest_render_quiets_setup_uv_where_there_is_no_checkout()to verify the new settings are appliedtest_render_omits_the_block_when_nothing_is_pinned()to account for the checkout-less job keeping its settings blocktest_pin_lockstep_pins_the_sibling_to_the_exact_version()andtest_pin_lockstep_without_siblings_does_not_annotate_the_run()to verify the command behaviortest_post_release_without_a_configured_workflow_does_nothing()to verify no annotation is createdTest Plan
All new and modified tests pass:
test_every_template_pins_the_uv_it_installs()validates both placeholders are recognizedtest_render_quiets_setup_uv_where_there_is_no_checkout()verifies the cache and workdir settings are appliedtest_render_omits_the_block_when_nothing_is_pinned()confirms the checkout-less job retains its settingstest_pin_lockstep_without_siblings_does_not_annotate_the_run()andtest_post_release_without_a_configured_workflow_does_nothing()verify no annotations are created for no-op caseshttps://claude.ai/code/session_01HDhLwzkKAooYz8x4AB2Ygk