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
Bugfix: Gitops commit state #451
Conversation
pkg/dashboard/server/flux.go
Outdated
if gitopsCommit == nil || gitopsCommit.Status == dx.NotReconciled { | ||
_, err := store.SaveOrUpdateGitopsCommit(&model.GitopsCommit{ | ||
Sha: r.GitopsRef, | ||
Status: dx.ReconciliationSucceeded, |
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.
Are you sure Flux sent a succeeded message?
It could happen that Flux applies the last commit out of three and it runs onto an error. Then the state is error that we should record to all the dx.NotReconciled
commits.
Also this code is not stopping to update commits in case of the following sequence in our db:
dx.NotReconciled
dx.NotReconciled
dx.NotReconciled
dx ReconciliationSucceeded
dx.ReconciliationSucceeded
dx.Failed
dx.NotReconciled
It should really only look back until the last definite state (success or error). Not 10 commits, or 24hrs.
…te-manager * origin/main: (50 commits) Bugfix: Cannot delete then recreate an env (#457) Bugfix: Get releases (#454) Missing parameter (#455) Fix status overwrite (#456) Bugfix: Gitops commit state (#451) Enhancement: Hiding secrets in logs (#453) One click guide position change More caching Go build cache test Caching go modules Git config was constantly overwritten locally.. Git config was constantly overwritten locally.. Cosmetics Encryption test must run in isolation; meddler caches the encryption parameters as it is designed to run as a singleton Re-encryption Cosmetics Fixing disabled preview build Fixing disabled preview build Bugfix: Should filter deploy configs to the existing envs (#447) Enhancement: One-click-config guide (#446) ...
No description provided.