mirror of
https://github.com/Unleash/unleash.git
synced 2025-04-15 01:16:22 +02:00
chore: remove scheduledConfigurationChanges flag (#6360)
What is says on the box --------- Signed-off-by: andreas-unleash <andreas@getunleash.ai>
This commit is contained in:
parent
43b013ff2f
commit
9101c39eb7
@ -18,9 +18,6 @@ const uiConfigForEnterprise = () =>
|
|||||||
versionInfo: {
|
versionInfo: {
|
||||||
current: { oss: 'version', enterprise: 'version' },
|
current: { oss: 'version', enterprise: 'version' },
|
||||||
},
|
},
|
||||||
flags: {
|
|
||||||
scheduledConfigurationChanges: true,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const featureWithStrategyVariants = () =>
|
const featureWithStrategyVariants = () =>
|
||||||
|
@ -142,9 +142,6 @@ const uiConfig = () => {
|
|||||||
versionInfo: {
|
versionInfo: {
|
||||||
current: { oss: 'version', enterprise: 'version' },
|
current: { oss: 'version', enterprise: 'version' },
|
||||||
},
|
},
|
||||||
flags: {
|
|
||||||
scheduledConfigurationChanges: true,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -28,7 +28,6 @@ import { changesCount } from '../changesCount';
|
|||||||
import { ChangeRequestReviewers } from './ChangeRequestReviewers/ChangeRequestReviewers';
|
import { ChangeRequestReviewers } from './ChangeRequestReviewers/ChangeRequestReviewers';
|
||||||
import { ChangeRequestRejectDialogue } from './ChangeRequestRejectDialog/ChangeRequestRejectDialog';
|
import { ChangeRequestRejectDialogue } from './ChangeRequestRejectDialog/ChangeRequestRejectDialog';
|
||||||
import { ApplyButton } from './ApplyButton/ApplyButton';
|
import { ApplyButton } from './ApplyButton/ApplyButton';
|
||||||
import { useUiFlag } from 'hooks/useUiFlag';
|
|
||||||
import {
|
import {
|
||||||
ChangeRequestApplyScheduledDialogue,
|
ChangeRequestApplyScheduledDialogue,
|
||||||
ChangeRequestRejectScheduledDialogue,
|
ChangeRequestRejectScheduledDialogue,
|
||||||
@ -103,7 +102,6 @@ export const ChangeRequestOverview: FC = () => {
|
|||||||
const { setToastData, setToastApiError } = useToast();
|
const { setToastData, setToastApiError } = useToast();
|
||||||
const { isChangeRequestConfiguredForReview } =
|
const { isChangeRequestConfiguredForReview } =
|
||||||
useChangeRequestsEnabled(projectId);
|
useChangeRequestsEnabled(projectId);
|
||||||
const scheduleChangeRequests = useUiFlag('scheduledConfigurationChanges');
|
|
||||||
const [disabled, setDisabled] = useState(false);
|
const [disabled, setDisabled] = useState(false);
|
||||||
|
|
||||||
if (!changeRequest) {
|
if (!changeRequest) {
|
||||||
@ -383,51 +381,22 @@ export const ChangeRequestOverview: FC = () => {
|
|||||||
<ConditionallyRender
|
<ConditionallyRender
|
||||||
condition={changeRequest.state === 'Approved'}
|
condition={changeRequest.state === 'Approved'}
|
||||||
show={
|
show={
|
||||||
<ConditionallyRender
|
<ApplyButton
|
||||||
condition={scheduleChangeRequests}
|
onApply={onApplyChanges}
|
||||||
show={
|
disabled={
|
||||||
<ApplyButton
|
!allowChangeRequestActions ||
|
||||||
onApply={onApplyChanges}
|
disabled
|
||||||
disabled={
|
|
||||||
!allowChangeRequestActions ||
|
|
||||||
disabled
|
|
||||||
}
|
|
||||||
onSchedule={() =>
|
|
||||||
setShowScheduleChangeDialog(
|
|
||||||
true,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
>
|
|
||||||
Apply or schedule changes
|
|
||||||
</ApplyButton>
|
|
||||||
}
|
}
|
||||||
elseShow={
|
onSchedule={() =>
|
||||||
<PermissionButton
|
setShowScheduleChangeDialog(true)
|
||||||
variant='contained'
|
|
||||||
onClick={onApplyChanges}
|
|
||||||
projectId={projectId}
|
|
||||||
permission={
|
|
||||||
APPLY_CHANGE_REQUEST
|
|
||||||
}
|
|
||||||
environmentId={
|
|
||||||
changeRequest.environment
|
|
||||||
}
|
|
||||||
disabled={
|
|
||||||
!allowChangeRequestActions ||
|
|
||||||
disabled
|
|
||||||
}
|
|
||||||
>
|
|
||||||
Apply changes
|
|
||||||
</PermissionButton>
|
|
||||||
}
|
}
|
||||||
/>
|
>
|
||||||
|
Apply or schedule changes
|
||||||
|
</ApplyButton>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<ConditionallyRender
|
<ConditionallyRender
|
||||||
condition={
|
condition={changeRequest.state === 'Scheduled'}
|
||||||
scheduleChangeRequests &&
|
|
||||||
changeRequest.state === 'Scheduled'
|
|
||||||
}
|
|
||||||
show={
|
show={
|
||||||
<ApplyButton
|
<ApplyButton
|
||||||
onApply={() =>
|
onApply={() =>
|
||||||
@ -457,10 +426,7 @@ export const ChangeRequestOverview: FC = () => {
|
|||||||
}
|
}
|
||||||
show={
|
show={
|
||||||
<ConditionallyRender
|
<ConditionallyRender
|
||||||
condition={
|
condition={Boolean(scheduledAt)}
|
||||||
scheduleChangeRequests &&
|
|
||||||
Boolean(scheduledAt)
|
|
||||||
}
|
|
||||||
show={
|
show={
|
||||||
<StyledButton
|
<StyledButton
|
||||||
variant='outlined'
|
variant='outlined'
|
||||||
@ -513,52 +479,43 @@ export const ChangeRequestOverview: FC = () => {
|
|||||||
onClose={onCancelReject}
|
onClose={onCancelReject}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
/>
|
/>
|
||||||
<ConditionallyRender
|
<>
|
||||||
condition={scheduleChangeRequests}
|
<ScheduleChangeRequestDialog
|
||||||
show={
|
open={showScheduleChangesDialog}
|
||||||
<>
|
onConfirm={onScheduleChangeRequest}
|
||||||
<ScheduleChangeRequestDialog
|
onClose={onScheduleChangeAbort}
|
||||||
open={showScheduleChangesDialog}
|
disabled={!allowChangeRequestActions || disabled}
|
||||||
onConfirm={onScheduleChangeRequest}
|
projectId={projectId}
|
||||||
onClose={onScheduleChangeAbort}
|
environment={changeRequest.environment}
|
||||||
disabled={
|
primaryButtonText={
|
||||||
!allowChangeRequestActions || disabled
|
changeRequest.state === 'Scheduled'
|
||||||
}
|
? 'Update scheduled time'
|
||||||
projectId={projectId}
|
: 'Schedule changes'
|
||||||
environment={changeRequest.environment}
|
}
|
||||||
primaryButtonText={
|
title={
|
||||||
changeRequest.state === 'Scheduled'
|
changeRequest.state === 'Scheduled'
|
||||||
? 'Update scheduled time'
|
? 'Update schedule'
|
||||||
: 'Schedule changes'
|
: 'Schedule changes'
|
||||||
}
|
}
|
||||||
title={
|
scheduledAt={scheduledAt}
|
||||||
changeRequest.state === 'Scheduled'
|
/>
|
||||||
? 'Update schedule'
|
<ChangeRequestApplyScheduledDialogue
|
||||||
: 'Schedule changes'
|
open={showApplyScheduledDialog}
|
||||||
}
|
onConfirm={onApplyChanges}
|
||||||
scheduledAt={scheduledAt}
|
onClose={onApplyScheduledAbort}
|
||||||
/>
|
scheduledTime={scheduledAt}
|
||||||
<ChangeRequestApplyScheduledDialogue
|
disabled={!allowChangeRequestActions || disabled}
|
||||||
open={showApplyScheduledDialog}
|
projectId={projectId}
|
||||||
onConfirm={onApplyChanges}
|
environment={changeRequest.environment}
|
||||||
onClose={onApplyScheduledAbort}
|
/>
|
||||||
scheduledTime={scheduledAt}
|
<ChangeRequestRejectScheduledDialogue
|
||||||
disabled={
|
open={showRejectScheduledDialog}
|
||||||
!allowChangeRequestActions || disabled
|
onConfirm={onReject}
|
||||||
}
|
onClose={onRejectScheduledAbort}
|
||||||
projectId={projectId}
|
scheduledTime={scheduledAt}
|
||||||
environment={changeRequest.environment}
|
disabled={disabled}
|
||||||
/>
|
/>
|
||||||
<ChangeRequestRejectScheduledDialogue
|
</>
|
||||||
open={showRejectScheduledDialog}
|
|
||||||
onConfirm={onReject}
|
|
||||||
onClose={onRejectScheduledAbort}
|
|
||||||
scheduledTime={scheduledAt}
|
|
||||||
disabled={disabled}
|
|
||||||
/>
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</ChangeRequestBody>
|
</ChangeRequestBody>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
@ -100,9 +100,6 @@ const uiConfig = () => {
|
|||||||
versionInfo: {
|
versionInfo: {
|
||||||
current: { oss: 'version', enterprise: 'version' },
|
current: { oss: 'version', enterprise: 'version' },
|
||||||
},
|
},
|
||||||
flags: {
|
|
||||||
scheduledConfigurationChanges: true,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -93,9 +93,6 @@ const uiConfig = () => {
|
|||||||
versionInfo: {
|
versionInfo: {
|
||||||
current: { oss: 'version', enterprise: 'version' },
|
current: { oss: 'version', enterprise: 'version' },
|
||||||
},
|
},
|
||||||
flags: {
|
|
||||||
scheduledConfigurationChanges: true,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -21,9 +21,6 @@ export const ChangeRequestProcessHelp: VFC<IChangeRequestProcessHelpProps> =
|
|||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const isSmallScreen = useMediaQuery(theme.breakpoints.down('md'));
|
const isSmallScreen = useMediaQuery(theme.breakpoints.down('md'));
|
||||||
const [isOpen, setIsOpen] = useState(false);
|
const [isOpen, setIsOpen] = useState(false);
|
||||||
const showScheduleInformation = useUiFlag(
|
|
||||||
'scheduledConfigurationChanges',
|
|
||||||
);
|
|
||||||
|
|
||||||
const descriptionId = 'change-request-process-description';
|
const descriptionId = 'change-request-process-description';
|
||||||
|
|
||||||
@ -96,129 +93,77 @@ export const ChangeRequestProcessHelp: VFC<IChangeRequestProcessHelpProps> =
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<ConditionallyRender
|
<>
|
||||||
condition={showScheduleInformation}
|
<li>
|
||||||
show={
|
Once approved, a user with the{' '}
|
||||||
<>
|
<strong>
|
||||||
|
“Apply/Reject change request”
|
||||||
|
</strong>{' '}
|
||||||
|
permission can apply, schedule, or
|
||||||
|
reject the changes.
|
||||||
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
Once approved, a user with the{' '}
|
If applied, the changes will
|
||||||
<strong>
|
take effect and the change
|
||||||
“Apply/Reject change
|
request will be closed.
|
||||||
request”
|
|
||||||
</strong>{' '}
|
|
||||||
permission can apply, schedule,
|
|
||||||
or reject the changes.
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
If applied, the changes
|
|
||||||
will take effect and the
|
|
||||||
change request will be
|
|
||||||
closed.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
If scheduled, Unleash
|
|
||||||
will attempt to apply
|
|
||||||
the changes at the
|
|
||||||
scheduled date and time.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
The user who created the
|
|
||||||
change request can
|
|
||||||
cancel the changes up
|
|
||||||
until they are applied
|
|
||||||
or scheduled.
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
A user with the{' '}
|
If scheduled, Unleash will
|
||||||
<strong>
|
attempt to apply the changes at
|
||||||
“Apply/Reject change
|
the scheduled date and time.
|
||||||
request”
|
|
||||||
</strong>{' '}
|
|
||||||
permission can reschedule,
|
|
||||||
reject, or immediately apply a
|
|
||||||
scheduled change request.
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
If any of the flags or
|
|
||||||
strategies in the change
|
|
||||||
request are archived or
|
|
||||||
deleted (outside of the
|
|
||||||
change request), thus
|
|
||||||
creating a conflict,
|
|
||||||
Unleash will send an
|
|
||||||
email out to the change
|
|
||||||
request author and to
|
|
||||||
the user who (last)
|
|
||||||
scheduled the change
|
|
||||||
request.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
If the scheduled changes
|
|
||||||
contain any conflicts,
|
|
||||||
Unleash will refuse to
|
|
||||||
apply them.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
If the user who
|
|
||||||
scheduled the changes is
|
|
||||||
removed from this
|
|
||||||
Unleash instance, the
|
|
||||||
scheduled changes will
|
|
||||||
also not be applied.
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
</li>
|
||||||
</>
|
<li>
|
||||||
}
|
The user who created the change
|
||||||
elseShow={
|
request can cancel the changes
|
||||||
<li>
|
up until they are applied or
|
||||||
Once approved, a user with the{' '}
|
scheduled.
|
||||||
<strong>
|
</li>
|
||||||
“Apply/Reject change request”
|
</ul>
|
||||||
</strong>{' '}
|
</li>
|
||||||
permission can apply or reject the
|
<li>
|
||||||
changes.
|
A user with the{' '}
|
||||||
<ul>
|
<strong>
|
||||||
<li>
|
“Apply/Reject change request”
|
||||||
Once applied, the changes
|
</strong>{' '}
|
||||||
will take effect and the
|
permission can reschedule, reject, or
|
||||||
change request will be
|
immediately apply a scheduled change
|
||||||
closed.
|
request.
|
||||||
</li>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
The user who created the
|
If any of the flags or
|
||||||
change request can cancel
|
strategies in the change request
|
||||||
the changes up until they
|
are archived or deleted (outside
|
||||||
are applied.
|
of the change request), thus
|
||||||
</li>
|
creating a conflict, Unleash
|
||||||
</ul>
|
will send an email out to the
|
||||||
</li>
|
change request author and to the
|
||||||
}
|
user who (last) scheduled the
|
||||||
/>
|
change request.
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
If the scheduled changes contain
|
||||||
|
any conflicts, Unleash will
|
||||||
|
refuse to apply them.
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
If the user who scheduled the
|
||||||
|
changes is removed from this
|
||||||
|
Unleash instance, the scheduled
|
||||||
|
changes will also not be
|
||||||
|
applied.
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</>
|
||||||
</ol>
|
</ol>
|
||||||
</Typography>
|
</Typography>
|
||||||
<Box sx={{ mt: 3 }}>
|
<Box sx={{ mt: 3 }}>
|
||||||
<ConditionallyRender
|
<ChangeRequestProcessWithScheduleImage
|
||||||
condition={showScheduleInformation}
|
aria-details={descriptionId}
|
||||||
show={
|
style={{
|
||||||
<ChangeRequestProcessWithScheduleImage
|
maxWidth: '100%',
|
||||||
aria-details={descriptionId}
|
height: 'auto',
|
||||||
style={{
|
}}
|
||||||
maxWidth: '100%',
|
|
||||||
height: 'auto',
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
elseShow={
|
|
||||||
<ChangeRequestProcessImage
|
|
||||||
aria-details={descriptionId}
|
|
||||||
style={{
|
|
||||||
maxWidth: 'calc(100vw - 4rem)',
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
|
@ -62,7 +62,6 @@ export type UiFlags = {
|
|||||||
strategyVariant?: boolean;
|
strategyVariant?: boolean;
|
||||||
doraMetrics?: boolean;
|
doraMetrics?: boolean;
|
||||||
dependentFeatures?: boolean;
|
dependentFeatures?: boolean;
|
||||||
scheduledConfigurationChanges?: boolean;
|
|
||||||
newStrategyConfiguration?: boolean;
|
newStrategyConfiguration?: boolean;
|
||||||
incomingWebhooks?: boolean;
|
incomingWebhooks?: boolean;
|
||||||
automatedActions?: boolean;
|
automatedActions?: boolean;
|
||||||
|
@ -133,7 +133,6 @@ exports[`should create default config 1`] = `
|
|||||||
"personalAccessTokensKillSwitch": false,
|
"personalAccessTokensKillSwitch": false,
|
||||||
"proPlanAutoCharge": false,
|
"proPlanAutoCharge": false,
|
||||||
"responseTimeWithAppNameKillSwitch": false,
|
"responseTimeWithAppNameKillSwitch": false,
|
||||||
"scheduledConfigurationChanges": false,
|
|
||||||
"scimApi": false,
|
"scimApi": false,
|
||||||
"sdkReporting": false,
|
"sdkReporting": false,
|
||||||
"showInactiveUsers": false,
|
"showInactiveUsers": false,
|
||||||
|
@ -26,7 +26,6 @@ export type IFlagKey =
|
|||||||
| 'advancedPlayground'
|
| 'advancedPlayground'
|
||||||
| 'filterInvalidClientMetrics'
|
| 'filterInvalidClientMetrics'
|
||||||
| 'disableMetrics'
|
| 'disableMetrics'
|
||||||
| 'scheduledConfigurationChanges'
|
|
||||||
| 'stripClientHeadersOn304'
|
| 'stripClientHeadersOn304'
|
||||||
| 'stripHeadersOnAPI'
|
| 'stripHeadersOnAPI'
|
||||||
| 'incomingWebhooks'
|
| 'incomingWebhooks'
|
||||||
@ -130,10 +129,6 @@ const flags: IFlags = {
|
|||||||
process.env.UNLEASH_EXPERIMENTAL_DISABLE_METRICS,
|
process.env.UNLEASH_EXPERIMENTAL_DISABLE_METRICS,
|
||||||
false,
|
false,
|
||||||
),
|
),
|
||||||
scheduledConfigurationChanges: parseEnvVarBoolean(
|
|
||||||
process.env.UNLEASH_EXPERIMENTAL_SCHEDULED_CONFIGURATION_CHANGES,
|
|
||||||
false,
|
|
||||||
),
|
|
||||||
stripClientHeadersOn304: parseEnvVarBoolean(
|
stripClientHeadersOn304: parseEnvVarBoolean(
|
||||||
process.env
|
process.env
|
||||||
.UNLEASH_EXPERIMENTAL_DETECT_SEGMENT_USAGE_IN_CHANGE_REQUESTS,
|
.UNLEASH_EXPERIMENTAL_DETECT_SEGMENT_USAGE_IN_CHANGE_REQUESTS,
|
||||||
|
Loading…
Reference in New Issue
Block a user