fix: calculateClusterPath #3177
Merged
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.
Greptile Overview
Greptile Summary
This PR fixes URL generation in
calculateClusterPathfor clusters that have an externalclusterDomainconfigured. Previously, when generating links to external cluster domains, the function incorrectly included the current instance'sbackendquery parameter andenvironmentpath parameter. This would cause the target domain to receive irrelevant configuration from the source instance.Key changes:
clusterDomainis set,environmentparam is now omitted (was always usingsettings?.auth_service)clusterDomainis set,backendquery param is now omitted (was always usingbackend)This is a follow-up fix to the recent
cluster_domainsupport (#3158) andcluster_external_namefeature (#3174), ensuring that external cluster links are clean and don't carry over the current instance's configuration.Confidence Score: 5/5
Important Files Changed
File Analysis
backendandenvironmentparameters whenclusterDomainis present.Sequence Diagram
sequenceDiagram participant User participant ClustersList as Clusters List UI participant calculateClusterPath as calculateClusterPath() participant getClusterPath as getClusterPath() participant ExternalDomain as External Cluster Domain User->>ClustersList: Click cluster link ClustersList->>calculateClusterPath: row (with clusterDomain) alt clusterDomain exists calculateClusterPath->>getClusterPath: environment=undefined, backend=undefined, domain=clusterDomain getClusterPath-->>calculateClusterPath: https://external-domain.com/cluster else no clusterDomain calculateClusterPath->>getClusterPath: environment=auth_service, backend=backend getClusterPath-->>calculateClusterPath: /env/cluster?backend=... end calculateClusterPath-->>ClustersList: Cluster URL ClustersList->>ExternalDomain: Navigate (if external)CI Results
Test Status:⚠️ FLAKY
📊 Full Report
Test Changes Summary ⏭️2
⏭️ Skipped Tests (2)
Bundle Size: ✅
Current: 62.34 MB | Main: 62.34 MB
Diff: +0.11 KB (0.00%)
✅ Bundle size unchanged.
ℹ️ CI Information