Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 1, 2026

The code_quality.yml workflow was failing on uv lock --check because the lockfile was out of sync with pyproject.toml.

Changes

Lockfile Update

  • Updated uv.lock to match current dependency specifications
    • pytest-benchmark: 5.1.0 → 5.2.3 (matches pyproject.toml pin)
    • Removed stale tomli entries with impossible version markers

Workflow Improvement

  • Enhanced the lockfile check step in code_quality.yml to be more informative and efficient:
    • Runs uv lock --check first (fast path when lockfile is up-to-date)
    • Only regenerates lockfile if check fails (to show what needs updating)
    • Displays clear error message with diff showing exact changes needed
    • Added set -e for proper error handling

The lockfile check now passes and uv sync --frozen works as expected. The improved workflow provides better developer experience by clearly showing what needs to be updated when the lockfile is out of sync.

[!WARNING]

Original prompt

this file: https://github.com/jacksonpradolima/gsp-py/blob/master/.github/workflows/code_quality.yml

keeps failing. Fix it. The error:
Run uv lock --check
Resolved 105 packages in 660ms
The lockfile at uv.lock needs to be updated, but --check was provided. To update the lockfile, run uv lock.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

- Updated pytest-benchmark from v5.1.0 to v5.2.3 to match pyproject.toml
- Removed unnecessary tomli dependency entries with impossible markers
- Lockfile is now in sync with pyproject.toml requirements

Co-authored-by: jacksonpradolima <[email protected]>
Copilot AI changed the title [WIP] Fix code quality workflow to update lockfile Update uv.lock to fix code_quality workflow Jan 1, 2026
Copilot AI requested a review from jacksonpradolima January 1, 2026 15:11
@jacksonpradolima
Copy link
Owner

@copilot why not have a step before --check to update lock? it's safer

- Add uv lock step before checking lockfile freshness
- Check git diff to detect if lockfile needs updating
- Provide clear error message and show diff when lockfile is out of sync
- This is safer and more informative than just using uv lock --check

Co-authored-by: jacksonpradolima <[email protected]>
Copy link
Contributor Author

Copilot AI commented Jan 1, 2026

@copilot why not have a step before --check to update lock? it's safer

Good suggestion! I've updated the workflow in commit 33dff77 to add a uv lock step before the check. Now it:

  1. Runs uv lock to update the lockfile
  2. Uses git diff to check if the lockfile changed
  3. Fails with a clear error message and diff if the lockfile was out of sync

This approach is safer and more informative than just using uv lock --check alone.

Copilot AI and others added 2 commits January 1, 2026 15:17
- Check lockfile first with uv lock --check (fast path)
- Only regenerate lockfile if check fails (to show diff)
- Provides helpful error message showing exact changes needed
- More efficient while still being informative

Co-authored-by: jacksonpradolima <[email protected]>
- Add 'set -e' to ensure script fails on any command error
- Ensures uv lock failures are properly caught and reported

Co-authored-by: jacksonpradolima <[email protected]>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 1, 2026

Copilot AI changed the title Update uv.lock to fix code_quality workflow Fix code_quality workflow: update lockfile and improve validation Jan 1, 2026
@jacksonpradolima jacksonpradolima marked this pull request as ready for review January 1, 2026 15:21
Copilot AI review requested due to automatic review settings January 1, 2026 15:21
@jacksonpradolima jacksonpradolima merged commit 484a656 into master Jan 1, 2026
14 checks passed
@jacksonpradolima jacksonpradolima deleted the copilot/fix-code-quality-workflow branch January 1, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants