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

fix(appset): events not honouring configured namespaces (#21219) #21241

Merged
merged 9 commits into from
Jan 15, 2025

Conversation

eadred
Copy link
Contributor

@eadred eadred commented Dec 18, 2024

Namespace filtering is applied to Update, Delete and Generic events.

Fixes #21219

If possible I would like this fix also cherry-picked to 2.13 please.

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Toolchain Guide
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.
  • Optional. My organization is added to USERS.md.
  • Optional. For bug fixes, I've indicated what older releases this fix should be cherry-picked into (this may or may not happen depending on risk/complexity).

Sorry, something went wrong.

… ApplicationSet events

Namespace filtering is applied to Update, Delete and Generic events.

Fixes argoproj#21219

Signed-off-by: eadred <eadred77@googlemail.com>
@eadred eadred requested a review from a team as a code owner December 18, 2024 14:55
Copy link

bunnyshell bot commented Dec 18, 2024

❌ Preview Environment deleted from Bunnyshell

Available commands (reply to this comment):

  • 🚀 /bns:deploy to deploy the environment

@crenshaw-dev
Copy link
Member

Change makes sense to me! Could you write a test?

Copy link

codecov bot commented Dec 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.25%. Comparing base (d23e6ac) to head (b51241f).
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #21241      +/-   ##
==========================================
+ Coverage   53.35%   55.25%   +1.89%     
==========================================
  Files         337      337              
  Lines       56846    56845       -1     
==========================================
+ Hits        30330    31407    +1077     
+ Misses      23876    22744    -1132     
- Partials     2640     2694      +54     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: eadred <eadred77@googlemail.com>
Signed-off-by: eadred <eadred77@googlemail.com>
Signed-off-by: eadred <eadred77@googlemail.com>
@eadred
Copy link
Contributor Author

eadred commented Dec 19, 2024

I'm not quite sure what the failing unit test has to do with these changes.

@eadred
Copy link
Contributor Author

eadred commented Dec 20, 2024

PR #21271 attempts to fix the unrelated data race test failures.

@eadred
Copy link
Contributor Author

eadred commented Jan 6, 2025

Hi @crenshaw-dev - would you be able to re-review this please?

@agaudreault agaudreault changed the title fix: 21219 Honour ARGOCD_APPLICATIONSET_CONTROLLER_NAMESPACES for all ApplicationSet events fix(appset): ApplicationSet events not honouring configured namespaces (#21219) Jan 13, 2025
@agaudreault agaudreault changed the title fix(appset): ApplicationSet events not honouring configured namespaces (#21219) fix(appset): events not honouring configured namespaces (#21219) Jan 13, 2025
Copy link
Member

@agaudreault agaudreault left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Please resolve conflicts, I think another PR also modified the predicated, so the merge might required more testing.

Signed-off-by: eadred <eadred77@googlemail.com>
@eadred
Copy link
Contributor Author

eadred commented Jan 14, 2025

@agaudreault I've merged. The conflicts were just because two new tests were trying to occupy the same space in the tests file. The predicate I've changed hasn't been modified on master since my branch was created - there's a new predicate, ignoreWhenAnnotationApplicationSetRefreshIsRemoved which has been added.

@eadred
Copy link
Contributor Author

eadred commented Jan 15, 2025

Also would it be possible for this fix to be cherry-picked to 2.13 please?

@crenshaw-dev crenshaw-dev merged commit e852142 into argoproj:master Jan 15, 2025
28 checks passed
@crenshaw-dev
Copy link
Member

/cherry-pick release-2.14

@crenshaw-dev
Copy link
Member

/cherry-pick release-2.13

Copy link

Cherry-pick failed with Merge error e852142fb9467d32cd580b633e744d34bd875adf into temp-cherry-pick-cc1f5b-release-2.14

Copy link

Cherry-pick failed with Merge error e852142fb9467d32cd580b633e744d34bd875adf into temp-cherry-pick-cc1f5b-release-2.13

@crenshaw-dev
Copy link
Member

crenshaw-dev commented Jan 15, 2025

@eadred can you open manual cherry-picks against 2.14, 2.13, 2.12, and 2.11 (or as far back as the bug exists within those supported releases)?

@eadred
Copy link
Contributor Author

eadred commented Jan 15, 2025

@crenshaw-dev This may be a stupid question, but do you just mean (for example for 2.14)?:

  • In my fork branch off the release-2.14 branch
  • Cherry-pick this fix onto that branch
  • Raise a PR with target branch release-2.14

Or is there some alternative process?

@eadred eadred deleted the 21219-fix branch January 15, 2025 17:53
@crenshaw-dev
Copy link
Member

@eadred that's basically it! Only caveat I'd add is that I'd create a new branch based off release-2.14 (etc.) before cherry-picking, just so you have a clean release-2.14 branch in case you need it again later.

eadred added a commit to eadred/argo-cd that referenced this pull request Jan 16, 2025
…) (argoproj#21241)

* fix: 21219 Honour ARGOCD_APPLICATIONSET_CONTROLLER_NAMESPACES for all ApplicationSet events

Namespace filtering is applied to Update, Delete and Generic events.

Fixes argoproj#21219

Signed-off-by: eadred <eadred77@googlemail.com>

* fix: 21219 Add tests for ignoreNotAllowedNamespaces

Signed-off-by: eadred <eadred77@googlemail.com>

* fix: 21219 Remove redundant package import

Signed-off-by: eadred <eadred77@googlemail.com>

---------

Signed-off-by: eadred <eadred77@googlemail.com>
eadred added a commit to eadred/argo-cd that referenced this pull request Jan 16, 2025
…) (argoproj#21241)

* fix: 21219 Honour ARGOCD_APPLICATIONSET_CONTROLLER_NAMESPACES for all ApplicationSet events

Namespace filtering is applied to Update, Delete and Generic events.

Fixes argoproj#21219

Signed-off-by: eadred <eadred77@googlemail.com>

* fix: 21219 Add tests for ignoreNotAllowedNamespaces

Signed-off-by: eadred <eadred77@googlemail.com>

* fix: 21219 Remove redundant package import

Signed-off-by: eadred <eadred77@googlemail.com>

---------

Signed-off-by: eadred <eadred77@googlemail.com>
eadred added a commit to eadred/argo-cd that referenced this pull request Jan 16, 2025
…) (argoproj#21241)

* fix: 21219 Honour ARGOCD_APPLICATIONSET_CONTROLLER_NAMESPACES for all ApplicationSet events

Namespace filtering is applied to Update, Delete and Generic events.

Fixes argoproj#21219

Signed-off-by: eadred <eadred77@googlemail.com>

* fix: 21219 Add tests for ignoreNotAllowedNamespaces

Signed-off-by: eadred <eadred77@googlemail.com>

* fix: 21219 Remove redundant package import

Signed-off-by: eadred <eadred77@googlemail.com>

---------

Signed-off-by: eadred <eadred77@googlemail.com>
eadred added a commit to eadred/argo-cd that referenced this pull request Jan 16, 2025
…) (argoproj#21241)

* fix: 21219 Honour ARGOCD_APPLICATIONSET_CONTROLLER_NAMESPACES for all ApplicationSet events

Namespace filtering is applied to Update, Delete and Generic events.

Fixes argoproj#21219

Signed-off-by: eadred <eadred77@googlemail.com>

* fix: 21219 Add tests for ignoreNotAllowedNamespaces

Signed-off-by: eadred <eadred77@googlemail.com>

* fix: 21219 Remove redundant package import

Signed-off-by: eadred <eadred77@googlemail.com>

---------

Signed-off-by: eadred <eadred77@googlemail.com>
@eadred
Copy link
Contributor Author

eadred commented Jan 16, 2025

@crenshaw-dev In all four of the cherry-pick PRs above the Check changes to generated code (pull_request) job is failing, but only because the logic in hack/update-manifests.sh (executed by codegen-local) isn't inferring IMAGE_TAG correctly, given my branch isn't called release-*. As a result all the appearances of the ArgoCD image tag in the generated Kubernetes manifests are showing diffs.

crenshaw-dev pushed a commit that referenced this pull request Jan 17, 2025
) (#21522)

* fix: 21219 Honour ARGOCD_APPLICATIONSET_CONTROLLER_NAMESPACES for all ApplicationSet events

Namespace filtering is applied to Update, Delete and Generic events.

Fixes #21219



* fix: 21219 Add tests for ignoreNotAllowedNamespaces



* fix: 21219 Remove redundant package import



---------

Signed-off-by: eadred <eadred77@googlemail.com>
crenshaw-dev pushed a commit that referenced this pull request Jan 17, 2025
) (#21521)

* fix: 21219 Honour ARGOCD_APPLICATIONSET_CONTROLLER_NAMESPACES for all ApplicationSet events

Namespace filtering is applied to Update, Delete and Generic events.

Fixes #21219



* fix: 21219 Add tests for ignoreNotAllowedNamespaces



* fix: 21219 Remove redundant package import



---------

Signed-off-by: eadred <eadred77@googlemail.com>
crenshaw-dev pushed a commit that referenced this pull request Jan 17, 2025
) (#21520)

* fix: 21219 Honour ARGOCD_APPLICATIONSET_CONTROLLER_NAMESPACES for all ApplicationSet events

Namespace filtering is applied to Update, Delete and Generic events.

Fixes #21219



* fix: 21219 Add tests for ignoreNotAllowedNamespaces



* fix: 21219 Remove redundant package import



---------

Signed-off-by: eadred <eadred77@googlemail.com>
crenshaw-dev pushed a commit that referenced this pull request Jan 17, 2025
) (#21519)

* fix: 21219 Honour ARGOCD_APPLICATIONSET_CONTROLLER_NAMESPACES for all ApplicationSet events

Namespace filtering is applied to Update, Delete and Generic events.

Fixes #21219



* fix: 21219 Add tests for ignoreNotAllowedNamespaces



* fix: 21219 Remove redundant package import



---------

Signed-off-by: eadred <eadred77@googlemail.com>
dudo pushed a commit to dudo/argo-cd that referenced this pull request Jan 18, 2025
…) (argoproj#21241)

* fix: 21219 Honour ARGOCD_APPLICATIONSET_CONTROLLER_NAMESPACES for all ApplicationSet events

Namespace filtering is applied to Update, Delete and Generic events.

Fixes argoproj#21219

Signed-off-by: eadred <eadred77@googlemail.com>

* fix: 21219 Add tests for ignoreNotAllowedNamespaces

Signed-off-by: eadred <eadred77@googlemail.com>

* fix: 21219 Remove redundant package import

Signed-off-by: eadred <eadred77@googlemail.com>

---------

Signed-off-by: eadred <eadred77@googlemail.com>
Signed-off-by: Brett C. Dudo <brett@dudo.io>
revitalbarletz pushed a commit to revitalbarletz/argo-cd that referenced this pull request Jan 20, 2025
…) (argoproj#21241)

* fix: 21219 Honour ARGOCD_APPLICATIONSET_CONTROLLER_NAMESPACES for all ApplicationSet events

Namespace filtering is applied to Update, Delete and Generic events.

Fixes argoproj#21219

Signed-off-by: eadred <eadred77@googlemail.com>

* fix: 21219 Add tests for ignoreNotAllowedNamespaces

Signed-off-by: eadred <eadred77@googlemail.com>

* fix: 21219 Remove redundant package import

Signed-off-by: eadred <eadred77@googlemail.com>

---------

Signed-off-by: eadred <eadred77@googlemail.com>
flbla pushed a commit to flbla/argo-cd that referenced this pull request Jan 20, 2025
…) (argoproj#21241)

* fix: 21219 Honour ARGOCD_APPLICATIONSET_CONTROLLER_NAMESPACES for all ApplicationSet events

Namespace filtering is applied to Update, Delete and Generic events.

Fixes argoproj#21219

Signed-off-by: eadred <eadred77@googlemail.com>

* fix: 21219 Add tests for ignoreNotAllowedNamespaces

Signed-off-by: eadred <eadred77@googlemail.com>

* fix: 21219 Remove redundant package import

Signed-off-by: eadred <eadred77@googlemail.com>

---------

Signed-off-by: eadred <eadred77@googlemail.com>
Signed-off-by: flbla <flbla@users.noreply.github.com>
vasilegroza pushed a commit to vasilegroza/argo-cd that referenced this pull request Feb 27, 2025
…) (argoproj#21241)

* fix: 21219 Honour ARGOCD_APPLICATIONSET_CONTROLLER_NAMESPACES for all ApplicationSet events

Namespace filtering is applied to Update, Delete and Generic events.

Fixes argoproj#21219

Signed-off-by: eadred <eadred77@googlemail.com>

* fix: 21219 Add tests for ignoreNotAllowedNamespaces

Signed-off-by: eadred <eadred77@googlemail.com>

* fix: 21219 Remove redundant package import

Signed-off-by: eadred <eadred77@googlemail.com>

---------

Signed-off-by: eadred <eadred77@googlemail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
4 participants