Skip to content

fix(ci): disable background git maintenance in release self-test fixtures - #312

Merged
scttbnsn merged 1 commit into
dev/v0.9from
fix/self-test-git-fixture-race
Sep 5, 2026
Merged

scttbnsn merged 1 commit into
dev/v0.9from
fix/self-test-git-fixture-race

Conversation

@scttbnsn

@scttbnsn scttbnsn commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

The GoReleaser Config job failed on three of the last six dev pushes (33906222319, 33923463009, 33935370776), every time at the end of package-release-config-self-test-test.sh:

rm: cannot remove '/tmp/tmp.sNVEMMR0EL/fixture.sTwAlI/.git': Directory not empty

The self-test builds throwaway git repos with git init, add, commit, then its EXIT trap does rm -rf on them. Git's auto maintenance forks a detached process on commit, and it can still be writing under .git/objects when the trap runs. Fixtures now set gc.auto 0 and maintenance.auto false before the first commit, so nothing outlives the script.

Verified: both release self-tests pass locally, shellcheck and qlty clean, full pre-push hook green.

🔧 Changed

  • Set gc.auto 0 and maintenance.auto false in new_fixture.
  • Apply settings before the first commit in each release self-test fixture.

🐛 Fixed

  • Prevent detached Git maintenance processes from writing to .git/objects during fixture cleanup.
  • Resolve intermittent temporary repository cleanup failures in the GoReleaser Config job.

Validation:

  • Release self-tests passed.
  • shellcheck, qlty, and the full pre-push hook passed.

…ures

The GoReleaser Config job failed on three dev pushes (33906222319, 33923463009, 33935370776) with rm: cannot remove '.git/objects': Directory not empty. The self-test's EXIT trap removes its throwaway repos while git's detached auto-maintenance is still writing under .git. Fixtures now set gc.auto 0 and maintenance.auto false before the first commit.

@biggest-littlest biggest-littlest left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reviewed via deep-review workflow and Codex; findings fixed pre-merge. LGTM.

@coderabbitai

coderabbitai Bot commented Sep 5, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: 52459194-ace7-4f89-8a18-7573e6a04c78

📥 Commits

Reviewing files that changed from the base of the PR and between ca28e9a and 08af77c.

📒 Files selected for processing (1)
  • scripts/package-release-config-self-test-test.sh

📝 Walkthrough

Walkthrough

The new_fixture helper sets gc.auto to 0 and maintenance.auto to false in each generated fixture repository. This prevents detached Git maintenance processes from writing under .git during EXIT-trap cleanup.

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/self-test-git-fixture-race

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ALARGECOMPANY ALARGECOMPANY left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM.

@scttbnsn
scttbnsn merged commit ea5be9c into dev/v0.9 Sep 5, 2026
30 of 32 checks passed
@scttbnsn
scttbnsn deleted the fix/self-test-git-fixture-race branch September 5, 2026 12:54
@codecov

codecov Bot commented Sep 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@scttbnsn scttbnsn mentioned this pull request Sep 6, 2026
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.

3 participants