Skip to content
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

Rely on index checksum for HelmRepository reconcile operation #267

Merged

Conversation

martinezleoml
Copy link
Contributor

Fixes #256

Copy link
Member

@hiddeco hiddeco left a comment

Choose a reason for hiding this comment

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

Couple of minor nitpicks, other than that looking good 🌻

controllers/helmrepository_controller.go Outdated Show resolved Hide resolved
controllers/helmrepository_controller.go Outdated Show resolved Hide resolved
controllers/helmrepository_controller.go Outdated Show resolved Hide resolved
controllers/helmrepository_controller.go Outdated Show resolved Hide resolved
controllers/helmrepository_controller.go Show resolved Hide resolved
@martinezleoml martinezleoml force-pushed the FIX/helm-repository-unchanged-index branch from 9ee6f68 to 0440a5c Compare January 25, 2021 17:54
@martinezleoml
Copy link
Contributor Author

Should be ready to merge, sorry for all the back and forth. ;)

@@ -209,11 +209,16 @@ func (r *HelmRepositoryReconciler) reconcile(ctx context.Context, repository sou
return sourcev1.HelmRepositoryNotReady(repository, sourcev1.IndexationFailedReason, err.Error()), err
}

// return early on unchanged generation
indexBytes, err := yaml.Marshal(chartRepo.Index)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
indexBytes, err := yaml.Marshal(chartRepo.Index)
indexBytes, err := yaml.Marshal(&chartRepo.Index)

This will be the last requested change, promised 🖐️

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, here we go!

@hiddeco hiddeco added area/helm Helm related issues and pull requests enhancement New feature or request labels Jan 25, 2021
Fixes fluxcd#256

Signed-off-by: Léo Martinez <leo84.martinez@gmail.com>
@martinezleoml martinezleoml force-pushed the FIX/helm-repository-unchanged-index branch from 0440a5c to c1512d3 Compare January 25, 2021 18:12
Copy link
Member

@hiddeco hiddeco left a comment

Choose a reason for hiding this comment

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

Thank you very much @martinezleoml 🍇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/helm Helm related issues and pull requests enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hash HelmRepository index contents instead of relying on 'generated' timestamp
2 participants