This repository was archived by the owner on Dec 20, 2025. It is now read-only.
fix(core): Always use clusters parameter for ECS server group URLs (backport #10171)#10175
Merged
edgarulg merged 1 commit intorelease-1.36.xfrom Apr 21, 2025
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fix ECS Server Group URLs When onDemandClusterThreshold is Exceeded
Problem
When viewing ECS server groups in Spinnaker and the
onDemandClusterThresholdis exceeded, the generated URLs fail to navigate to the correct server group. This happens because:clustersparameter for server group navigationq,acct, andregparameters which don't work properly for ECS when on-demand caching is disabledThis results in broken links for ECS server groups in the UI when the number of caches exceeds the threshold.
Solution
This PR modifies the
ServerGroupsUrlBuilder.buildmethod to use a different URL format specifically for ECS server groups:// For ECS provider, use clusters parameter format
if (input.provider === 'ecs' || (input.provider && input.provider.includes('ecs'))) {
// Extract cluster name from server group name (remove version suffix)
const serverGroupParts = input.serverGroup.split('-');
let clusterName = input.serverGroup;
if (serverGroupParts.length > 1 && serverGroupParts[serverGroupParts.length - 1].match(/^v\d+$/)) {
clusterName = serverGroupParts.slice(0, -1).join('-');
}
// Use clusters parameter with account:clusterName format
return UrlBuilderUtils.buildUrl(href, { clusters:
${input.account}:${clusterName}});}
// For other providers, use standard parameters
return UrlBuilderUtils.buildUrl(href, { q: input.serverGroup, acct: input.account, reg: input.region });
Testing
Testing was performed in an environment where the
onDemandClusterThresholdwas exceeded.Before the fix:
URL: /#/applications/myapp/serverGroups?q=my-ecs-service-v001&acct=my-account®=us-west-2
Result: Empty view, no server group details displayed
After the fix:
URL: /#/applications/myapp/serverGroups?clusters=my-account:my-ecs-service
Result: Successfully displays the ECS server group details
The fix has been verified with various ECS server group naming patterns, including those with and without version suffixes.
Impact
This change:
onDemandClusterThresholdis exceededThis is an automatic backport of pull request fix(core): Always use clusters parameter for ECS server group URLs #10171 done by Mergify.