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(package-rules): warn for depName fallback #28547

Merged
merged 1 commit into from
Apr 22, 2024

Conversation

rarkins
Copy link
Collaborator

@rarkins rarkins commented Apr 20, 2024

Changes

Log warning when depName fallback is used in packageRules

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 Author

rarkins commented Apr 20, 2024

@nabeelsaabna do you want to first check the hosted app for these types of info messages which are our fault? Or merge, upgrade, and fix warnings as we find them?

@nabeelsaabna
Copy link
Contributor

@nabeelsaabna do you want to first check the hosted app for these types of info messages which are our fault? Or merge, upgrade, and fix warnings as we find them?

What do you mean by "which are our fault" ?
Isn't this a user configuration?

@rarkins
Copy link
Collaborator Author

rarkins commented Apr 21, 2024

What do you mean by "which are our fault" ? Isn't this a user configuration?

There might be some built-in preset packageRules which cause a high volume of these messages, such as matchPackageNames=node

@viceice
Copy link
Member

viceice commented Apr 21, 2024

we should validate our internal presets and ensure there's no warning log call?

@rarkins
Copy link
Collaborator Author

rarkins commented Apr 21, 2024

we should validate our internal presets and ensure there's no warning log call?

Not too easy to do - requires not just resolution but also data to test against. Also, any rule with matchPackageNames could in theory trigger a warning with the right inputs. The question is whether it's common instead of convoluted use cases

@nabeelsaabna
Copy link
Contributor

overall there are ~6% of repositories with the message Use matchDepNames instead of matchPackageNames
I checked few and it look manual user configurations

On a different note, maybe its time to print/capture shallow config

@rarkins
Copy link
Collaborator Author

rarkins commented Apr 21, 2024

6% seems pretty high for manual, can you share some examples (which aren't confidential) so I can understand better?

@nabeelsaabna
Copy link
Contributor

3952 unique repositories in the last 7 days, will check for more details

@rarkins
Copy link
Collaborator Author

rarkins commented Apr 21, 2024

@nabeelsaabna I was wondering if any of our workarounds might hit this, e.g. the depName is 'node' or 'java' but the packageName is not

@rarkins
Copy link
Collaborator Author

rarkins commented Apr 21, 2024

Related: we are going to remove the depName fallback in v38, which will be released soon

@rarkins
Copy link
Collaborator Author

rarkins commented Apr 22, 2024

@nabeelsaabna should we merge and put it live?

@nabeelsaabna
Copy link
Contributor

Yes.
we can do that

@rarkins rarkins added this pull request to the merge queue Apr 22, 2024
Merged via the queue into main with commit fa732c4 Apr 22, 2024
37 checks passed
@rarkins rarkins deleted the feat/warn-package-dep-name-fallback branch April 22, 2024 06:11
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 37.316.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 24, 2024
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.

None yet

4 participants