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

feat(datasource): support range constraints filtering #20217

Closed
wants to merge 16 commits into from
Closed

feat(datasource): support range constraints filtering #20217

wants to merge 16 commits into from

Conversation

Lctrs
Copy link
Contributor

@Lctrs Lctrs commented Feb 4, 2023

Changes

  • Adds an optional method subset to VersioningApi interface that returns true if first argument is a subset of second argument, false otherwise
  • Adds implementations for it in npm and composer versioning
  • Uses it in releases filtering in strict constraints mode with fallback to matching
  • Extracts release's constraints from packagist datasource

Context

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@rarkins
Copy link
Collaborator

rarkins commented Feb 4, 2023

I don't see the extractedConstraints part.

Blocked by #19979 (i.e. waiting for v35, or could be combined with it)

@Lctrs Lctrs changed the base branch from main to v35 February 4, 2023 19:32
@Lctrs Lctrs changed the title feat(composer): filter releases using php constraint feat(datasource): support range constraints filtering Feb 4, 2023
@Lctrs Lctrs marked this pull request as ready for review February 16, 2023 09:35
lib/modules/versioning/pep440/index.ts Outdated Show resolved Hide resolved
lib/modules/versioning/types.ts Outdated Show resolved Hide resolved
lib/modules/versioning/python/index.ts Outdated Show resolved Hide resolved
@viceice viceice requested a review from rarkins February 16, 2023 18:45
@rarkins
Copy link
Collaborator

rarkins commented Feb 17, 2023

@Lctrs this PR is looking good. Do you have any public repos you've been testing against?

@Lctrs
Copy link
Contributor Author

Lctrs commented Feb 17, 2023

@rarkins no. I trusted the test suite. How can I do that ?

@rarkins
Copy link
Collaborator

rarkins commented Feb 17, 2023

@Lctrs just have some public repos on github.com which achieve what you're after. For example it could be a Node.js upgrade where the new version requires Node 18 but the project supports 16 and 18, or something similar with python or PHP versions.

@Lctrs
Copy link
Contributor Author

Lctrs commented Feb 18, 2023

So, I've been able to make it work on a composer project with the last commit.

On https://github.com/Lctrs/php-library-skeleton which runs against the official renovate app, renovate opens this update PR which contains an invalid update for maglnet/composer-require-checker.

On a forked repo, I've got this PR https://github.com/Lctrs/playground/pull/2 which does not contain the invalid update.

RahulGautamSingh and others added 8 commits February 23, 2023 06:30
Changes `rangeStrategy` default value from `'replace'` to `'auto'`.

Changes `auto` behavior so that `update-lockfile` is preferred if the manager supports the `updateLockedDependency()` function.

Closes #19800

BREAKING CHANGE: Renovate will now default to updating locked dependency versions. To revert to previous behavior, configure rangeStrategy=replace.
…9958)

Sets new defaults:
- `prConcurrentLimit`: 10 (instead of 0)
- `prHourlyLimit`: 2 (instead of 0)

Closes #19800

BREAKING CHANGE: Renovate now defaults to applying hourly and concurrent PR limits. To revert to unlimited, configure them back to `0`.
Set default GOPROXY value to match `go`'s own default.

Closes #20040

BREAKING CHANGE: Renovate will now use go's default `GOPROXY` settings. To avoid using the public proxy, configure `GOPROXY=direct`.
Checks file cache for expired items at the end of a run. Non-breaking change but it may result in some long cleanup jobs for any bots which have been left to populate their package cache for a long time.

Closes #13732
rarkins and others added 3 commits February 23, 2023 06:31
…git tag, and preserve existing digest semantics as separate datasource (#20178)

Co-authored-by: RahulGautamSingh <[email protected]>
Co-authored-by: Rhys Arkins <[email protected]>
Co-authored-by: Michael Kriese <[email protected]>
Co-authored-by: HonkingGoose <[email protected]>
@rarkins
Copy link
Collaborator

rarkins commented Feb 23, 2023

This feature is not itself breaking, but it relies on a breaking change in v35.0.0. Should we include it in v35.0.0 or merge it as v35.1.0 after?

@Lctrs
Copy link
Contributor Author

Lctrs commented Feb 23, 2023

If I have any saying in this decision, I would say ship it ASAP as it's ready.

@rarkins
Copy link
Collaborator

rarkins commented Feb 23, 2023

It would only be a difference of a few hours at most, once v35 is released

@Lctrs
Copy link
Contributor Author

Lctrs commented Feb 23, 2023

@rarkins It's up to you :)

@rarkins rarkins force-pushed the v35 branch 3 times, most recently from 491f0eb to a6bbf93 Compare March 4, 2023 05:30
@rarkins rarkins force-pushed the v35 branch 5 times, most recently from 181a4d7 to a4ab452 Compare March 10, 2023 08:34
@rarkins rarkins deleted the branch renovatebot:v35 March 10, 2023 09:53
@rarkins rarkins closed this Mar 10, 2023
@Lctrs
Copy link
Contributor Author

Lctrs commented Mar 10, 2023

@rarkins Should I reopen it against main branch ?

@rarkins
Copy link
Collaborator

rarkins commented Mar 10, 2023

I didn't close it intentionally, sorry. Seems it was closed as a result of v35 getting merged and deleted. Please restore it and retarget towards main and we'll try to get it merged today!

@Lctrs
Copy link
Contributor Author

Lctrs commented Mar 10, 2023

Can't do it by myself. I can't reopen the PR and retarget the branch. But I've rebased my branch on top of main on my fork.

@rarkins
Copy link
Collaborator

rarkins commented Mar 10, 2023

Can you open a new PR?

@Lctrs
Copy link
Contributor Author

Lctrs commented Mar 10, 2023

Done #20842

@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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PHP lookup constraints
5 participants