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

minimum git version check not compatible with 2.33.0.windows.2 #13765

Closed
japj opened this issue Jan 24, 2022 · 3 comments · Fixed by #13767
Closed

minimum git version check not compatible with 2.33.0.windows.2 #13765

japj opened this issue Jan 24, 2022 · 3 comments · Fixed by #13767
Labels
core:git Related to our git platform layer priority-2-high Bugs impacting wide number of users or very important features type:bug Bug fix of existing functionality

Comments

@japj
Copy link

japj commented Jan 24, 2022

How are you running Renovate?

Self-hosted

If you're self-hosting Renovate, tell us what version of Renovate you run.

29.32.5

Please select which platform you are using if self-hosting.

Azure DevOps Server

If you're self-hosting Renovate, tell us what version of the platform you run.

2020 Update 1.1

Describe the bug

When upgrading from Renovate from 29.32.5 to 29.36.2 it fails due to:

EXEC : error : Git version needs upgrading [C:\agent01\_work\33\s\RenovateBot\RenovateBot\RenovateBot.csproj]
         "detectedVersion": "2.33.0.windows.2",
         "minimumVersion": "2.33.0"

It seems like the additional .windows.2 is not handled correctly?

This is the git that is installed from VS2019 11.8

Relevant debug logs

Logs
EXEC : error : Git version needs upgrading [C:\agent01\_work\33\s\RenovateBot\RenovateBot\RenovateBot.csproj]
         "detectedVersion": "2.33.0.windows.2",
         "minimumVersion": "2.33.0"

Have you created a minimal reproduction repository?

No reproduction repository

@japj japj added priority-5-triage status:requirements Full requirements are not yet known, so implementation should not be started type:bug Bug fix of existing functionality labels Jan 24, 2022
@viceice
Copy link
Member

viceice commented Jan 24, 2022

if (
!(
version &&
(version === GIT_MINIMUM_VERSION ||
semverCoerced.isGreaterThan(version, GIT_MINIMUM_VERSION))
)
) {
logger.error(
{ detectedVersion: version, minimumVersion: GIT_MINIMUM_VERSION },
'Git version needs upgrading'
);
return false;
}

Seems the condition is wrong, as version isn't equal and isn't greater

@viceice viceice added core:git Related to our git platform layer status:ready priority-2-high Bugs impacting wide number of users or very important features and removed status:requirements Full requirements are not yet known, so implementation should not be started priority-5-triage labels Jan 24, 2022
@rarkins
Copy link
Collaborator

rarkins commented Jan 24, 2022

We need to use equals():

function equals(a: string, b: string): boolean {
const aCoerced = semver.coerce(a);
const bCoerced = semver.coerce(b);
return aCoerced && bCoerced ? semver.eq(aCoerced, bCoerced) : false;
}

@renovate-release
Copy link
Collaborator

🎉 This issue has been resolved in version 31.49.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
core:git Related to our git platform layer priority-2-high Bugs impacting wide number of users or very important features type:bug Bug fix of existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants