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

git-submodules manager doesn't work if config has pinning turned on #6753

Closed
mikebryant opened this issue Jul 14, 2020 · 7 comments · Fixed by #6754
Closed

git-submodules manager doesn't work if config has pinning turned on #6753

mikebryant opened this issue Jul 14, 2020 · 7 comments · Fixed by #6754
Assignees
Labels
manager:git-submodules Git Submodules manager priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others type:bug Bug fix of existing functionality

Comments

@mikebryant
Copy link
Contributor

What Renovate type are you using?

self-hosted renovate pro

Describe the bug

If you turn pinning on (in our environment we have a default preset that turns pinning on for all repositories), git submodule updates silently do not work

Relevant debug logs

No relevant info

To Reproduce

Turn pinning on, observe submodules don't get any updates

Additional context

Traced through the code, found

} else if (config.pinDigests) {
// Create a pin only if one doesn't already exists
if (!res.updates.some((update) => update.updateType === 'pin')) {
// pin digest
res.updates.push({
updateType: 'pin',
newValue: config.currentValue,
});
}
} else if (config.datasource === datasourceGitSubmodules.id) {
const dependency = clone(await getPkgReleases(config));
res.updates.push({
updateType: 'digest',
newValue: dependency.releases[0].version,
});
}

If config.pinDigests is true, we enter that first elseif section, and then skip out without anything useful happening - because the current version has the correct digest for the current version (it's the identity function for the submodule datasource / manager)

Maybe the first elseif section needs && config.datasource !== datasourceGitSubmodules.id? Or the order of the ifs could be changed.

@mikebryant
Copy link
Contributor Author

@viceice
Copy link
Member

viceice commented Jul 14, 2020

you can add a packageRule to disable pinning for git-submodule manager

@mikebryant
Copy link
Contributor Author

Yup, thank you, I'm attempting that now to work around this issue

@mikebryant
Copy link
Contributor Author

This gives the desired effect as a workaround:

  "git-submodules": {
    "enabled": true,
    "pinDigests": false
  }

@viceice viceice transferred this issue from renovatebot/renovate Jul 14, 2020
@mikebryant
Copy link
Contributor Author

I actually disagree with this being in config-help - I still believe it's a bug in renovate itself. It's by no means obvious that you need to disable pinning for one particular type of dependency to work. At the very least the documentation would need to be updated to say there's a conflict between the two options.

I think a better route would be to fix the problem, so this sort of standard configuration just-works.

@viceice
Copy link
Member

viceice commented Jul 14, 2020

OK, you are right, fixing it asap

@viceice viceice transferred this issue from renovatebot/config-help Jul 14, 2020
@viceice viceice added type:bug Bug fix of existing functionality datasource:git-submodule priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others labels Jul 14, 2020
@viceice viceice self-assigned this Jul 14, 2020
@renovate-release
Copy link
Collaborator

🎉 This issue has been resolved in version 21.29.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 15, 2020
@JamieMagee JamieMagee added manager:git-submodules Git Submodules manager and removed datasource:git-submodule labels Apr 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
manager:git-submodules Git Submodules manager priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others type:bug Bug fix of existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants