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

Evaluate MaintenancePreconditionsSatisfied constraint #918

Merged
merged 6 commits into from
Jan 19, 2021

Conversation

grolu
Copy link
Contributor

@grolu grolu commented Dec 18, 2020

What this PR does / why we need it:
We now show warnings for the Maintenance and Hibernation Constraint Checks.

Screen Shot 2020-12-22 at 18 23 18

Screen Shot 2020-12-22 at 18 23 09

Which issue(s) this PR fixes:
Fixes #893

Special notes for your reviewer:

Release note:

The `MaintenancePreconditionsSatisfied` constraint is now evaluated and the Dashboard shows a warning on cluster list and cluster details pages, if it is not safe for a cluster to trigger maintenance
In addition to the warning on the hibernation schedule configuration popup, the `HibernationPossible` constraint is now evaluated and the Dashboard shows a warning on cluster list and cluster details pages if the hibernation schedules might not be executed

@gardener-robot gardener-robot added needs/review Needs review size/xs Size of pull request is tiny (see gardener-robot robot/bots/size.py) labels Dec 18, 2020
@gardener-robot-ci-2 gardener-robot-ci-2 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Dec 18, 2020
@gardener-robot-ci-3 gardener-robot-ci-3 added needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Dec 18, 2020
@petersutter
Copy link
Contributor

Should we disable the action or instead show a warning?
cc @rfranzke

@rfranzke
Copy link
Member

Only show the warning

@gardener-robot gardener-robot added reviewed/lgtm Has approval for merging and removed needs/review Needs review labels Dec 18, 2020
@grolu
Copy link
Contributor Author

grolu commented Dec 21, 2020

@rfranzke does Gardener still trigger the automatic maintenance in case the precondition is not satisfied?

@grolu
Copy link
Contributor Author

grolu commented Dec 22, 2020

According to gardener/gardener#3122 (comment) it seems that maintenance is performed anyway, so we need to think of a way to show this information more prominent, not only on the dialogs.

@gardener-robot gardener-robot added size/m Size of pull request is medium (see gardener-robot robot/bots/size.py) and removed size/xs Size of pull request is tiny (see gardener-robot robot/bots/size.py) labels Dec 22, 2020
@gardener-robot-ci-1 gardener-robot-ci-1 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Dec 22, 2020
@gardener-robot-ci-3 gardener-robot-ci-3 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Dec 22, 2020
@grolu grolu marked this pull request as draft January 4, 2021 09:47
@holgerkoser holgerkoser removed the reviewed/lgtm Has approval for merging label Jan 4, 2021
@grolu grolu marked this pull request as ready for review January 4, 2021 11:18
-->

<template>
<div v-if="!isMaintenancePreconditionSatisfied" :class="{ 'd-flex' : icon }">
Copy link
Contributor

Choose a reason for hiding this comment

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

The v-if="!isMaintenancePreconditionSatisfied" should be outside of the component. If the visibility of the component is controlled via a property it should follow the pattern of the toggleable mixin.

Copy link
Contributor

Choose a reason for hiding this comment

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

Do we really need the flexbox container in case of an icon?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

flex box does vertical align the icon so that it matches the layout of other icons / texts in the same line

-->

<template>
<div v-if="!isHibernationPossible && hasHibernationSchedules" :class="{ 'd-flex' : icon }">
Copy link
Contributor

Choose a reason for hiding this comment

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

The v-if="!isHibernationPossible && hasHibernationSchedules" should be outside of the component. If the visibility of the component is controlled via a property it should follow the pattern of the toggleable mixin.

Copy link
Contributor

Choose a reason for hiding this comment

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

Do we really need the flexbox container in case of an icon?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done


<script>
export default {
name: 'maintenanceConstraintWarning',
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
name: 'maintenanceConstraintWarning',
name: 'MaintenanceConstraintWarning',

Copy link
Contributor

Choose a reason for hiding this comment

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

Component Names are kebab-case or PascalCase https://vuejs.org/v2/guide/components-registration.html#Name-Casing

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 will fix this with a separate PR for all cases where we use camel case instead of kebab case


<script>
export default {
name: 'hibernationConstraintWarning',
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
name: 'hibernationConstraintWarning',
name: 'HibernationConstraintWarning',

Copy link
Contributor

Choose a reason for hiding this comment

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

Component Names are kebab-case or PascalCase https://vuejs.org/v2/guide/components-registration.html#Name-Casing

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 will fix this with a separate PR for all cases where we use camel case instead of kebab case

@gardener-robot-ci-2 gardener-robot-ci-2 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Jan 7, 2021
@gardener-robot-ci-1 gardener-robot-ci-1 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Jan 7, 2021
value: {
type: Boolean
},
constraintType: {
Copy link
Contributor

Choose a reason for hiding this comment

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

The name of the component ist ConstraintWarning. Why do we repeat the word constraint but warning in the property names. I would use type and message. Or better use a default slot for the message.

@gardener-robot-ci-3 gardener-robot-ci-3 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Jan 11, 2021
@gardener-robot-ci-2 gardener-robot-ci-2 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Jan 11, 2021
@gardener-robot-ci-3 gardener-robot-ci-3 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Jan 11, 2021
Copy link
Contributor

@holgerkoser holgerkoser left a comment

Choose a reason for hiding this comment

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

/lgtm

@gardener-robot gardener-robot added the reviewed/lgtm Has approval for merging label Jan 12, 2021
Copy link
Contributor

@petersutter petersutter left a comment

Choose a reason for hiding this comment

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

/lgtm

# Conflicts:
#	frontend/src/components/ShootListRow.vue
@gardener-robot gardener-robot added needs/rebase Needs git rebase and removed reviewed/lgtm Has approval for merging labels Jan 19, 2021
@gardener-robot-ci-3 gardener-robot-ci-3 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Jan 19, 2021
@grolu grolu merged commit e2e926e into master Jan 19, 2021
@petersutter petersutter deleted the enh/MaintenancePreconditionsSatisfied branch January 28, 2021 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) needs/rebase Needs git rebase reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) size/m Size of pull request is medium (see gardener-robot robot/bots/size.py)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Evaluate / Show MaintenancePreconditionsSatisfied shoot constraint
8 participants