Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repository cache gets invalidated after several builds #1079

Closed
YrrepNoj opened this issue Dec 4, 2022 · 1 comment · Fixed by #1112
Closed

Repository cache gets invalidated after several builds #1079

YrrepNoj opened this issue Dec 4, 2022 · 1 comment · Fixed by #1112
Assignees

Comments

@YrrepNoj
Copy link
Contributor

YrrepNoj commented Dec 4, 2022

Related to #1069

When rebuilding a package, zarf will attempt to use repositories that already exist in the ~/.zarf-cache/repos directory. When testing the fix for another (relatively similar issue) I realized that rebuilding the same package multiple times (3+ times) will result in a failure because the HEAD of the repository in the cache directory ends up picking up changes from online-upstream somehow.

Steps to Replicate

Running from the root of the Zarf repo

# make sure the cache is clear
zarf tools clear-cache


# Build all the things!
zarf package create examples/git-data/ --confirm       # This will result with the git repositories being added to the cache
zarf package create examples/git-data/ --confirm       # This will result with the cached repositories having unstaged changes
zarf package create examples/git-data/ --confirm       # This will result in a creation failure

Screen Shot 2022-12-04 at 6 09 15 PM

@runyontr
Copy link
Contributor

runyontr commented Dec 6, 2022

Looking forward to this fix

jeff-mccoy pushed a commit that referenced this issue Dec 12, 2022
## Description

Fixes a bug introduced from MZAL where cache could be messed with do to
GitPath being changed in the git receiver.

## Related Issue

Fixes #1079 

## Type of change

- [X] Bug fix (non-breaking change which fixes an issue)
Repository owner moved this from New Requests to Done in Zarf Project Board Dec 12, 2022
Noxsios pushed a commit that referenced this issue Mar 8, 2023
## Description

Fixes a bug introduced from MZAL where cache could be messed with do to
GitPath being changed in the git receiver.

## Related Issue

Fixes #1079 

## Type of change

- [X] Bug fix (non-breaking change which fixes an issue)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants