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: Add feature flag for multi block failure messages. (backport #10061) #10062

Merged
merged 2 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion packages/app/src/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ const managedServiceAccountsEnabled =
process.env.MANAGED_SERVICE_ACCOUNTS_ENABLED === 'true';
const managedResourcesEnabled =
import.meta.env.VITE_MANAGED_RESOURCES_ENABLED === 'true' || process.env.MANAGED_RESOURCES_ENABLED === 'true';
const manualJudgmentParentPipelineEnabled = import.meta.env.MJ_PARENTPIPELINE_ENABLED === 'true' || false;
const manualJudgmentParentPipelineEnabled = import.meta.env.MJ_PARENTPIPELINE_ENABLED !== 'false';
const multiBlockFailureMessagesEnabled =
import.meta.env.MULTI_BLOCK_FAILURE_MESSAGES_ENABLED === 'true' ||
process.env.MULTI_BLOCK_FAILURE_MESSAGES_ENABLED === 'true' ||
false;
const onDemandClusterThreshold =
import.meta.env.VITE_ON_DEMAND_CLUSTER_THRESHOLD || process.env.ON_DEMAND_CLUSTER_THRESHOLD || '350';
const reduxLoggerEnabled = import.meta.env.VITE_REDUX_LOGGER === 'true' || process.env.REDUX_LOGGER === 'true';
Expand Down Expand Up @@ -122,6 +126,7 @@ window.spinnakerSettings = {
managedServiceAccounts: managedServiceAccountsEnabled,
managedResources: managedResourcesEnabled,
manualJudgmentParentPipeline: manualJudgmentParentPipelineEnabled,
multiBlockFailureMessages: multiBlockFailureMessagesEnabled,
dynamicRollbackTimeout: dynamicRollbackTimeoutEnabled,
notifications: false,
pagerDuty: false,
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/config/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export interface IFeatures {
mdGitIntegration?: boolean;
managedServiceAccounts?: boolean;
managedResources?: boolean;
multiBlockFailureMessages?: boolean;
notifications?: boolean;
pagerDuty?: boolean;
pipelines?: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { get } from 'lodash';
import React from 'react';

import type { IExecutionDetailsSectionProps, IManifest } from '@spinnaker/core';
import { CollapsibleElement, ExecutionDetailsSection, StageFailureMessage } from '@spinnaker/core';
import { CollapsibleElement, ExecutionDetailsSection, SETTINGS, StageFailureMessage } from '@spinnaker/core';

import { ManifestStatus } from './ManifestStatus';
import type { IStageManifest } from '../../../../manifest/manifest.service';
Expand Down Expand Up @@ -91,11 +91,15 @@ export class DeployStatus extends React.Component<IExecutionDetailsSectionProps,
return (
<div className="deploy-status">
<ExecutionDetailsSection name={sectionName} current={currentSection}>
{stage.failureMessages.map((failureMessage) => (
<CollapsibleElement key={failureMessage} maxHeight={150}>
<StageFailureMessage stage={stage} message={failureMessage} />
</CollapsibleElement>
))}
{SETTINGS.feature.multiBlockFailureMessages ? (
stage.failureMessages.map((failureMessage) => (
<CollapsibleElement key={failureMessage} maxHeight={150}>
<StageFailureMessage stage={stage} message={failureMessage} />
</CollapsibleElement>
))
) : (
<StageFailureMessage stage={stage} message={stage.failureMessage} />
)}
{!!manifests?.length && (
<div className="row">
<div className="col-md-12">
Expand Down
Loading