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(amazon/pipeline): sort list of available bake regions #7472

Merged
merged 2 commits into from
Oct 2, 2019

Conversation

erikmunson
Copy link
Member

We typically sort the list of available regions in stage configs (e.g. AccountRegionClusterSelector), but we don't in the AWS bake stage. This is not only somewhat confusing (we've observed people accidentally select the wrong regions because they were relying on order rather than reading the region name), it also has the side effect of making pipeline JSON 'different' from it's saved state if the API decides to return a different ordering for some reason.

That very thing seems to have happened with some of our internal users, who noticed a prompt to save because the order our checklist component used stopped matching the saved JSON ordering, resulting in a diff (even though the same regions were selected).

This PR does two small things:

  • Enforce a client side sort
  • Change the way we use application.defaultRegions from treating it like an array (it's not) to treating it like a map of region strings -> region metadata (which is what it actually is). I guess nobody on AWS actually uses that feature?

@erikmunson erikmunson merged commit f957d42 into spinnaker:master Oct 2, 2019
@erikmunson erikmunson deleted the sort-bake-regions branch October 2, 2019 05:30
Jammy-Louie pushed a commit to pivotal/deck that referenced this pull request Oct 2, 2019
christopherthielen added a commit to christopherthielen/deck that referenced this pull request Oct 7, 2019
980581a feat(amazon/serverGroup): add AmazonMQ CloudWatch namespace (spinnaker#7489)
3c08b38 feat(core/presentation): Migrate ValidationMessage to new CSS styles (spinnaker#7481)
f957d42 fix(amazon/pipeline): sort list of available bake regions (spinnaker#7472)
christopherthielen added a commit that referenced this pull request Oct 7, 2019
980581a feat(amazon/serverGroup): add AmazonMQ CloudWatch namespace (#7489)
3c08b38 feat(core/presentation): Migrate ValidationMessage to new CSS styles (#7481)
f957d42 fix(amazon/pipeline): sort list of available bake regions (#7472)
yunzhangit pushed a commit to yunzhangit/deck that referenced this pull request Mar 28, 2021
yunzhangit pushed a commit to yunzhangit/deck that referenced this pull request Mar 28, 2021
980581a feat(amazon/serverGroup): add AmazonMQ CloudWatch namespace (spinnaker#7489)
3c08b38 feat(core/presentation): Migrate ValidationMessage to new CSS styles (spinnaker#7481)
f957d42 fix(amazon/pipeline): sort list of available bake regions (spinnaker#7472)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants