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

helmrepo: Fix test flake in type update test #730

Merged
merged 1 commit into from
May 25, 2022
Merged

Conversation

darkowlzz
Copy link
Contributor

@darkowlzz darkowlzz commented May 24, 2022

In TestHelmRepositoryReconciler_ReconcileTypeUpdatePredicateFilter, when
the type of HelmRepo is updated and immediately checked for the object
to be ready, if the check happens before the client cache is updated, it
results in observing the object to be ready in the previous generation.
This results in status check failure:

[Check-FAIL]: [Ready condition must be False when the ObservedGeneration is less than the object Generation, Ready condition must be False when any of the status condition's ObservedGeneration is less than the object Generation: [Ready ArtifactInStorage]]

Explicitly look for the object with the next generation to prevent such
failure.

Refer: https://github.com/fluxcd/source-controller/runs/6575146265?check_suite_focus=true#step:5:443

In TestHelmRepositoryReconciler_ReconcileTypeUpdatePredicateFilter, when
the type of HelmRepo is updated and immediately checked for the object
to be ready, if the check happens before the client cache is updated, it
results in observing the object to be ready in the previous generation.
This results in status check failure:

```
[Check-FAIL]: [Ready condition must be False when the ObservedGeneration is less than the object Generation, Ready condition must be False when any of the status condition's ObservedGeneration is less than the object Generation: [Ready ArtifactInStorage]]
```

Explicitly look for the object with the next generation to prevent such
failure.

Signed-off-by: Sunny <[email protected]>
@darkowlzz darkowlzz added area/helm Helm related issues and pull requests area/testing Testing related issues and pull requests area/oci OCI related issues and pull requests labels May 24, 2022
@stefanprodan stefanprodan merged commit 7aa0814 into main May 25, 2022
@stefanprodan stefanprodan deleted the helmrepo-test-flake branch May 25, 2022 05:05
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 area/oci OCI related issues and pull requests area/testing Testing related issues and pull requests
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants