-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
fix: only update lock files if necessary #13462
Conversation
… and missing `updateLockDependency`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise LGTM
lib/workers/branch/get-updated.ts
Outdated
(await getFile( | ||
file.name, | ||
reuseExistingBranch ? config.branchName : config.baseBranch | ||
)) !== file.contents |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait, the contents can be a buffer (Gradle wrapper) or directory (git submodule).
So that needs to be handled too.
I have personal painful experience that modifying this type of logic can backfire, so I'd like to review it very carefully before merging |
if ( | ||
file?.type === 'addition' && | ||
file.contents !== '' && // only check if artifact is non-empty --> ignore git-submodule artifacts | ||
(await getFile( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still think we get into trouble when the file is the gradle wrapper jar. Which is binary.
How many managers do we have left which support update-lock file but which don't have an updateLockedDependency function? |
Terraform is the only one |
Sorry, but I'd prefer to avoid this branch worker change only for terraform |
only update lock files if necessary when using
update-lockfile
… and missingupdateLockDependency
Changes:
Detect if the artifacts are already up to date if running not in
lockfileMaintenance
mode and the manager does not export aupdateLockDependency
functionContext:
Closes #13363
Documentation (please check one with an [x])
How I've tested my work (please tick one)
I have verified these changes via:
https://github.com/secustor/renovate-flapping-grouped-terraform-updates