Skip to content

fix(ci): avoid charm-checkout collision across sequential repo scans - #486

Merged
lucabello merged 1 commit into
mainfrom
fix/charm-scan-checkout-collision
Aug 18, 2026
Merged

fix(ci): avoid charm-checkout collision across sequential repo scans#486
lucabello merged 1 commit into
mainfrom
fix/charm-scan-checkout-collision

Conversation

@lucabello

Copy link
Copy Markdown
Contributor

scan-charm-repo clones into a fixed ./charm-checkout path. That was fine when each matrix leg ran it once per runner, but now that scan-charms loops it over every repo sequentially from the same cwd, the second repo's clone collides with the first's leftover checkout:

fatal: destination path 'charm-checkout' already exists and is not an empty directory.

Changes

  • Clone into a fresh temp dir per scan-charm-repo call instead of a fixed path.
  • Clean it up in a finally block so repeated or standalone runs don't leave state behind.

scan-charm-repo cloned into a fixed ./charm-checkout path, which was
fine when each matrix leg ran it once per runner. Now that scan-charms
calls it once per repo from the same cwd, the second repo's clone
collided with the first's leftover checkout and failed with:

  fatal: destination path 'charm-checkout' already exists and is not
  an empty directory.

Clone into a fresh temp dir per call instead, and clean it up in a
finally block so repeated/standalone runs don't leave state behind.
@lucabello
lucabello requested a review from a team as a code owner August 18, 2026 08:55
@lucabello
lucabello merged commit 94721b7 into main Aug 18, 2026
1 check passed
@lucabello
lucabello deleted the fix/charm-scan-checkout-collision branch August 18, 2026 08:56
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.

1 participant