Skip to content

Commit

Permalink
fix: make WatchResourceTree use namespaced cache key (#15258) (#15523)
Browse files Browse the repository at this point in the history
* fix: make WatchResourceTree use namespaced application cache key



* chore: add PGS to USERS.md



---------

Signed-off-by: Torbjørn Fjørtoft <[email protected]>
Co-authored-by: Torbjørn Fjørtoft <[email protected]>
  • Loading branch information
gcp-cherry-pick-bot[bot] and torfjor authored Sep 15, 2023
1 parent 257be07 commit 3cc00d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions USERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ Currently, the following organizations are **officially** using Argo CD:
1. [Patreon](https://www.patreon.com/)
1. [PayPay](https://paypay.ne.jp/)
1. [Peloton Interactive](https://www.onepeloton.com/)
1. [PGS](https://www.pgs.com)
1. [Pigment](https://www.gopigment.com/)
1. [Pipefy](https://www.pipefy.com/)
1. [Pismo](https://pismo.io/)
Expand Down
5 changes: 3 additions & 2 deletions server/application/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -1339,9 +1339,10 @@ func (s *Server) WatchResourceTree(q *application.ResourcesQuery, ws application
return err
}

return s.cache.OnAppResourcesTreeChanged(ws.Context(), q.GetApplicationName(), func() error {
cacheKey := argo.AppInstanceName(q.GetApplicationName(), q.GetAppNamespace(), s.ns)
return s.cache.OnAppResourcesTreeChanged(ws.Context(), cacheKey, func() error {
var tree appv1.ApplicationTree
err := s.cache.GetAppResourcesTree(q.GetApplicationName(), &tree)
err := s.cache.GetAppResourcesTree(cacheKey, &tree)
if err != nil {
return fmt.Errorf("error getting app resource tree: %w", err)
}
Expand Down

0 comments on commit 3cc00d2

Please sign in to comment.