-
Notifications
You must be signed in to change notification settings - Fork 267
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
Unnecessary config version change can happen when excluded files' contents are modified #5317
Comments
This also seems to affect the |
Thanks @dadadom. Yes, it affects all types of Build actions. The bug comes from the The default values of the I'm working on the fix for the |
Thank you, this is great to hear! We will tackle an upgrade to |
Bug
Container modules get rebuilt when the exclude files are modified.
From the docs:
However, making changes in the excluded files' contents can cause some unnecessary action/module version changes. In that case, the module is rebuilt when it should not be. But the built images have the same digest, therefore no new images are pushed to the registry, instead, the already existing image in the registry is tagged with yet another version.
Issue
If a file's content from the
excluded:
list has been modified, it causes the module version change, despite it should be ignored. Here theexcluded:
config entry is not modified.This happens only with
GARDEN_GIT_SCAN_MODE=subtree
.Current Behavior
An excluded file is not excluded by the Git repo scanner.
Thus, the changes made in the excluded file's content cause the change of module version and, hence, trigger a new build job.
Expected Behavior
An excluded file should not be returned from the Git repo scan.
So, the changes made in the excluded files should not affect the module version.
Reproducible example
garden build
./dir1
garden build again
Suggested solution(s)
Fix the
GitHandler.getFiles()
method to properly exclude all files and directories listed in theexclude:
config entry.Workaround
Not found.
Your environment
This is an environment-agnostic issue. It comes from the Core framework and version calculation logic.
garden version 0.13.18
See also #5519.
The text was updated successfully, but these errors were encountered: