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, deployments] Promote Canary and Unhealthy Allocations in the deployment status panel #17547

Conversation

philrenaud
Copy link
Contributor

@philrenaud philrenaud commented Jun 15, 2023

This PR upgrades the importance of the "Promote Canary" functionality and adopts conventions around unhealthy allocations during a deployment.

A big side-effect here is the realization that allocation.deploymentStatus.Healthy isn't always just null or true; it can be false as well. This adds an explicit unhealthy status into the UI for when an allocation is running but fails its health checks.

Screenshots

Canary health being checked:
image

Canaries are running, but some have failed their health checks:
image

Some canaries have gone into a failed clientState:
image

Canaries have passed their health checks, require manual promotion:
image

Resolves #17525

@github-actions
Copy link

github-actions bot commented Jun 15, 2023

Ember Test Audit comparison

main 26db164 change
passes 1475 1473 -2
failures 0 2 +2
flaky 0 0 0
duration 11m 18s 517ms 000ms -11m 18s 517ms

@philrenaud philrenaud force-pushed the 17525-ui-promote-canary-should-be-inline-with-allocs-and-only-show-up-when-all-canaries-are-healthy branch from 1c131fd to 53d3b7c Compare June 15, 2023 18:05
@@ -39,6 +39,8 @@
<span class="alloc-health-indicator">
{{#if (eq @health "healthy")}}
<FlightIcon @name="check" @color="#25ba81" />
{{else if (eq @health "unhealthy")}}
<FlightIcon @name="x" @color="#c84034" />
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the little top-right-corner status indicator that shows up when enough of an alloc exist to summarize it in a "+N" block

@@ -19,6 +19,8 @@
<span class="alloc-health-indicator">
{{#if (eq @health "healthy")}}
<FlightIcon @name="check" @color="white" />
{{else if (eq @health "unhealthy")}}
<FlightIcon @name="x" @color="white" />
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the indicator for when an allocation is un-aggregated/summarized, in say a small enough cluster that each allocation gets its own square.

{{else}}
<Hds::Alert @type="inline" @color="highlight" as |A|>
<A.Title>Checking Canary health</A.Title>
{{#if this.deploymentIsAutoPromoted}}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

deploymentIsAutoPromoted is a new property for the UI, and slightly changes our messaging during the "checking your allocs' health" phase.

{{else}}
<FlightIcon @name="running" @color="black" class="not-animated" />
{{/if}}
</span>
</span>
{{count}} {{capitalize health}}
{{count}} {{humanize health}}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

humanize to drop the _ in health_unknown.

(in case you were wondering: we don't use unknown here because that has a dedicated orange colour associated on elements from "Node status unknown" / max client disconnect stuff.)

: alloc.isUnhealthy
? 'unhealthy'
: 'health_unknown'
: 'health_unknown';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not thrilled that I'm nesting a ternary here but it is only causing me mild discomfort

@@ -90,12 +110,14 @@
<span class="alloc-health-indicator">
{{#if (eq health "healthy")}}
<FlightIcon @name="check" @color="#25ba81" />
{{else if (eq health "unhealthy")}}
<FlightIcon @name="x" @color="black" />
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the change to the <legend> beneath the allocations themselves.

@philrenaud philrenaud force-pushed the 17525-ui-promote-canary-should-be-inline-with-allocs-and-only-show-up-when-all-canaries-are-healthy branch from 26db164 to 5804048 Compare June 16, 2023 17:09
@philrenaud philrenaud force-pushed the 17525-ui-promote-canary-should-be-inline-with-allocs-and-only-show-up-when-all-canaries-are-healthy branch from 4b6a224 to 8f62e7b Compare June 19, 2023 14:42
@philrenaud philrenaud force-pushed the 17525-ui-promote-canary-should-be-inline-with-allocs-and-only-show-up-when-all-canaries-are-healthy branch from 8f62e7b to ef8995f Compare June 19, 2023 15:07
@philrenaud philrenaud merged commit 94cb129 into main Jun 19, 2023
7 of 9 checks passed
@philrenaud philrenaud deleted the 17525-ui-promote-canary-should-be-inline-with-allocs-and-only-show-up-when-all-canaries-are-healthy branch June 19, 2023 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ui] "Promote Canary" should be inline with allocs, and only show up when all canaries are healthy
2 participants