-
Notifications
You must be signed in to change notification settings - Fork 7k
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
warn and block old repo URLs #8903
Conversation
// parse repo file. | ||
// Ignore the error because it is okay for a repo file to be unparseable at this | ||
// stage. Later checks will trap the error and respond accordingly. | ||
repoFile, err := repo.LoadFile(repofile) |
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.
Do we really want to hit the disk and read this file on every command every time? I'm just thinking out loud. It is a small file but on many commands it will be read more than once.
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'm open to alternatives...
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.
Valid observation from @mattfarina. Can't think of an alternative at moment.
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.
Currently, this is blocking the PR merge, but nobody has any alternatives. Not sure what you want me to do.
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.
Thanks @technosophos for adding this. Some comments inline.
// parse repo file. | ||
// Ignore the error because it is okay for a repo file to be unparseable at this | ||
// stage. Later checks will trap the error and respond accordingly. | ||
repoFile, err := repo.LoadFile(repofile) |
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.
Valid observation from @mattfarina. Can't think of an alternative at moment.
08eeadf
to
2be39ed
Compare
Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
2be39ed
to
2c6b82b
Compare
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.
lgtm
Based on a conversation with Matt Farina, we'll merge this one with the pre-check on the repo file. If anyone comes up with a better idea, we can replace. |
Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
Signed-off-by: Matt Butcher matt.butcher@microsoft.com
What this PR does / why we need it:
This is the least heavy-handed way I could come up with to stop people from using the old charts repo.
stable
orincubator
are mapped to one of the old URLs (but allows someone to, say, map them tooldstable
)helm repo add
unless you supply--allow-deprecated-repos
This is a breaking change, but one that the core maintainers, org maintainers, and chart maintainers have agreed is necessary. Google will turn off the old chart repository on Nov. 13, 2020. This provides warnings to users who are pointing to the old repo, and prevents users from adding the deprecated repos. It stops short of rewriting the repos on the user's behalf.
Special notes for your reviewer:
If applicable: