-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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(datasource/repology): throw if package/repo not found #31093
Conversation
); | ||
|
||
return undefined; | ||
throw new Error(`Repository or package not found on Repology: ${repoName}/${pkgName}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
throw new Error(`Repository or package not found on Repology: ${repoName}/${pkgName}`); | |
throw err; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But this does not work as there is no err
.
TS2304: Cannot find name err
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is this code reached and for what reasons?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked and there's very few manually thrown errors in datasources. Ideally we shouldn't invent a new type of error here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before there was a logger.debug
which I changed to logger.warn
to make the problem visible in the logs. See above. May be switch back to the first solution?
logger.warn
if package/repo not found
Please create a GitHub Discussion before continuing with this PR. Thank you for your PR, but we need to discuss the requirements and implementation first. The maintainers believe that there is a lack of - or misalignment of - requirements about this PR. We need to discuss the requirements and implementation first so that you don't write code that won't be merged. This PR will be closed for now to avoid confusion, but you can reopen it after the discussion has been resolved. Thanks, the Renovate team |
Sorry, let's have a discussion about this first, because I don't think this is an obvious change or repology-specific.
renovate/lib/modules/datasource/datasource.ts Lines 37 to 39 in a35197c
|
Changes
This PR adds a warning to the log file if the Repology datasource is not able to find the package and/or repository. It was a debug message before.
Context
In case package/repository are not found it needs to visible in the daily work with Renovate as these packages are never updated due to a wrong setup by the user. Usually the logs are set to
info
or evenwarn
as you don't wan't to seedebug
messages on a regular basis.Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via: