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

Make release compatibility filtering opt-in #19979

Closed
rarkins opened this issue Jan 23, 2023 · 2 comments · Fixed by #19992
Closed

Make release compatibility filtering opt-in #19979

rarkins opened this issue Jan 23, 2023 · 2 comments · Fixed by #19992
Assignees
Labels
breaking Breaking change, requires major version bump priority-2-high Bugs impacting wide number of users or very important features status:in-progress Someone is working on implementation type:feature Feature (new functionality) v35

Comments

@rarkins
Copy link
Collaborator

rarkins commented Jan 23, 2023

What would you like Renovate to be able to do?

Default to no release filtering (today only python exact versions is supported) so that we can add more advanced filtering in future.

If you have any ideas on how this should be implemented, please tell us here.

I'd like to make it an enum in case we want to have different degrees of filtering in future.

Feature name releaseConstraintFiltering, default value "none".

Alternative value "strict", and put this code behind an if (config.releaseConstraintFiltering === 'strict'):

// Filter releases for compatibility
for (const [constraintName, constraintValue] of Object.entries(
config.constraints ?? {}
)) {
// Currently we only support if the constraint is a plain version
// TODO: Support range/range compatibility filtering #8476
if (version.isVersion(constraintValue)) {
res.releases = res.releases.filter((release) => {
const constraint = release.constraints?.[constraintName];
if (!is.nonEmptyArray(constraint)) {
// A release with no constraints is OK
return true;
}
return constraint.some(
// If any of the release's constraints match, then it's OK
(releaseConstraint) =>
!releaseConstraint ||
version.matches(constraintValue, releaseConstraint)
);
});
}
}

Is this a feature you are interested in implementing yourself?

Maybe

@rarkins rarkins added type:feature Feature (new functionality) priority-2-high Bugs impacting wide number of users or very important features breaking Breaking change, requires major version bump status:ready labels Jan 23, 2023
@rarkins rarkins reopened this Jan 31, 2023
@rarkins
Copy link
Collaborator Author

rarkins commented Jan 31, 2023

Will be completed once v35 is released

@rarkins rarkins added status:in-progress Someone is working on implementation v35 and removed status:ready labels Feb 21, 2023
@renovate-release
Copy link
Collaborator

🎉 This issue has been resolved in version 35.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking Breaking change, requires major version bump priority-2-high Bugs impacting wide number of users or very important features status:in-progress Someone is working on implementation type:feature Feature (new functionality) v35
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants