1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-06-18 01:18:23 +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:
andreas-unleash 2024-02-27 14:57:34 +02:00 committed by GitHub
parent 43b013ff2f
commit 9101c39eb7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 113 additions and 230 deletions

View File

@ -18,9 +18,6 @@ const uiConfigForEnterprise = () =>
versionInfo: {
current: { oss: 'version', enterprise: 'version' },
},
flags: {
scheduledConfigurationChanges: true,
},
});
const featureWithStrategyVariants = () =>

View File

@ -142,9 +142,6 @@ const uiConfig = () => {
versionInfo: {
current: { oss: 'version', enterprise: 'version' },
},
flags: {
scheduledConfigurationChanges: true,
},
});
};

View File

@ -28,7 +28,6 @@ import { changesCount } from '../changesCount';
import { ChangeRequestReviewers } from './ChangeRequestReviewers/ChangeRequestReviewers';
import { ChangeRequestRejectDialogue } from './ChangeRequestRejectDialog/ChangeRequestRejectDialog';
import { ApplyButton } from './ApplyButton/ApplyButton';
import { useUiFlag } from 'hooks/useUiFlag';
import {
ChangeRequestApplyScheduledDialogue,
ChangeRequestRejectScheduledDialogue,
@ -103,7 +102,6 @@ export const ChangeRequestOverview: FC = () => {
const { setToastData, setToastApiError } = useToast();
const { isChangeRequestConfiguredForReview } =
useChangeRequestsEnabled(projectId);
const scheduleChangeRequests = useUiFlag('scheduledConfigurationChanges');
const [disabled, setDisabled] = useState(false);
if (!changeRequest) {
@ -382,9 +380,6 @@ export const ChangeRequestOverview: FC = () => {
/>
<ConditionallyRender
condition={changeRequest.state === 'Approved'}
show={
<ConditionallyRender
condition={scheduleChangeRequests}
show={
<ApplyButton
onApply={onApplyChanges}
@ -393,41 +388,15 @@ export const ChangeRequestOverview: FC = () => {
disabled
}
onSchedule={() =>
setShowScheduleChangeDialog(
true,
)
setShowScheduleChangeDialog(true)
}
>
Apply or schedule changes
</ApplyButton>
}
elseShow={
<PermissionButton
variant='contained'
onClick={onApplyChanges}
projectId={projectId}
permission={
APPLY_CHANGE_REQUEST
}
environmentId={
changeRequest.environment
}
disabled={
!allowChangeRequestActions ||
disabled
}
>
Apply changes
</PermissionButton>
}
/>
}
/>
<ConditionallyRender
condition={
scheduleChangeRequests &&
changeRequest.state === 'Scheduled'
}
condition={changeRequest.state === 'Scheduled'}
show={
<ApplyButton
onApply={() =>
@ -457,10 +426,7 @@ export const ChangeRequestOverview: FC = () => {
}
show={
<ConditionallyRender
condition={
scheduleChangeRequests &&
Boolean(scheduledAt)
}
condition={Boolean(scheduledAt)}
show={
<StyledButton
variant='outlined'
@ -513,17 +479,12 @@ export const ChangeRequestOverview: FC = () => {
onClose={onCancelReject}
disabled={disabled}
/>
<ConditionallyRender
condition={scheduleChangeRequests}
show={
<>
<ScheduleChangeRequestDialog
open={showScheduleChangesDialog}
onConfirm={onScheduleChangeRequest}
onClose={onScheduleChangeAbort}
disabled={
!allowChangeRequestActions || disabled
}
disabled={!allowChangeRequestActions || disabled}
projectId={projectId}
environment={changeRequest.environment}
primaryButtonText={
@ -543,9 +504,7 @@ export const ChangeRequestOverview: FC = () => {
onConfirm={onApplyChanges}
onClose={onApplyScheduledAbort}
scheduledTime={scheduledAt}
disabled={
!allowChangeRequestActions || disabled
}
disabled={!allowChangeRequestActions || disabled}
projectId={projectId}
environment={changeRequest.environment}
/>
@ -557,8 +516,6 @@ export const ChangeRequestOverview: FC = () => {
disabled={disabled}
/>
</>
}
/>
</ChangeRequestBody>
</>
);

View File

@ -100,9 +100,6 @@ const uiConfig = () => {
versionInfo: {
current: { oss: 'version', enterprise: 'version' },
},
flags: {
scheduledConfigurationChanges: true,
},
});
};

View File

@ -93,9 +93,6 @@ const uiConfig = () => {
versionInfo: {
current: { oss: 'version', enterprise: 'version' },
},
flags: {
scheduledConfigurationChanges: true,
},
});
};

View File

@ -21,9 +21,6 @@ export const ChangeRequestProcessHelp: VFC<IChangeRequestProcessHelpProps> =
const theme = useTheme();
const isSmallScreen = useMediaQuery(theme.breakpoints.down('md'));
const [isOpen, setIsOpen] = useState(false);
const showScheduleInformation = useUiFlag(
'scheduledConfigurationChanges',
);
const descriptionId = 'change-request-process-description';
@ -96,113 +93,71 @@ export const ChangeRequestProcessHelp: VFC<IChangeRequestProcessHelpProps> =
</li>
</ul>
</li>
<ConditionallyRender
condition={showScheduleInformation}
show={
<>
<li>
Once approved, a user with the{' '}
<strong>
Apply/Reject change
request
Apply/Reject change request
</strong>{' '}
permission can apply, schedule,
or reject the changes.
permission can apply, schedule, or
reject the changes.
<ul>
<li>
If applied, the changes
will take effect and the
change request will be
closed.
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.
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.
The user who created the change
request can cancel the changes
up until they are applied or
scheduled.
</li>
</ul>
</li>
<li>
A user with the{' '}
<strong>
Apply/Reject change
request
Apply/Reject change request
</strong>{' '}
permission can reschedule,
reject, or immediately apply a
scheduled change request.
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.
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.
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.
If the user who scheduled the
changes is removed from this
Unleash instance, the scheduled
changes will also not be
applied.
</li>
</ul>
</li>
</>
}
elseShow={
<li>
Once approved, a user with the{' '}
<strong>
Apply/Reject change request
</strong>{' '}
permission can apply or reject the
changes.
<ul>
<li>
Once applied, the changes
will take effect and the
change request will be
closed.
</li>
<li>
The user who created the
change request can cancel
the changes up until they
are applied.
</li>
</ul>
</li>
}
/>
</ol>
</Typography>
<Box sx={{ mt: 3 }}>
<ConditionallyRender
condition={showScheduleInformation}
show={
<ChangeRequestProcessWithScheduleImage
aria-details={descriptionId}
style={{
@ -210,16 +165,6 @@ export const ChangeRequestProcessHelp: VFC<IChangeRequestProcessHelpProps> =
height: 'auto',
}}
/>
}
elseShow={
<ChangeRequestProcessImage
aria-details={descriptionId}
style={{
maxWidth: 'calc(100vw - 4rem)',
}}
/>
}
/>
</Box>
</Box>
</Popover>

View File

@ -62,7 +62,6 @@ export type UiFlags = {
strategyVariant?: boolean;
doraMetrics?: boolean;
dependentFeatures?: boolean;
scheduledConfigurationChanges?: boolean;
newStrategyConfiguration?: boolean;
incomingWebhooks?: boolean;
automatedActions?: boolean;

View File

@ -133,7 +133,6 @@ exports[`should create default config 1`] = `
"personalAccessTokensKillSwitch": false,
"proPlanAutoCharge": false,
"responseTimeWithAppNameKillSwitch": false,
"scheduledConfigurationChanges": false,
"scimApi": false,
"sdkReporting": false,
"showInactiveUsers": false,

View File

@ -26,7 +26,6 @@ export type IFlagKey =
| 'advancedPlayground'
| 'filterInvalidClientMetrics'
| 'disableMetrics'
| 'scheduledConfigurationChanges'
| 'stripClientHeadersOn304'
| 'stripHeadersOnAPI'
| 'incomingWebhooks'
@ -130,10 +129,6 @@ const flags: IFlags = {
process.env.UNLEASH_EXPERIMENTAL_DISABLE_METRICS,
false,
),
scheduledConfigurationChanges: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_SCHEDULED_CONFIGURATION_CHANGES,
false,
),
stripClientHeadersOn304: parseEnvVarBoolean(
process.env
.UNLEASH_EXPERIMENTAL_DETECT_SEGMENT_USAGE_IN_CHANGE_REQUESTS,