-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Non-private registries cause schema issue #3600
Comments
Original dependabot commit which also had issues: PowerShell/PSScriptAnalyzer@9a4a3cd |
Hey @rjmholt! Thanks for submitting this issue.
At the moment it looks like we haven't published the v2 schema publicly. I'll see what I can do about that. Hold tight and I'll see what I can dig up. Thanks for your patience. |
Here's what I found... When we validate "nuget-feed": {
"anyOf": [
{
"type": "object",
"required": [
"type",
"url",
"token"
],
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"enum": [
"nuget-feed"
]
},
"url": {
"type": "string"
},
"token": {
"type": "string"
}
}
},
{
"type": "object",
"required": [
"type",
"url",
"username",
"password"
],
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"enum": [
"nuget-feed"
]
},
"url": {
"type": "string"
},
"username": {
"type": "string"
},
"password": {
"type": "string"
}
}
}
]
}, It looks like both |
Hey @rjmholt it looks like you already beat me to my next suggestion PowerShell/PSScriptAnalyzer#1671. Please let me know if that works a little bit better for you. |
Ah, thanks for the help!
Yes that's correct!
I didn't manage to find the section of the docs you linked, but instead ended up here. That section, combined with the original config that dependabot itself submitted, didn't give me the impression that we needed to provide any auth entries (eventually I read between the lines that the word "private" kept appearing around Perhaps nobody else has/will hit this issue, but some things that might have helped me in this case:
After removing the explicit registry entires, it all seems to be working now. Really appreciate you following up so quickly and finding that schema — that's exactly what I was looking for to get me unblocked! |
Oh, also, is there a way to configure the magical dependabot validation CI task to check any edits to the config file, rather than just when dependabot first adds it? That would be really useful to see if we're about to commit a bad config file. |
Dependabot-Preview shouldn't be opening up PR's that include registry config without valid credentials. I'll follow up on that to make sure.
I agree. This would have helped me debug this issue as well.
I'll see if we can publish a schema in some form in the docs. @asciimike is this something that we can do?
This sounds do-able.
I agree. I captured the bullet points and dropped them into the internal issue tracker for us to prioritize. Thanks for taking the time to write that up.
I wish. At least not that I know of yet but you do have the attention of the right people to make that happen. 😉 I personally would love to be able to type Feel free to re-open this issue if you run into any other related issues. Happy hacking! |
@rjmholt you were 💯 right that Dependabot-Preview was opening up migration PR's with missing credentials when the registry was configured as a public registry. I'm working on a patch now. Thank you, thank you, thank you! |
Really appreciate all your help and friendliness — you've made my day 🙂 |
It should actually run on any edit, but it appears the check is currently on ran on the default branch. That's unfortunate because it's most useful when it's ran on a pull request changing the file! I'll look into fixing that, but I might not be able to prioritize it today. |
Package ecosystem
NuGet
Language version
Manifest location and content prior to update
dependabot.yml content
Updated dependency
What you expected to see, versus what you actually saw
Native package manager behavior
Images of the diff or a link to the PR, issue or logs
🕹 Bonus points: Smallest manifest that reproduces the issue
From PowerShell/PSScriptAnalyzer#1664.
Config file:
You can find the current file here.
The configuration file is reporting a schema issue:
The configuration file I wrote is based on dependabot's own generated configuration in PowerShell/PSScriptAnalyzer#1668 (which we rewrote because we thought GitHub might have special logic to detect dependabot commits to perform a configuration hook).
I can't find any further information on the schema or what it expects and the documentation doesn't really cover this case (it only talks about private registries that have tokens or passwords).
I also saw the same error message with this config here.
The text was updated successfully, but these errors were encountered: