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

Bugfix: Gitops commit state #451

Merged
merged 6 commits into from Mar 13, 2023
Merged

Bugfix: Gitops commit state #451

merged 6 commits into from Mar 13, 2023

Conversation

dzsak
Copy link
Contributor

@dzsak dzsak commented Mar 8, 2023

No description provided.

@dzsak dzsak linked an issue Mar 8, 2023 that may be closed by this pull request
pkg/dashboard/server/flux.go Show resolved Hide resolved
pkg/dashboard/server/flux.go Outdated Show resolved Hide resolved
pkg/dashboard/server/flux.go Outdated Show resolved Hide resolved
if gitopsCommit == nil || gitopsCommit.Status == dx.NotReconciled {
_, err := store.SaveOrUpdateGitopsCommit(&model.GitopsCommit{
Sha: r.GitopsRef,
Status: dx.ReconciliationSucceeded,
Copy link
Contributor

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.

@laszlocph laszlocph merged commit 8f524ed into main Mar 13, 2023
@laszlocph laszlocph deleted the bugfix/gitops-commit-state branch March 13, 2023 07:43
laszlocph added a commit that referenced this pull request Mar 14, 2023
…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)
  ...
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.

Newer commits should mark older ones as applied as well
2 participants