fix: Project filter not applied to changed apps from other projs (#9651) #9700
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Keith Chong kykchong@redhat.com
Fixes #9651
Notes:
The app changes are being sent to the UI.
Consider:
--> When the app2 is 'modified' or changed, the application list does not contain app2, so the index is -1. Therefore the app is added to the list via the call to
unshift
(SeeloadApplications
in applications-list.tsx)The fix then prevents the app from being added because the project filter has been enabled and the app's project is not in the filter.
Secondly, from the another browser window, create a new app3 in project1
--> app3 should show up in the original Argo CD instance, because app3's project is in the project filter.
Repeat the above steps with and without the fix, to verify this PR.
Note, from the application service, it looks like in
sendIfPermitted
, the intention was to not send the change event and application to the UI if the app's project is not part of the filter? Apparently, the UI is still receiving these events. Perhaps someone can look into that -- I could not see off-hand why. In the meantime, this could be a UI-only fix for this issue.Note on DCO:
If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the Details link next to the DCO action for instructions on how to resolve this.
Checklist: