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

Treeview bug fix: showing members from different subscriptions #1254

Merged
merged 1 commit into from
Feb 20, 2025

Conversation

JunyuQian
Copy link
Contributor

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.

image

Before this PR:

  • Cluster 1 was only displayed under Subscription 1 and not under Fleet 1 in Subscription 2.

With this PR:

  • Cluster 1 is now displayed under both Subscription 1 and Fleet 1 in Subscription 2.

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.

@Tatsinnit Tatsinnit added bug Something isn't working enhancement 🚀 New feature or request or improvements on existing code. labels Feb 17, 2025
@JunyuQian JunyuQian mentioned this pull request Feb 18, 2025
Copy link
Member

@Tatsinnit Tatsinnit left a 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.

@ReinierCC
Copy link
Collaborator

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

@tejhan
Copy link
Collaborator

tejhan commented Feb 20, 2025

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?

@ReinierCC
Copy link
Collaborator

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?

@tejhan
Copy link
Collaborator

tejhan commented Feb 20, 2025

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

Copy link
Collaborator

@tejhan tejhan left a 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 👍

@Tatsinnit Tatsinnit merged commit dc98cb8 into Azure:main Feb 20, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement 🚀 New feature or request or improvements on existing code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants