Skip to content
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Upcoming Features
---

Update gecko feature flag to object ([#10363](https://github.com/linode/manager/pull/10363))
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,15 @@ export const SelectRegionPanel = (props: SelectRegionPanelProps) => {
});

const hideEdgeRegions =
!flags.gecko ||
!flags.gecko2?.enabled ||
flags.gecko2?.ga ||
Comment thread
hana-akamai marked this conversation as resolved.
!getIsLinodeCreateTypeEdgeSupported(params.type as LinodeCreateType);

const isGeckoGA =
flags.gecko2?.enabled &&
flags.gecko2?.ga &&
getIsLinodeCreateTypeEdgeSupported(params.type as LinodeCreateType);

const showEdgeIconHelperText = Boolean(
!hideEdgeRegions &&
currentCapability &&
Expand Down Expand Up @@ -130,6 +136,7 @@ export const SelectRegionPanel = (props: SelectRegionPanelProps) => {
</Typography>
</Notice>
) : null}
{isGeckoGA && 'Gecko GA'}
<RegionSelect
currentCapability={currentCapability}
disabled={disabled}
Expand Down
2 changes: 1 addition & 1 deletion packages/manager/src/dev-tools/FeatureFlagTool.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const options: { flag: keyof Flags; label: string }[] = [
{ flag: 'aclbFullCreateFlow', label: 'ACLB Full Create Flow' },
{ flag: 'disableLargestGbPlans', label: 'Disable Largest GB Plans' },
{ flag: 'linodeCloneUiChanges', label: 'Linode Clone UI Changes' },
{ flag: 'gecko', label: 'Gecko' },
{ flag: 'gecko2', label: 'Gecko' },
{ flag: 'parentChildAccountAccess', label: 'Parent/Child Account' },
{ flag: 'selfServeBetas', label: 'Self Serve Betas' },
{ flag: 'firewallNodebalancer', label: 'Firewall NodeBalancer' },
Expand Down
8 changes: 7 additions & 1 deletion packages/manager/src/featureFlags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ interface PlacementGroupsFlag {
enabled: boolean;
}

interface GeckoFlag {
enabled: boolean;
ga: boolean;
}

type OneClickApp = Record<string, string>;

export interface Flags {
Expand All @@ -53,7 +58,8 @@ export interface Flags {
databases: boolean;
disableLargestGbPlans: boolean;
firewallNodebalancer: boolean;
gecko: boolean;
gecko: boolean; // @TODO gecko: delete this after next release
gecko2: GeckoFlag;
ipv6Sharing: boolean;
linodeCloneUiChanges: boolean;
linodeCreateRefactor: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ export class LinodeCreate extends React.PureComponent<
(imageIsCloudInitCompatible || linodeIsCloudInitCompatible);

const isEdgeRegionSelected = Boolean(
flags.gecko &&
flags.gecko2?.enabled &&

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We just need to ensure anything touching create is tracked for the refactor work

getIsEdgeRegion(regionsData, this.props.selectedRegionID ?? '')
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const FromLinodeContent = (props: CombinedProps) => {
(linode) => !getIsEdgeRegion(regionsData, linode.region) // Hide linodes that are in an edge region
);

const filteredLinodes = flags.gecko
const filteredLinodes = flags.gecko2?.enabled
? filterEdgeLinodes(linodesData)
: linodesData;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ import OrderBy from 'src/components/OrderBy';
import { PreferenceToggle } from 'src/components/PreferenceToggle/PreferenceToggle';
import { ProductInformationBanner } from 'src/components/ProductInformationBanner/ProductInformationBanner';
import { TransferDisplay } from 'src/components/TransferDisplay/TransferDisplay';
import {
WithFeatureFlagProps,
withFeatureFlags,
} from 'src/containers/flags.container';
import {
WithProfileProps,
withProfile,
Expand Down Expand Up @@ -87,14 +91,15 @@ export interface LinodesLandingProps {
someLinodesHaveScheduledMaintenance: boolean;
}

interface ListLinodesProps
extends LinodesLandingProps,
RouteProps,
WithProfileProps {}
type CombinedProps = LinodesLandingProps &
RouteProps &
WithFeatureFlagProps &
WithProfileProps;

class ListLinodes extends React.Component<ListLinodesProps, State> {
class ListLinodes extends React.Component<CombinedProps, State> {
render() {
const {
flags,
grants,
linodesData,
linodesInTransition,
Expand Down Expand Up @@ -161,6 +166,7 @@ class ListLinodes extends React.Component<ListLinodesProps, State> {

return (
<React.Fragment>
{flags.gecko2?.enabled && flags.gecko2?.ga && 'Gecko GA'}
<LinodeResize
linodeId={this.state.selectedLinodeID}
onClose={this.closeDialogs}
Expand Down Expand Up @@ -447,9 +453,10 @@ const sendGroupByAnalytic = (value: boolean) => {
sendGroupByTagEnabledEvent(eventCategory, value);
};

export const enhanced = compose<ListLinodesProps, LinodesLandingProps>(
export const enhanced = compose<CombinedProps, LinodesLandingProps>(
withRouter,
withProfile
withProfile,
withFeatureFlags
);

export default enhanced(ListLinodes);
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ export const ConfigureForm = React.memo((props: Props) => {

<StyledMigrationBox>
<RegionSelect
regionFilter={
flags.gecko2?.enabled && linodeIsInEdgeRegion ? 'edge' : 'core'
}
regions={
regions?.filter(
(eachRegion) => eachRegion.id !== currentRegion
Expand All @@ -146,7 +149,6 @@ export const ConfigureForm = React.memo((props: Props) => {
errorText={errorText}
handleSelection={handleSelectRegion}
label="New Region"
regionFilter={flags.gecko && linodeIsInEdgeRegion ? 'edge' : 'core'}
selectedId={selectedRegion}
/>
{shouldDisplayPriceComparison && selectedRegion && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export const MigrateLinode = React.memo((props: Props) => {
);

const edgeRegionWarning =
flags.gecko && linodeIsInEdgeRegion
flags.gecko2?.enabled && linodeIsInEdgeRegion
? 'Edge sites may only be migrated to other Edge sites.'
: undefined;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export const PlansPanel = (props: Props) => {
);

const hideEdgeRegions =
!flags.gecko ||
!flags.gecko2?.enabled ||
!getIsLinodeCreateTypeEdgeSupported(params.type as LinodeCreateType);

const showEdgePlanTable =
Expand Down