Skip to content

fix(atlas-service): generate correct Atlas URLs for Flex clusters COMPASS-10438#7821

Open
syn-zhu wants to merge 1 commit intomainfrom
COMPASS-10438/fix-flex-cluster-urls
Open

fix(atlas-service): generate correct Atlas URLs for Flex clusters COMPASS-10438#7821
syn-zhu wants to merge 1 commit intomainfrom
COMPASS-10438/fix-flex-cluster-urls

Conversation

@syn-zhu
Copy link
Collaborator

@syn-zhu syn-zhu commented Feb 25, 2026

Summary

  • Fix URL builder functions in packages/atlas-service/src/url-builders.ts to generate correct URLs for Flex clusters
  • Flex clusters use #/flex/<section>/<clusterName> instead of #/host/{metricsType}/{metricsId}
  • Updated buildPerformanceMetricsUrl, buildMonitoringUrl, buildClusterOverviewUrl, and buildQueryInsightsUrl

Jira

COMPASS-10438

Test plan

  • Verify that non-flex cluster URLs remain unchanged
  • Verify flex cluster monitoring URL resolves to #/flex/monitoring/<clusterName>
  • Verify flex cluster realtime URL resolves to #/flex/realtime/<clusterName>
  • Verify flex cluster overview URL resolves to #/flex/detail/<clusterName>
  • Verify flex cluster query insights URL resolves to #/flex/queryInsights/<clusterName>

🤖 Generated with Claude Code

…PASS-10438

The URL builder functions were using the generic `#/host/{metricsType}/{metricsId}`
pattern for all cluster types, producing broken URLs for Flex clusters. Flex
clusters use a `#/flex/<section>/<clusterName>` format instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes URL generation for Atlas Flex clusters in Compass. Flex clusters require a different URL pattern (#/flex/<section>/<clusterName>) compared to traditional clusters that use #/host/<metricsType>/<metricsId> or #/metrics/<metricsType>/<metricsId>. The changes ensure that when users click on monitoring, performance metrics, cluster overview, or query insights links for flex clusters, they are directed to the correct Atlas UI pages.

Changes:

  • Added flex cluster support to four URL builder functions: buildPerformanceMetricsUrl, buildMonitoringUrl, buildClusterOverviewUrl, and buildQueryInsightsUrl
  • Each function now checks if metricsType === 'flex' and generates the appropriate flex-specific URL format
  • Updated function parameters to include clusterName and metricsType where needed

Copy link
Collaborator

@gribnoysup gribnoysup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add some tests so that this doesn't regress

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants