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] Adding canary_tags the web UI #15458

Merged

Conversation

philrenaud
Copy link
Contributor

@philrenaud philrenaud commented Dec 2, 2022

Appending, with a custom style, to anyplace we show service tags:

image
image
image

Resolves #13018

@philrenaud philrenaud self-assigned this Dec 2, 2022
@philrenaud philrenaud linked an issue Dec 2, 2022 that may be closed by this pull request
@philrenaud philrenaud force-pushed the 13018-canary_tags-are-not-shown-in-ui-when-instance-is-canary branch from ea66523 to 66f3131 Compare December 2, 2022 21:15
@github-actions
Copy link

github-actions bot commented Dec 2, 2022

Ember Asset Size action

As of b2d7c3c

Files that got Bigger 🚨:

File raw gzip
nomad-ui.js +209 B +46 B
nomad-ui.css +174 B +53 B

Files that stayed the same size 🤷‍:

File raw gzip
vendor.js 0 B 0 B
vendor.css 0 B 0 B

@github-actions
Copy link

github-actions bot commented Dec 2, 2022

Ember Test Audit comparison

main b2d7c3c change
passes 1435 1435 0
failures 0 1 +1
flaky 0 0 0
duration 10m 18s 779ms 000ms -10m 18s 779ms

Comment on lines 181 to 182
&:before {
content: "Canary";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fun CSS trick to add copy to an element without adding it in the template itself.

Comment on lines 97 to 99
{{#each @service.canary_tags as |tag|}}
<span class="tag canary is-service">{{tag}}</span>
{{/each}}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Rather than make these their own conditional table column, decided to append them to the end of the rest of the tags on a service, should they exist.

Copy link
Contributor

@lgfa29 lgfa29 left a comment

Choose a reason for hiding this comment

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

Minor comments, but LGTM.

I wonder if it would be possible to apply the correct set of tags instead of always displaying them all depending on the allocation deployment status:

$ nomad operator api /v1/allocations | jq '.[].DeploymentStatus'
{
  "Canary": false,
  "Healthy": true,
  "ModifyIndex": 24,
  "Timestamp": "2022-12-05T15:32:23.764038-03:00"
}
{
  "Canary": true,
  "Healthy": true,
  "ModifyIndex": 35,
  "Timestamp": "2022-12-05T15:33:13.774562-03:00"
}

So the canary_tags would only show for canary allocs, and the tags would show for non-canary.

ui/app/styles/components/services.scss Outdated Show resolved Hide resolved
ui/app/components/allocation-service-sidebar.hbs Outdated Show resolved Hide resolved
ui/app/templates/components/job-service-row.hbs Outdated Show resolved Hide resolved
@philrenaud
Copy link
Contributor Author

I wonder if it would be possible to apply the correct set of tags instead of always displaying them all depending on the allocation deployment status:

@lgfa29 I was thinking about this, but figured it might be worthwhile to say something like "... and if this alloc is ever in a canary state, these are the tags it would have", as the canary state might be short-lived and fleeting.

@philrenaud philrenaud added the backport/1.4.x backport to 1.4.x release line label Dec 5, 2022
@philrenaud philrenaud merged commit 097e65a into main Dec 5, 2022
@philrenaud philrenaud deleted the 13018-canary_tags-are-not-shown-in-ui-when-instance-is-canary branch December 5, 2022 19:50
@lgfa29
Copy link
Contributor

lgfa29 commented Dec 5, 2022

as the canary state might be short-lived and fleeting.

I think the use of canary_tags is usually associated with manual promotion after validating the changes are correct, so I would imagine they are not as short-lived. But it would be a big lift to parse that API response, so just something to maybe consider in the future 👍

@github-actions
Copy link

github-actions bot commented Apr 5, 2023

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/1.4.x backport to 1.4.x release line
Projects
None yet
Development

Successfully merging this pull request may close these issues.

canary_tags are not shown in ui when instance is canary
2 participants