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

feat(core/managed): add Managed Resources section to app config, allow opting out #7409

Merged
merged 5 commits into from
Sep 18, 2019

Conversation

erikmunson
Copy link
Member

depends on spinnaker/gate#898

This adds a new, feature flagged "Managed Resources" section to the app config, which initially supports one thing — 'pausing' management of resources through our new veto concept. The section only shows up if two things are true:

  • you have feature.managedResources turned on
  • your app specifically has resources managed by keel

This is slightly awkward because it means that if you do have managed resources, that app config section 'pops' in async. In my experience it's not an issue and the plan is to do a more static configuration (where you always see the section if the feature flag is on) once this is less experimental.

active:
active

paused:
paused

cc @emjburns @robfletcher @asher @gcomstock

@spinnakerbot
Copy link
Contributor

The following commits need their title changed:

  • 8697a76: feature flagging, error states, more tweaks

Please format your commit title into the form:

<type>(<scope>): <subject>, e.g. fix(kubernetes): address NPE in status check

This allows us to easily generate changelogs & determine semantic version numbers when cutting releases. You can read more about commit conventions here.

@gcomstock
Copy link
Contributor

Thanks for tagging me! Looks great and I wouldn't worry about the async loading. I would consider changing: "Spinnaker is configured to continuously manage some resources" to "Spinnaker is configured to continuously manage some of this application's resources"

@emjburns
Copy link
Contributor

Love the rainbow. As I look at the "paused" vs "active" screens, I think the fact that the buttons looks so similar is a little confusing. I guess in addition to the rainbow I'd love a stop sign or something in front of "continuous management of resources is paused" to make it easier to quickly scan and tell the state of managment

@erikmunson
Copy link
Member Author

@emjburns @gcomstock another rev with some wording + visual tweaks:

new-paused-state

Copy link
Contributor

@christopherthielen christopherthielen left a comment

Choose a reason for hiding this comment

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

nice

if (this.feature.managedResources) {
this.hasManagedResources = false;
ManagedReader.getApplicationSummary(this.application.name).then(({ hasManagedResources }) => {
$scope.$applyAsync(() => {
Copy link
Contributor

Choose a reason for hiding this comment

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

i'm surprised to see applyAsync all over this file, because the file is written in angular. I thought applyAsync was generally used when react code wants to make AngularJS code aware of data changes. Do you have any idea what's going on here?

Copy link
Member Author

@erikmunson erikmunson Sep 16, 2019

Choose a reason for hiding this comment

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

recording an in-person chat for posterity: we have no idea why. it's probably because of Some Subtle State Bug(tm) that popped up and we've been copy-pasting the same logic ever since.

{(!pausePending && <i className={classNames('fa sp-margin-xs-right', iconClass)} />) || <ButtonBusyIndicator />}{' '}
{paused ? 'Resume Management' : 'Pause Management'}
</button>
{pauseFailed && <div className="alert alert-danger sp-margin-l-top">Saving failed.</div>}
Copy link
Contributor

Choose a reason for hiding this comment

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

can this use the <ValidationMessage /> component? (which I totally want to rename to simply <Message/>)

Copy link
Member Author

Choose a reason for hiding this comment

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

@erikmunson erikmunson merged commit f8267a4 into spinnaker:master Sep 18, 2019
@erikmunson erikmunson deleted the add-keel-kill-switch branch September 18, 2019 19:43
erikmunson pushed a commit to erikmunson/deck that referenced this pull request Sep 18, 2019
68cc18f fix(core): Sanitize confirmation modal body (spinnaker#7407)
f8267a4 feat(core/managed): add Managed Resources section to app config, allow opting out (spinnaker#7409)
erikmunson pushed a commit that referenced this pull request Sep 18, 2019
68cc18f fix(core): Sanitize confirmation modal body (#7407)
f8267a4 feat(core/managed): add Managed Resources section to app config, allow opting out (#7409)
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
68cc18f fix(core): Sanitize confirmation modal body (spinnaker#7407)
f8267a4 feat(core/managed): add Managed Resources section to app config, allow opting out (spinnaker#7409)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants