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

ui: Change the URL prefix of partitions from - to _ #11801

Merged
merged 2 commits into from
Dec 13, 2021

Conversation

johncowen
Copy link
Contributor

@johncowen johncowen commented Dec 10, 2021

We currently use special non-DNS permitted prefixes to detect the URL segments for partitions and namespace in order to keep our URLs as backwards compatible as possible whilst avoiding the use of query parameters ? for identifying completely different sets of data (as opposed to different views of the same data, which is what we mostly use query params for). For example our URLs can look like any of the following:

  • /ui/datacenter-name/services/service-name
  • /ui/~namespace-name/datacenter-name/services/service-name
  • /ui/-partition-name/~namespace-name/datacenter-name/services/service-name

We decided to change the nicer looking - to a _ for the less common partition segment in order to keep the nicer - for other potentially more common purposes.

TLDR; This PR changes the last URL in the above examples to:

  • /ui/_partition-name/~namespace-name/datacenter-name/services/service-name

There are only a handful of places in the UI where need to change this as its almost all managed in the custom Ember Location we use for our "optional" URL segments, but in order to double check I did a search across the codebase for ~, which whilst we aren't changing ~ brought up all the areas where we do anything to do with these special prefix characters.

@johncowen johncowen added theme/ui Anything related to the UI backport/1.11 labels Dec 10, 2021
@johncowen johncowen added this to the 1.11.0 milestone Dec 10, 2021
@vercel vercel bot temporarily deployed to Preview – consul-ui-staging December 13, 2021 10:47 Inactive
@vercel vercel bot temporarily deployed to Preview – consul December 13, 2021 10:47 Inactive
Copy link
Collaborator

@jgwhite jgwhite left a comment

Choose a reason for hiding this comment

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

Looks good. General praise: this solution to URL nesting/namespacing is very inventive! I like it a lot.

Copy link
Contributor

@msiege2 msiege2 left a comment

Choose a reason for hiding this comment

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

Approving as review has taken place with non-approving reviewer.

@johncowen johncowen merged commit 79b2590 into main Dec 13, 2021
@johncowen johncowen deleted the ui/feature/partition-prefix-change branch December 13, 2021 15:39
@hc-github-team-consul-core
Copy link
Contributor

🍒 If backport labels were added before merging, cherry-picking will start automatically.

To retroactively trigger a backport after merging, add backport labels and re-run https://circleci.com/gh/hashicorp/consul/525836.

@hc-github-team-consul-core
Copy link
Contributor

🍒✅ Cherry pick of commit 79b2590 onto release/1.11.x succeeded!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/ui Anything related to the UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants