Skip to content

Commit

Permalink
fix(timeout): Added feature flag for rollback timeout ui input. (back…
Browse files Browse the repository at this point in the history
…port #9937) (#9939)

* fix(timeout): Added feature flag for rollback timeout ui input. (#9937)

* fix(timeout): Added feature flag for rollback timeout ui input.

* fix(timeout): Added feature flag for rollback timeout ui input.

(cherry picked from commit e239be3)

# Conflicts:
#	app/scripts/modules/app/src/settings.js
#	packages/amazon/src/pipeline/stages/rollbackCluster/rollbackClusterStage.html

* fix(timeout): Added feature flag for rollback timeout ui input. (#9943)

* fix(timeout): Added feature flag for rollback timeout ui input.

* fix(timeout): Added feature flag for rollback timeout ui input.

---------

Co-authored-by: DanielaS12 <[email protected]>
  • Loading branch information
mergify[bot] and DanielaS12 committed Feb 3, 2023
1 parent c7ac490 commit 91df4ee
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 2 deletions.
2 changes: 2 additions & 0 deletions app/scripts/modules/app/src/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ const k8sRawResourcesEnabled =
import.meta.env.VITE_K8S_RAW_RESOURCES_ENABLED === 'true' ||
process.env.K8S_RAW_RESOURCES_ENABLED === 'true' ||
false;
const dynamicRollbackTimeoutEnabled = import.meta.env.DYNAMIC_ROLLBACK_TIMEOUT_ENABLED === 'true' || false;

window.spinnakerSettings = {
authEnabled: authEnabled,
Expand Down Expand Up @@ -112,6 +113,7 @@ window.spinnakerSettings = {
managedDelivery: managedDeliveryEnabled,
managedServiceAccounts: managedServiceAccountsEnabled,
managedResources: managedResourcesEnabled,
dynamicRollbackTimeout: dynamicRollbackTimeoutEnabled,
notifications: false,
pagerDuty: false,
pipelineTemplates: false,
Expand Down
2 changes: 2 additions & 0 deletions halconfig/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ var mineCanaryEnabled = '{%features.mineCanary%}' === 'true';
var pipelineTemplatesEnabled = '{%features.pipelineTemplates%}' === 'true';
var reduxLoggerEnabled = '{%canary.reduxLogger%}' === 'true';
var showAllConfigsEnabled = '{%canary.showAllCanaryConfigs%}' === 'true';
var dynamicRollbackTimeoutEnabled = '{%feature.dynamicRollbackTimeout%}' === 'true';
var slack = {
botName: '{%notifications.slack.botName%}',
enabled: '{%notifications.slack.enabled%}' === 'true',
Expand Down Expand Up @@ -115,6 +116,7 @@ window.spinnakerSettings = {
fiatEnabled: fiatEnabled,
pipelineTemplates: pipelineTemplatesEnabled,
roscoMode: true,
dynamicRollbackTimeout: dynamicRollbackTimeoutEnabled,
},
gateUrl: gateHost,
notifications: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { module } from 'angular';

import { AccountService, Registry } from '@spinnaker/core';
import { AccountService, Registry, SETTINGS } from '@spinnaker/core';

export const AMAZON_PIPELINE_STAGES_ROLLBACKCLUSTER_AWSROLLBACKCLUSTERSTAGE =
'spinnaker.amazon.pipeline.stage.rollbackClusterStage';
Expand Down Expand Up @@ -60,5 +60,7 @@ module(AMAZON_PIPELINE_STAGES_ROLLBACKCLUSTER_AWSROLLBACKCLUSTERSTAGE, [])
if (!stage.regions.length && $scope.application.defaultRegions.aws) {
stage.regions.push($scope.application.defaultRegions.aws);
}

$scope.viewState.dynamicRollbackTimeout = SETTINGS.feature.dynamicRollbackTimeout;
},
]);
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,16 @@
/>
percent of instances are healthy.
</div>
<div class="col-sm-10 col-sm-offset-2" ng-if="viewState.dynamicRollbackTimeout">
Rollback Timeout is
<input
type="number"
min="0"
max="100"
ng-model="stage.rollbackTimeout"
class="form-control input-sm inline-number"
/>
minutes.
</div>
</div>
</div>
14 changes: 13 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9862,6 +9862,11 @@ gzip-size@^3.0.0:
dependencies:
duplexer "^0.1.1"

[email protected]:
version "1.0.2"
resolved "https://registry.yarnpkg.com/hamt_plus/-/hamt_plus-1.0.2.tgz#e21c252968c7e33b20f6a1b094cd85787a265601"
integrity sha512-t2JXKaehnMb9paaYA7J0BX8QQAY8lwfQ9Gjf4pg/mk4krt+cmwmU652HOoWonf+7+EQV97ARPMhhVgU1ra2GhA==

handle-thing@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-2.0.0.tgz#0e039695ff50c93fc288557d696f3c1dc6776754"
Expand Down Expand Up @@ -16126,7 +16131,14 @@ rechoir@^0.6.2:
dependencies:
resolve "^1.1.6"

[email protected], recoil@^0.0.10:
[email protected]:
version "0.7.2"
resolved "https://registry.yarnpkg.com/recoil/-/recoil-0.7.2.tgz#37aafc9e0674abae639263354a11c910e71bf78a"
integrity sha512-OT4pI7FOUHcIoRtjsL5Lqq+lFFzQfir4MIbUkqyJ3nqv3WfBP1pHepyurqTsK5gw+T+I2R8+uOD28yH+Lg5o4g==
dependencies:
hamt_plus "1.0.2"

recoil@^0.0.10:
version "0.0.10"
resolved "https://registry.yarnpkg.com/recoil/-/recoil-0.0.10.tgz#679ab22306f559f8a63c46fd5ff5241539f9248f"
integrity sha512-+9gRqehw3yKETmoZbhSnWu4GO10HDb5xYf1CjLF1oXGK2uT6GX5Lu9mfTXwjxV/jXxEKx8MIRUUbgPxvbJ8SEw==
Expand Down

0 comments on commit 91df4ee

Please sign in to comment.