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(server): not need send application if it is not under enabled namespaces #14479

Merged

Conversation

pasha-codefresh
Copy link
Member

I have installed two argocd instances , and in one of them i can see applications that not part of enabled namespaces list.

Снимок экрана 2023-07-12 в 18 37 50

This is response from application watch api
Снимок экрана 2023-07-12 в 18 37 56

@codecov
Copy link

codecov bot commented Jul 12, 2023

Codecov Report

Patch coverage: 68.18% and project coverage change: -0.02 ⚠️

Comparison is base (4bd8b07) 49.79% compared to head (333724d) 49.77%.

❗ Current head 333724d differs from pull request most recent head ac35891. Consider uploading reports for the commit ac35891 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #14479      +/-   ##
==========================================
- Coverage   49.79%   49.77%   -0.02%     
==========================================
  Files         261      261              
  Lines       44751    44763      +12     
==========================================
  Hits        22283    22283              
- Misses      20274    20288      +14     
+ Partials     2194     2192       -2     
Impacted Files Coverage Δ
server/application/application.go 50.48% <68.18%> (-0.28%) ⬇️

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@crenshaw-dev
Copy link
Collaborator

Can you add a unit test to cover this? Might be tricky since it's a Watch endpoint. If so, you could probably pull the allowed function out and test it.

@pasha-codefresh
Copy link
Member Author

Definitely

@pasha-codefresh
Copy link
Member Author

@crenshaw-dev done

@crenshaw-dev crenshaw-dev changed the title fix: not need send application if it is not under enabled namespaces fix(server): not need send application if it is not under enabled namespaces Jul 13, 2023
@pasha-codefresh
Copy link
Member Author

@crenshaw-dev could you please review again?

@crenshaw-dev
Copy link
Collaborator

/cherry-pick release-2.8

@crenshaw-dev
Copy link
Collaborator

/cherry-pick release-2.7

@crenshaw-dev
Copy link
Collaborator

/cherry-pick release-2.6

@crenshaw-dev
Copy link
Collaborator

/cherry-pick release-2.5

@crenshaw-dev crenshaw-dev merged commit 2094404 into argoproj:master Jul 18, 2023
23 checks passed
gcp-cherry-pick-bot bot pushed a commit that referenced this pull request Jul 18, 2023
…espaces (#14479)

* fix: not need send application if it is not under enabled namespaces

* fix condition

* feat: Move application is permitted outside of watch function and cover with unit tests

* feat: Move application is permitted outside of watch function and cover with unit tests
@gcp-cherry-pick-bot
Copy link

Cherry-pick failed with Merge error 2094404e0bdb759aaa8fd11be98ba2dacbf206f4 into temp-cherry-pick-7f2e96-release-2.7

@gcp-cherry-pick-bot
Copy link

Cherry-pick failed with Merge error 2094404e0bdb759aaa8fd11be98ba2dacbf206f4 into temp-cherry-pick-7f2e96-release-2.6

@gcp-cherry-pick-bot
Copy link

Cherry-pick failed with Merge error 2094404e0bdb759aaa8fd11be98ba2dacbf206f4 into temp-cherry-pick-7f2e96-release-2.5

@crenshaw-dev
Copy link
Collaborator

@pasha-codefresh would you mind opening cherry-pick PRs for release-2.5 through release-2.7?

crenshaw-dev pushed a commit that referenced this pull request Jul 18, 2023
…espaces (#14479) (#14575)

* fix: not need send application if it is not under enabled namespaces

* fix condition

* feat: Move application is permitted outside of watch function and cover with unit tests

* feat: Move application is permitted outside of watch function and cover with unit tests

Co-authored-by: pasha-codefresh <pavel@codefresh.io>
@pasha-codefresh
Copy link
Member Author

I am not sure how to do it :(

@crenshaw-dev
Copy link
Collaborator

@pasha-codefresh something like this:

git checkout release-2.7
git pull
git checkout -b release-2.7-ns-fix
git cherry-pick 2094404e0bdb759aaa8fd11be98ba2dacbf206f4
# resolve conflicts if necessary
git push  # and then open a PR against release-2.7

And then repeat for release-2.6 and release-2.5. It's tedious. :-)

yyzxw pushed a commit to yyzxw/argo-cd that referenced this pull request Aug 9, 2023
…espaces (argoproj#14479)

* fix: not need send application if it is not under enabled namespaces

* fix condition

* feat: Move application is permitted outside of watch function and cover with unit tests

* feat: Move application is permitted outside of watch function and cover with unit tests
@suzaku suzaku mentioned this pull request Aug 15, 2023
jannfis pushed a commit to jannfis/argo-cd that referenced this pull request Sep 12, 2023
…espaces (argoproj#14479)

* fix: not need send application if it is not under enabled namespaces

* fix condition

* feat: Move application is permitted outside of watch function and cover with unit tests

* feat: Move application is permitted outside of watch function and cover with unit tests
jannfis added a commit that referenced this pull request Sep 12, 2023
…espaces (#14479) (#15474)

* fix: not need send application if it is not under enabled namespaces

* fix condition

* feat: Move application is permitted outside of watch function and cover with unit tests

* feat: Move application is permitted outside of watch function and cover with unit tests

Co-authored-by: pasha-codefresh <pavel@codefresh.io>
tesla59 pushed a commit to tesla59/argo-cd that referenced this pull request Dec 16, 2023
…espaces (argoproj#14479)

* fix: not need send application if it is not under enabled namespaces

* fix condition

* feat: Move application is permitted outside of watch function and cover with unit tests

* feat: Move application is permitted outside of watch function and cover with unit tests
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.

None yet

4 participants