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

Gitops 2874 fix kuttl test 083 #939

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

ciiay
Copy link
Collaborator

@ciiay ciiay commented Jun 17, 2023

What type of PR is this?

/kind bug

What does this PR do / why we need it:
gitops-operator 1-083_validate_apps_in_any_namespace test is being flaky.

Which issue(s) this PR fixes:
GITOPS-2874

Fixes #?
1-083_validate_apps_in_any_namespace test

How to test changes / Special notes to the reviewer:
kuttl test sequential/1-083_validate_apps_in_any_namespace shouldn't be flaky or fail anymore.

Main changes are in controllers/argocd/util.go and controllers/argocd/role.go.
In controllers/argocd/util.go,

  1. Added ctx to reconcileResources arguments
  2. Split namespaceFilterPredicate into smaller functions so it’s easier to read.

In controllers/argocd/role.go,

  1. Removed unused argument in newRoleForApplicationSourceNamespaces function
  2. Added ctx to reconcileRoles function arguments
  3. Removed unused return value role[] in reconcileRole function
  4. Simplified logic in reconcileRole function
  5. Added ctx to reconcileRoleForApplicationSourceNamespaces function arguments
  6. Split reconcileRoleForApplicationSourceNamespaces into smaller functions to simplify the logic

@ciiay
Copy link
Collaborator Author

ciiay commented Jun 17, 2023

@iam-veeramalla @jaideepr97 Please take a look at this PR. Thanks in advance!

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.

1 participant