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

fix(maven)!: set RegistryStrategy = 'hunt' #22749

Conversation

fredrondina
Copy link
Contributor

Changes

set maven RegistryStrategy = 'hunt'

Context

Closes #22744

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 Jun 13, 2023

We need to first make sure that the registry Urls are in the best order. @Churro any thoughts?

@Churro
Copy link
Collaborator

Churro commented Jun 15, 2023

Correct registry order is definitely not warranted in gradle and maven managers (at least). The existing merge strategy isn't fitting to how these two behave either but I'm clueless how many releases we'd miss by switching to hunt.

@rarkins
Copy link
Collaborator

rarkins commented Jun 16, 2023

Blocked by #22811

@viceice viceice added the status:blocked Issue is blocked by another issue or external requirement label Jun 16, 2023
@viceice viceice marked this pull request as draft June 16, 2023 07:15
@rarkins rarkins added the breaking Breaking change, requires major version bump label Sep 16, 2023
@rarkins
Copy link
Collaborator

rarkins commented Sep 16, 2023

@Churro I think we maybe need to make the change and then be responsive for fixing afterwards if necessary?

@rarkins rarkins changed the base branch from main to v37 September 16, 2023 07:55
@Churro
Copy link
Collaborator

Churro commented Sep 16, 2023

You're probably right.

I think with the maven manager it should be feasible to extract + re-order registryUrls according to the official docs (here). With gradle, it's way more intricate but I'd hope that hunt resolve at least as realiable as merge in that case.

@rarkins
Copy link
Collaborator

rarkins commented Sep 16, 2023

Are we sure Gradle does hunt too?

@Churro
Copy link
Collaborator

Churro commented Sep 16, 2023

Are we sure Gradle does hunt too?

Generally, it does. This is also stated in the official docs:

A project can have multiple repositories. Gradle will look for a dependency in each repository in the order they are specified, stopping at the first repository that contains the requested module.

I'm not sure about deps with dynamic versions (e.g. com.squareup.okttp3:okhttp:4.9.+) though - see here:

Each repository is inspected, Gradle does not stop on the first one returning some metadata. When multiple are defined, they are inspected in the order they were added.

@rarkins rarkins mentioned this pull request Sep 22, 2023
5 tasks
@rarkins rarkins changed the title fix(maven): set RegistryStrategy = 'hunt' fix(maven)!: set RegistryStrategy = 'hunt' Sep 22, 2023
@rarkins rarkins changed the base branch from v37 to main September 22, 2023 12:41
@rarkins
Copy link
Collaborator

rarkins commented Sep 22, 2023

Replaced by #24588

@rarkins rarkins closed this Sep 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 23, 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 status:blocked Issue is blocked by another issue or external requirement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Maven datasource: use hunt registryStrategy
4 participants