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

fix(ecs): add application name filter to findCluster #5168

Merged
merged 1 commit into from
Dec 21, 2020

Conversation

piradeepk
Copy link
Contributor

@piradeepk piradeepk commented Dec 21, 2020

As a part of the Moniker PR, logic was removed that enabled filtering on the App name. This allowed the server group info to be returned quickly. In release 1.24.0, users have been seeing timeouts, and this change will look to add back the previously removed application filter.

Current 1.24.0 Release Experience: Users with large amounts of AWS resources (such as services, task definitions, and tasks) are starting to see their server group/clusters view timing out with errors.

Testing done: As this is a performance improvement, it is difficult to add unit tests (load tests would be the best to test this scenario).

  • Manually tested it against my test stack. I'm not seeing any regression, and verified that the new Application filter (using Monikers) and the old Application filter (inferring from Server Group Name) are both returning the same value.

Closes: spinnaker/spinnaker#6245

@piradeepk
Copy link
Contributor Author

@deverton would love your eyes on this 😄

clusterMap = findClusters(clusterMap, credentials);
Moniker moniker = MonikerHelper.applicationNameToMoniker(serverGroupName);
log.info("App Name is: " + moniker.getApp());
clusterMap = findClusters(clusterMap, credentials, moniker.getApp());
Copy link
Contributor

Choose a reason for hiding this comment

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

There used to be a to do here

//  TODO - remove the application filter

Not sure the reason it was there, but maybe worth restoring that as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Based on what we're seeing in the current release, I'm a bit hesitant on adding that TODO back

// Can't filter by application as there's not enough information in the serverGroupName
clusterMap = findClusters(clusterMap, credentials);
Moniker moniker = MonikerHelper.applicationNameToMoniker(serverGroupName);
log.info("App Name is: " + moniker.getApp());
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be debug level at most?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch! Updated!

Copy link
Contributor

@deverton deverton left a comment

Choose a reason for hiding this comment

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

The server group name format doesn't change between the naming strategies. It's always constructed as app-stack-detail-v000 so this code should be equivalent to the previous String application = StringUtils.substringBefore(serverGroupName, "-");

@piradeepk piradeepk added the backport-candidate Add to PRs to designate release branch patch candidates. label Dec 21, 2020
@piradeepk
Copy link
Contributor Author

Note to the release manager: This is a regression as it makes Spinnaker unusable for power users with a large number of resources.

Copy link
Contributor

@allisaurus allisaurus left a comment

Choose a reason for hiding this comment

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

🚀 @piradeepk @deverton you are awesome thank you for jumping on this!

@piradeepk piradeepk added the ready to merge Approved and ready for a merge label Dec 21, 2020
@mergify mergify bot merged commit d43a0ea into spinnaker:master Dec 21, 2020
@mergify mergify bot added the auto merged Merged automatically by a bot label Dec 21, 2020
@fieldju
Copy link
Contributor

fieldju commented Dec 21, 2020

@Mergifyio backport release-1.24.x

mergify bot pushed a commit that referenced this pull request Dec 21, 2020
@mergify
Copy link
Contributor

mergify bot commented Dec 21, 2020

Command backport release-1.24.x: success

Backports have been created

fieldju pushed a commit that referenced this pull request Dec 21, 2020
(cherry picked from commit d43a0ea)

Co-authored-by: Piradeep Kandasamy <44981951+piradeepk@users.noreply.github.com>
@fieldju fieldju removed the backport-candidate Add to PRs to designate release branch patch candidates. label Dec 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto merged Merged automatically by a bot ready to merge Approved and ready for a merge target-release/1.25
Projects
None yet
Development

Successfully merging this pull request may close these issues.

clouddriver-ecs: regression with 1.24.0 - broken
5 participants