-
Notifications
You must be signed in to change notification settings - Fork 187
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
Panic with an invalid AWS OCI URL for HelmRepository #896
Comments
thanks for raising this @adrien-f. I think just adding the check is the way to go. |
@adrien-f would you like to submit a PR fixing the issue? |
I think we could return the error in the |
Fixes fluxcd#896 Signed-off-by: Adrien Fillon <[email protected]>
This actually happens a bit later in I've attempted a PR in #897 where we simply handle if the resulting authenticator is |
Fixes fluxcd#896 Signed-off-by: Adrien Fillon <[email protected]>
I'd prefer for |
Hi 👋
While playing around, I noticed this panic:
This can be replicated with v0.29.0 and the following HelmRepository:
The URL doesn't match the regex used in
pkg/oci
:https://github.com/fluxcd/pkg/blob/dbad05cf95b380c6f619a9bf76dc755c6ff6e3cc/oci/auth/aws/auth.go#L36-L47
Which results in returning
oci.ProviderGeneric
which is handled by returningnil, nil
laterThis is obviously an invalid URL but the panic doesn't help to find the error, which can be handled here:
source-controller/controllers/helmrepository_controller_oci.go
Lines 378 to 386 in 9e853a9
L380,
auth
can be nil and is not checked. I'm up for a fix but which behavior would you like to have? Something like this maybe?Or update the behavior in pkg/oci instead to raise an error?
The text was updated successfully, but these errors were encountered: