Skip to content

Commit

Permalink
changed: [M3-7663] - Remove unified migrations feature flag (#10074)
Browse files Browse the repository at this point in the history
Co-authored-by: Jaalah Ramos <jaalah.ramos@gmail.com>
  • Loading branch information
jaalah-akamai and jaalah authored Jan 18, 2024
1 parent bd1ec82 commit d8f605b
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 42 deletions.
5 changes: 5 additions & 0 deletions packages/manager/.changeset/pr-10074-changed-1705590614132.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Changed
---

Remove unified migrations feature flag ([#10074](https://github.com/linode/manager/pull/10074))
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ describe('resize linode', () => {
});

it('resizes a linode by increasing size: warm migration', () => {
mockAppendFeatureFlags({
unifiedMigrations: makeFeatureFlagData(true),
}).as('getFeatureFlags');
mockGetFeatureFlagClientstream().as('getClientStream');

createLinode().then((linode) => {
Expand All @@ -44,9 +41,6 @@ describe('resize linode', () => {
});

it('resizes a linode by increasing size: cold migration', () => {
mockAppendFeatureFlags({
unifiedMigrations: makeFeatureFlagData(true),
}).as('getFeatureFlags');
mockGetFeatureFlagClientstream().as('getClientStream');
createLinode().then((linode) => {
cy.intercept(
Expand All @@ -71,9 +65,6 @@ describe('resize linode', () => {
});

it('resizes a linode by increasing size when offline: cold migration', () => {
mockAppendFeatureFlags({
unifiedMigrations: makeFeatureFlagData(true),
}).as('getFeatureFlags');
mockGetFeatureFlagClientstream().as('getClientStream');
createLinode().then((linode) => {
cy.visitWithLogin(`/linodes/${linode.id}`);
Expand Down
1 change: 0 additions & 1 deletion packages/manager/src/dev-tools/FeatureFlagTool.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ const options: { flag: keyof Flags; label: string }[] = [
{ flag: 'metadata', label: 'Metadata' },
{ flag: 'parentChildAccountAccess', label: 'Parent/Child Account' },
{ flag: 'selfServeBetas', label: 'Self Serve Betas' },
{ flag: 'unifiedMigrations', label: 'Unified Migrations' },
{ flag: 'vpc', label: 'VPC' },
{ flag: 'firewallNodebalancer', label: 'Firewall NodeBalancer' },
{ flag: 'recharts', label: 'Recharts' },
Expand Down
1 change: 0 additions & 1 deletion packages/manager/src/featureFlags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ export interface Flags {
taxCollectionBanner: TaxCollectionBanner;
taxes: Taxes;
tpaProviders: Provider[];
unifiedMigrations: boolean;
vmPlacement: boolean;
vpc: boolean;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import { Typography } from 'src/components/Typography';
import { resetEventsPolling } from 'src/eventsPolling';
import { linodeInTransition } from 'src/features/Linodes/transitions';
import { PlansPanel } from 'src/features/components/PlansPanel/PlansPanel';
import { useFlags } from 'src/hooks/useFlags';
import { useAllLinodeDisksQuery } from 'src/queries/linodes/disks';
import {
useLinodeQuery,
Expand All @@ -43,8 +42,6 @@ import {
} from './LinodeResize.utils';
import { UnifiedMigrationPanel } from './LinodeResizeUnifiedMigrationPanel';

import type { ButtonProps } from 'src/components/Button/Button';

interface Props {
linodeId?: number;
linodeLabel?: string;
Expand All @@ -59,7 +56,6 @@ const migrationTypeOptions: { [key in MigrationTypes]: key } = {

export const LinodeResize = (props: Props) => {
const { linodeId, onClose, open } = props;
const flags = useFlags();
const theme = useTheme();

const { data: linode } = useLinodeQuery(
Expand Down Expand Up @@ -99,9 +95,7 @@ export const LinodeResize = (props: Props) => {
const formik = useFormik<ResizeLinodePayload>({
initialValues: {
allow_auto_disk_resize: shouldEnableAutoResizeDiskOption(disks ?? [])[1],
migration_type: flags.unifiedMigrations
? migrationTypeOptions.warm
: undefined,
migration_type: migrationTypeOptions.warm,
type: '',
},
async onSubmit(values) {
Expand All @@ -118,9 +112,7 @@ export const LinodeResize = (props: Props) => {
*/
await resizeLinode({
allow_auto_disk_resize: values.allow_auto_disk_resize && !isSmaller,
migration_type: flags.unifiedMigrations
? values.migration_type
: undefined,
migration_type: values.migration_type,
type: values.type,
});
resetEventsPolling();
Expand Down Expand Up @@ -187,18 +179,6 @@ export const LinodeResize = (props: Props) => {

const error = getError(resizeError);

const resizeButtonProps: ButtonProps =
flags.unifiedMigrations &&
formik.values.migration_type === 'warm' &&
!isLinodeOffline
? {
onClick: () => formik.handleSubmit(),
}
: {
loading: isLoading,
type: 'submit',
};

return (
<Dialog
fullHeight
Expand Down Expand Up @@ -247,14 +227,11 @@ export const LinodeResize = (props: Props) => {
types={currentTypes.map(extendType)}
/>
</Box>

{flags.unifiedMigrations && (
<UnifiedMigrationPanel
formik={formik}
isLinodeOffline={isLinodeOffline}
migrationTypeOptions={migrationTypeOptions}
/>
)}
<UnifiedMigrationPanel
formik={formik}
isLinodeOffline={isLinodeOffline}
migrationTypeOptions={migrationTypeOptions}
/>
<Typography
sx={{ alignItems: 'center', display: 'flex', minHeight: '44px' }}
variant="h2"
Expand Down Expand Up @@ -344,7 +321,8 @@ export const LinodeResize = (props: Props) => {
}
buttonType="primary"
data-qa-resize
{...resizeButtonProps}
loading={isLoading}
type="submit"
>
Resize Linode
</Button>
Expand Down

0 comments on commit d8f605b

Please sign in to comment.