mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01: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: { | ||||
|             current: { oss: 'version', enterprise: 'version' }, | ||||
|         }, | ||||
|         flags: { | ||||
|             scheduledConfigurationChanges: true, | ||||
|         }, | ||||
|     }); | ||||
| 
 | ||||
| const featureWithStrategyVariants = () => | ||||
|  | ||||
| @ -142,9 +142,6 @@ const uiConfig = () => { | ||||
|         versionInfo: { | ||||
|             current: { oss: 'version', enterprise: 'version' }, | ||||
|         }, | ||||
|         flags: { | ||||
|             scheduledConfigurationChanges: true, | ||||
|         }, | ||||
|     }); | ||||
| }; | ||||
| 
 | ||||
|  | ||||
| @ -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) { | ||||
| @ -383,51 +381,22 @@ export const ChangeRequestOverview: FC = () => { | ||||
|                             <ConditionallyRender | ||||
|                                 condition={changeRequest.state === 'Approved'} | ||||
|                                 show={ | ||||
|                                     <ConditionallyRender | ||||
|                                         condition={scheduleChangeRequests} | ||||
|                                         show={ | ||||
|                                             <ApplyButton | ||||
|                                                 onApply={onApplyChanges} | ||||
|                                                 disabled={ | ||||
|                                                     !allowChangeRequestActions || | ||||
|                                                     disabled | ||||
|                                                 } | ||||
|                                                 onSchedule={() => | ||||
|                                                     setShowScheduleChangeDialog( | ||||
|                                                         true, | ||||
|                                                     ) | ||||
|                                                 } | ||||
|                                             > | ||||
|                                                 Apply or schedule changes | ||||
|                                             </ApplyButton> | ||||
|                                     <ApplyButton | ||||
|                                         onApply={onApplyChanges} | ||||
|                                         disabled={ | ||||
|                                             !allowChangeRequestActions || | ||||
|                                             disabled | ||||
|                                         } | ||||
|                                         elseShow={ | ||||
|                                             <PermissionButton | ||||
|                                                 variant='contained' | ||||
|                                                 onClick={onApplyChanges} | ||||
|                                                 projectId={projectId} | ||||
|                                                 permission={ | ||||
|                                                     APPLY_CHANGE_REQUEST | ||||
|                                                 } | ||||
|                                                 environmentId={ | ||||
|                                                     changeRequest.environment | ||||
|                                                 } | ||||
|                                                 disabled={ | ||||
|                                                     !allowChangeRequestActions || | ||||
|                                                     disabled | ||||
|                                                 } | ||||
|                                             > | ||||
|                                                 Apply changes | ||||
|                                             </PermissionButton> | ||||
|                                         onSchedule={() => | ||||
|                                             setShowScheduleChangeDialog(true) | ||||
|                                         } | ||||
|                                     /> | ||||
|                                     > | ||||
|                                         Apply or schedule changes | ||||
|                                     </ApplyButton> | ||||
|                                 } | ||||
|                             /> | ||||
|                             <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,52 +479,43 @@ export const ChangeRequestOverview: FC = () => { | ||||
|                     onClose={onCancelReject} | ||||
|                     disabled={disabled} | ||||
|                 /> | ||||
|                 <ConditionallyRender | ||||
|                     condition={scheduleChangeRequests} | ||||
|                     show={ | ||||
|                         <> | ||||
|                             <ScheduleChangeRequestDialog | ||||
|                                 open={showScheduleChangesDialog} | ||||
|                                 onConfirm={onScheduleChangeRequest} | ||||
|                                 onClose={onScheduleChangeAbort} | ||||
|                                 disabled={ | ||||
|                                     !allowChangeRequestActions || disabled | ||||
|                                 } | ||||
|                                 projectId={projectId} | ||||
|                                 environment={changeRequest.environment} | ||||
|                                 primaryButtonText={ | ||||
|                                     changeRequest.state === 'Scheduled' | ||||
|                                         ? 'Update scheduled time' | ||||
|                                         : 'Schedule changes' | ||||
|                                 } | ||||
|                                 title={ | ||||
|                                     changeRequest.state === 'Scheduled' | ||||
|                                         ? 'Update schedule' | ||||
|                                         : 'Schedule changes' | ||||
|                                 } | ||||
|                                 scheduledAt={scheduledAt} | ||||
|                             /> | ||||
|                             <ChangeRequestApplyScheduledDialogue | ||||
|                                 open={showApplyScheduledDialog} | ||||
|                                 onConfirm={onApplyChanges} | ||||
|                                 onClose={onApplyScheduledAbort} | ||||
|                                 scheduledTime={scheduledAt} | ||||
|                                 disabled={ | ||||
|                                     !allowChangeRequestActions || disabled | ||||
|                                 } | ||||
|                                 projectId={projectId} | ||||
|                                 environment={changeRequest.environment} | ||||
|                             /> | ||||
|                             <ChangeRequestRejectScheduledDialogue | ||||
|                                 open={showRejectScheduledDialog} | ||||
|                                 onConfirm={onReject} | ||||
|                                 onClose={onRejectScheduledAbort} | ||||
|                                 scheduledTime={scheduledAt} | ||||
|                                 disabled={disabled} | ||||
|                             /> | ||||
|                         </> | ||||
|                     } | ||||
|                 /> | ||||
|                 <> | ||||
|                     <ScheduleChangeRequestDialog | ||||
|                         open={showScheduleChangesDialog} | ||||
|                         onConfirm={onScheduleChangeRequest} | ||||
|                         onClose={onScheduleChangeAbort} | ||||
|                         disabled={!allowChangeRequestActions || disabled} | ||||
|                         projectId={projectId} | ||||
|                         environment={changeRequest.environment} | ||||
|                         primaryButtonText={ | ||||
|                             changeRequest.state === 'Scheduled' | ||||
|                                 ? 'Update scheduled time' | ||||
|                                 : 'Schedule changes' | ||||
|                         } | ||||
|                         title={ | ||||
|                             changeRequest.state === 'Scheduled' | ||||
|                                 ? 'Update schedule' | ||||
|                                 : 'Schedule changes' | ||||
|                         } | ||||
|                         scheduledAt={scheduledAt} | ||||
|                     /> | ||||
|                     <ChangeRequestApplyScheduledDialogue | ||||
|                         open={showApplyScheduledDialog} | ||||
|                         onConfirm={onApplyChanges} | ||||
|                         onClose={onApplyScheduledAbort} | ||||
|                         scheduledTime={scheduledAt} | ||||
|                         disabled={!allowChangeRequestActions || disabled} | ||||
|                         projectId={projectId} | ||||
|                         environment={changeRequest.environment} | ||||
|                     /> | ||||
|                     <ChangeRequestRejectScheduledDialogue | ||||
|                         open={showRejectScheduledDialog} | ||||
|                         onConfirm={onReject} | ||||
|                         onClose={onRejectScheduledAbort} | ||||
|                         scheduledTime={scheduledAt} | ||||
|                         disabled={disabled} | ||||
|                     /> | ||||
|                 </> | ||||
|             </ChangeRequestBody> | ||||
|         </> | ||||
|     ); | ||||
|  | ||||
| @ -100,9 +100,6 @@ const uiConfig = () => { | ||||
|         versionInfo: { | ||||
|             current: { oss: 'version', enterprise: 'version' }, | ||||
|         }, | ||||
|         flags: { | ||||
|             scheduledConfigurationChanges: true, | ||||
|         }, | ||||
|     }); | ||||
| }; | ||||
| 
 | ||||
|  | ||||
| @ -93,9 +93,6 @@ const uiConfig = () => { | ||||
|         versionInfo: { | ||||
|             current: { oss: 'version', enterprise: 'version' }, | ||||
|         }, | ||||
|         flags: { | ||||
|             scheduledConfigurationChanges: true, | ||||
|         }, | ||||
|     }); | ||||
| }; | ||||
| 
 | ||||
|  | ||||
| @ -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,129 +93,77 @@ export const ChangeRequestProcessHelp: VFC<IChangeRequestProcessHelpProps> = | ||||
|                                         </li> | ||||
|                                     </ul> | ||||
|                                 </li> | ||||
|                                 <ConditionallyRender | ||||
|                                     condition={showScheduleInformation} | ||||
|                                     show={ | ||||
|                                         <> | ||||
|                                 <> | ||||
|                                     <li> | ||||
|                                         Once approved, a user with the{' '} | ||||
|                                         <strong> | ||||
|                                             “Apply/Reject change request” | ||||
|                                         </strong>{' '} | ||||
|                                         permission can apply, schedule, or | ||||
|                                         reject the changes. | ||||
|                                         <ul> | ||||
|                                             <li> | ||||
|                                                 Once approved, a user with the{' '} | ||||
|                                                 <strong> | ||||
|                                                     “Apply/Reject change | ||||
|                                                     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> | ||||
|                                                 If applied, the changes will | ||||
|                                                 take effect and the change | ||||
|                                                 request will be closed. | ||||
|                                             </li> | ||||
|                                             <li> | ||||
|                                                 A user with the{' '} | ||||
|                                                 <strong> | ||||
|                                                     “Apply/Reject change | ||||
|                                                     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> | ||||
|                                                 If scheduled, Unleash will | ||||
|                                                 attempt to apply the changes at | ||||
|                                                 the scheduled date and time. | ||||
|                                             </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> | ||||
|                                     } | ||||
|                                 /> | ||||
|                                             <li> | ||||
|                                                 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” | ||||
|                                         </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> | ||||
|                                 </> | ||||
|                             </ol> | ||||
|                         </Typography> | ||||
|                         <Box sx={{ mt: 3 }}> | ||||
|                             <ConditionallyRender | ||||
|                                 condition={showScheduleInformation} | ||||
|                                 show={ | ||||
|                                     <ChangeRequestProcessWithScheduleImage | ||||
|                                         aria-details={descriptionId} | ||||
|                                         style={{ | ||||
|                                             maxWidth: '100%', | ||||
|                                             height: 'auto', | ||||
|                                         }} | ||||
|                                     /> | ||||
|                                 } | ||||
|                                 elseShow={ | ||||
|                                     <ChangeRequestProcessImage | ||||
|                                         aria-details={descriptionId} | ||||
|                                         style={{ | ||||
|                                             maxWidth: 'calc(100vw - 4rem)', | ||||
|                                         }} | ||||
|                                     /> | ||||
|                                 } | ||||
|                             <ChangeRequestProcessWithScheduleImage | ||||
|                                 aria-details={descriptionId} | ||||
|                                 style={{ | ||||
|                                     maxWidth: '100%', | ||||
|                                     height: 'auto', | ||||
|                                 }} | ||||
|                             /> | ||||
|                         </Box> | ||||
|                     </Box> | ||||
|  | ||||
| @ -62,7 +62,6 @@ export type UiFlags = { | ||||
|     strategyVariant?: boolean; | ||||
|     doraMetrics?: boolean; | ||||
|     dependentFeatures?: boolean; | ||||
|     scheduledConfigurationChanges?: boolean; | ||||
|     newStrategyConfiguration?: boolean; | ||||
|     incomingWebhooks?: boolean; | ||||
|     automatedActions?: boolean; | ||||
|  | ||||
| @ -133,7 +133,6 @@ exports[`should create default config 1`] = ` | ||||
|       "personalAccessTokensKillSwitch": false, | ||||
|       "proPlanAutoCharge": false, | ||||
|       "responseTimeWithAppNameKillSwitch": false, | ||||
|       "scheduledConfigurationChanges": false, | ||||
|       "scimApi": false, | ||||
|       "sdkReporting": false, | ||||
|       "showInactiveUsers": false, | ||||
|  | ||||
| @ -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, | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user