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

Checks: Reconcile loop modifies resource without storing the changes in a single reconcile loop #88

Closed
odubajDT opened this issue Oct 3, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@odubajDT
Copy link
Contributor

odubajDT commented Oct 3, 2022

During a reconcile loop which handles the pre- or post-deployment checks, there is a situation, where the logic modifies the workloadinstance object but does not store the changes via K8s API. In this case, the modified object stays in the memory until another reconcile loop handles it.

Steps to reproduce:

  • create a deployment without post-deployment checks
  • after the binding of the pods is finished, you will receive an error in the logs

Operation cannot be fulfilled on keptnworkloadinstances.lifecycle.keptn.sh \"podtato-head-podtato-head-left-arm-0.1.0\": the object has been modified; please apply your changes to the latest version and try again

The operator should not receive such an error at all, although the implementation works good

@odubajDT odubajDT added the bug Something isn't working label Oct 3, 2022
@bacherfl
Copy link
Member

bacherfl commented Oct 6, 2022

This will probably be solved by passing the builder.WithPredicates(predicate.GenerationChangedPredicate{}) option, which is added in #55

@odubajDT
Copy link
Contributor Author

odubajDT commented Oct 6, 2022

Agree, it will be solved by this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants