-
Notifications
You must be signed in to change notification settings - Fork 56
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
Treeview bug fix: showing members from different subscriptions #1254
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 ❤️ Looks good to me, I will test this sometime in an hour and report back. gentle fyi to @tejhan , @ReinierCC or @hsubramanianaks + @qpetraroia for quick test please.
After testing I'm able to accomplish case 1 where the cluster comes from a different subscription group but I'm unable to accomplish case 2. After adding two clusters in the same subscription as the fleet I'm unable to get them to pop up under the fleet. Waited around ~10 minutes and multiple restarts. Could we get a second test on this? @tejhan @hsubramanianaks |
Interesting, I just tested it out myself & it worked as intended. I'm able to get case 1 & case 2, with clusters from both inside & outside the subscription showing up. Maybe it has to do with the subscriptions being used? |
Ahhh true. I think there was mentioning of having to onboard the subscription for something fleet related. Could you share the specific subscription to try it on my end? |
Yep, I created the fleet & initial cluster in "Azure Container Service - Test (AKS Standalone)" sub, & created outside cluster in "Azure Container Service - Test - 2 (AKS Standalone)" sub |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both cases worked as intended in my subscriptions 👍
This PR resolves the issue where member clusters from different subscriptions were not displayed as part of the Fleet (case 1 was not correct). The Treeview now accurately displays clusters and Fleets following the rules illustrated in the picture below.
Before this PR:
With this PR:
What is the issue?
Previously, the cluster filter applied to all member clusters within a Fleet, regardless of their subscription. However, the cluster filter only includes clusters within the current subscription. As a result, member clusters from other subscriptions were always filtered out, preventing users from seeing them under the Fleet.
How is it fixed?
The solution involves adding an if statement before applying the filter. The logic is: if a member cluster is from another subscription, it is added to the treeview immediately before the filter is applied.