Skip to content

Commit 7aacc11

Browse files
change: [STORIF-33] Whitelisted regions removed.
1 parent c0f5458 commit 7aacc11

File tree

7 files changed

+0
-45
lines changed

7 files changed

+0
-45
lines changed

packages/manager/src/components/RegionSelect/RegionMultiSelect.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ export const RegionMultiSelect = React.memo((props: RegionMultiSelectProps) => {
4545
disabled,
4646
disabledRegions: disabledRegionsFromProps,
4747
errorText,
48-
forcefullyShownRegionIds,
4948
helperText,
5049
isClearable,
5150
isGeckoLAEnabled,
@@ -65,7 +64,6 @@ export const RegionMultiSelect = React.memo((props: RegionMultiSelectProps) => {
6564

6665
const regionOptions = getRegionOptions({
6766
currentCapability,
68-
forcefullyShownRegionIds,
6967
regions,
7068
});
7169

packages/manager/src/components/RegionSelect/RegionSelect.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ export const RegionSelect = <
4141
disabled,
4242
disabledRegions: disabledRegionsFromProps,
4343
errorText,
44-
forcefullyShownRegionIds,
4544
helperText,
4645
isGeckoLAEnabled,
4746
label,
@@ -62,7 +61,6 @@ export const RegionSelect = <
6261

6362
const regionOptions = getRegionOptions({
6463
currentCapability,
65-
forcefullyShownRegionIds,
6664
regionFilter,
6765
regions,
6866
});

packages/manager/src/components/RegionSelect/RegionSelect.types.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@ export interface RegionSelectProps<
3939
* A key/value object for disabling regions by their ID.
4040
*/
4141
disabledRegions?: Record<string, DisableItemOption>;
42-
/**
43-
* Used to override filtering done by the `currentCapability` prop
44-
* @todo Remove this after Object Storage Gen2.
45-
*/
46-
forcefullyShownRegionIds?: Set<string>;
4742
helperText?: string;
4843
/**
4944
* `isGeckoLAEnabled` flag from `useIsGeckoEnabled` hook
@@ -73,11 +68,6 @@ export interface RegionMultiSelectProps
7368
> {
7469
currentCapability: Capabilities | undefined;
7570
disabledRegions?: Record<string, DisableItemOption>;
76-
/**
77-
* Used to override filtering done by the `currentCapability` prop
78-
* @todo Remove this after Object Storage Gen2.
79-
*/
80-
forcefullyShownRegionIds?: Set<string>;
8171
helperText?: string;
8272
isClearable?: boolean;
8373
/**

packages/manager/src/components/RegionSelect/RegionSelect.utils.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,17 @@ const NORTH_AMERICA = CONTINENT_CODE_TO_CONTINENT.NA;
1515

1616
interface RegionSelectOptions {
1717
currentCapability: Capabilities | undefined;
18-
forcefullyShownRegionIds?: Set<string>;
1918
regionFilter?: RegionFilterValue;
2019
regions: Region[];
2120
}
2221

2322
export const getRegionOptions = ({
2423
currentCapability,
25-
forcefullyShownRegionIds,
2624
regionFilter,
2725
regions,
2826
}: RegionSelectOptions) => {
2927
return regions
3028
.filter((region) => {
31-
if (forcefullyShownRegionIds?.has(region.id)) {
32-
return true;
33-
}
34-
3529
if (
3630
currentCapability &&
3731
!region.capabilities.includes(currentCapability)

packages/manager/src/features/ObjectStorage/AccessKeyLanding/AccessKeyRegions/AccessKeyRegions.tsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ import { RegionMultiSelect } from 'src/components/RegionSelect/RegionMultiSelect
66
import { useObjectStorageRegions } from 'src/features/ObjectStorage/hooks/useObjectStorageRegions';
77
import { useFlags } from 'src/hooks/useFlags';
88

9-
import { useIsObjectStorageGen2Enabled } from '../../hooks/useIsObjectStorageGen2Enabled';
10-
import { WHITELISTED_REGIONS } from '../../utilities';
11-
129
import type { Region } from '@linode/api-v4';
1310

1411
interface Props {
@@ -35,8 +32,6 @@ export const AccessKeyRegions = (props: Props) => {
3532
const { allRegionsError, availableStorageRegions } =
3633
useObjectStorageRegions();
3734

38-
const { isObjectStorageGen2Enabled } = useIsObjectStorageGen2Enabled();
39-
4035
// Error could be: 1. General Regions error, 2. Field error, 3. Nothing
4136
const errorText = error || allRegionsError?.[0]?.reason;
4237

@@ -45,9 +40,6 @@ export const AccessKeyRegions = (props: Props) => {
4540
currentCapability="Object Storage"
4641
disabled={disabled}
4742
errorText={errorText}
48-
forcefullyShownRegionIds={
49-
isObjectStorageGen2Enabled ? WHITELISTED_REGIONS : undefined
50-
}
5143
isClearable={false}
5244
isGeckoLAEnabled={isGeckoLAEnabled}
5345
label="Regions"

packages/manager/src/features/ObjectStorage/BucketLanding/BucketRegions.tsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ import { RegionSelect } from 'src/components/RegionSelect/RegionSelect';
55
import { useObjectStorageRegions } from 'src/features/ObjectStorage/hooks/useObjectStorageRegions';
66
import { useFlags } from 'src/hooks/useFlags';
77

8-
import { useIsObjectStorageGen2Enabled } from '../hooks/useIsObjectStorageGen2Enabled';
9-
import { WHITELISTED_REGIONS } from '../utilities';
10-
118
interface Props {
129
disabled?: boolean;
1310
error?: string;
@@ -23,8 +20,6 @@ export const BucketRegions = (props: Props) => {
2320
const { allRegionsError, availableStorageRegions } =
2421
useObjectStorageRegions();
2522

26-
const { isObjectStorageGen2Enabled } = useIsObjectStorageGen2Enabled();
27-
2823
const flags = useFlags();
2924
const { isGeckoLAEnabled } = useIsGeckoEnabled(
3025
flags.gecko2?.enabled,
@@ -40,9 +35,6 @@ export const BucketRegions = (props: Props) => {
4035
disableClearable
4136
disabled={disabled}
4237
errorText={errorText}
43-
forcefullyShownRegionIds={
44-
isObjectStorageGen2Enabled ? WHITELISTED_REGIONS : undefined
45-
}
4638
isGeckoLAEnabled={isGeckoLAEnabled}
4739
label="Region"
4840
onBlur={onBlur}

packages/manager/src/features/ObjectStorage/utilities.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -168,15 +168,6 @@ export const objectACLHelperText: Record<string, string> = {
168168
'public-read-write': 'Public Read/Write ACL',
169169
};
170170

171-
// @TODO: OBJ Gen2: This should be removed once these regions obtain the `Object Storage` capability.
172-
export const WHITELISTED_REGIONS = new Set([
173-
'gb-lon',
174-
'au-mel',
175-
'in-bom-2',
176-
'de-fra-2',
177-
'sg-sin-2',
178-
]);
179-
180171
/**
181172
* For OBJ Gen2 users, filter regions based on available Object Storage endpoints.
182173
* Otherwise, we return the regions as is.

0 commit comments

Comments
 (0)