Skip to content

Use fetch-depth: 0 so setuptools_scm picks up tags in CI#1170

Closed
kjaymiller wants to merge 2 commits into
mainfrom
issue-1169
Closed

Use fetch-depth: 0 so setuptools_scm picks up tags in CI#1170
kjaymiller wants to merge 2 commits into
mainfrom
issue-1169

Conversation

@kjaymiller
Copy link
Copy Markdown
Collaborator

Summary

Fixes #1169

Test plan

🤖 Generated with Claude Code

Without fetch-depth: 0, the checkout is shallow with no tags, and
setuptools_scm falls back to a 0.0.dev version. That breaks uv
resolution on any PR that updates pyproject.toml without updating
uv.lock, because the cli extra pins render-engine-cli, which in
turn requires render-engine>=2025.11.1a1.

Fixes #1169

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added bug Something isn't working github-actions Pull requests that update GitHub Actions code labels May 22, 2026
@kjaymiller kjaymiller requested a review from brass75 May 22, 2026 00:11
@kjaymiller
Copy link
Copy Markdown
Collaborator Author

As with all issues when it comes to workflows we can't test all that effectively until it's merged

Copy link
Copy Markdown
Member

@brass75 brass75 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope this does what you think it does because I have no idea.

@kjaymiller
Copy link
Copy Markdown
Collaborator Author

hmmm maybe we try dlemstra/Magick.NET#1528 (comment)

@kjaymiller
Copy link
Copy Markdown
Collaborator Author

I hope this does what you think it does because I have no idea.

Great challenge on this. I'm glad we have AI Attestation to make us reconsider.. the link above was found by me (not ai)

@brass75
Copy link
Copy Markdown
Member

brass75 commented May 22, 2026

hmmm maybe we try dlemstra/Magick.NET#1528 (comment)

Based on this I think all we would need is fetch-tags: true and not the depth change.

@kjaymiller
Copy link
Copy Markdown
Collaborator Author

Set up two test branches to verify whether fetch-depth: 0 is needed or if fetch-tags: true (shallow + tag refs) would suffice. Both have a rich downgrade to force uv to re-resolve like a dependabot PR, plus workflow_dispatch so they can be triggered manually.

Trigger:

gh workflow run "PyTest" --ref issue-1169-test-fetch-tags
gh workflow run "PyTest" --ref issue-1169-test-depth-0

If #1171 passes, fetch-tags: true is enough and this PR can be slimmed to use that instead. If #1171 fails on the cli extra error from #1169, fetch-depth: 0 is the right call.

Both branches are labeled DO NOT MERGE.

@brass75
Copy link
Copy Markdown
Member

brass75 commented May 22, 2026

I think the fetch-tags is sufficient. Those test failures are from some weird dependency issue regarding the CLI. We should remove that dependency.

@kjaymiller
Copy link
Copy Markdown
Collaborator Author

Results in: fetch-depth: 0 is required.

Variant Run gen-coverage-badge matrix (3.10–3.13) latest-os (win/mac)
fetch-tags: true (#1171) 26263272755
fetch-depth: 0 (#1172) 26263280788

The fetch-tags: true jobs failed with the exact #1169 error — tag refs alone aren't enough because the tag's target commit isn't in the shallow history, so setuptools_scm falls back to 0.0.dev0 and render-engine-cli==2025.11.1render-engine>=2025.11.1a1 becomes unsatisfiable:

Because render-engine-cli==2025.11.1 depends on your project and render-engine[cli] depends on render-engine-cli==2025.11.1, we can conclude that render-engine[cli] depends on itself at an incompatible version.

This PR's fetch-depth: 0 is the right call. The test PRs (#1171, #1172) can be closed.

Same setuptools_scm shallow-checkout failure mode as test.yml: ty_check
re-resolves via uv and trips the self-referential `cli` extra; publish.yml
runs `uv build` for releases and would otherwise bake `0.0.dev0` into the
wheel shipped to PyPI.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working github-actions Pull requests that update GitHub Actions code

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

CI checkouts are shallow; setuptools_scm reports junk version and breaks resolution on dependabot PRs

2 participants