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 spinnaker#9937) (spinnaker#9941)

* fix(timeout): Added feature flag for rollback timeout ui input. (spinnaker#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:
#	packages/amazon/src/pipeline/stages/rollbackCluster/rollbackClusterStage.html

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

---------

Co-authored-by: DanielaS12 <[email protected]>
  • Loading branch information
mergify[bot] and DanielaS12 authored Feb 3, 2023
1 parent 30cb2e2 commit 394ba17
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
2 changes: 2 additions & 0 deletions halconfig/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,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 @@ -116,6 +117,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>
2 changes: 2 additions & 0 deletions packages/app/src/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,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 @@ -119,6 +120,7 @@ window.spinnakerSettings = {
managedServiceAccounts: managedServiceAccountsEnabled,
managedResources: managedResourcesEnabled,
manualJudgmentParentPipeline: manualJudgmentParentPipelineEnabled,
dynamicRollbackTimeout: dynamicRollbackTimeoutEnabled,
notifications: false,
pagerDuty: false,
pipelineTemplates: false,
Expand Down

0 comments on commit 394ba17

Please sign in to comment.