Skip to content

refactor: cleanup GetArtifactRegistryCredentials error handling #1835

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

Merged

Conversation

cappyzawa
Copy link
Member

Summary

This PR updates the error handling for GetArtifactRegistryCredentials() following the improvements in fluxcd/pkg/auth v0.18.0.

As mentioned in fluxcd/image-reflector-controller#786 (comment), this removes unnecessary nil checks
as the function now returns errors directly for unsupported providers.

Changes

  • Update fluxcd/pkg/auth to v0.18.0
  • Remove unnecessary authenticator nil check in Helm OCI repository authentication

Related

Copy link
Member

@matheuscscp matheuscscp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 😁 Please squash so we can merge

Update fluxcd/pkg/auth to v0.18.0 and remove unnecessary authenticator
nil check in Helm OCI repository authentication.

With fluxcd/pkg/auth v0.18.0, GetArtifactRegistryCredentials() returns
valid authenticator when error is nil, making the nil check redundant.

Signed-off-by: cappyzawa <cappyzawa@gmail.com>
@cappyzawa cappyzawa force-pushed the refactor/simplify-oci-auth-error-handling branch from 3e82169 to 738fb2b Compare June 21, 2025 13:22
@matheuscscp matheuscscp merged commit e37bd89 into fluxcd:main Jun 21, 2025
8 checks passed
@cappyzawa cappyzawa deleted the refactor/simplify-oci-auth-error-handling branch June 21, 2025 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants