Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change: [M3-9074] - Remove properties tab from Gen2 buckets #11491

Merged
merged 2 commits into from
Jan 8, 2025
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": Changed
---

Temporarily remove Properties tab from Gen2 buckets ([#11491](https://github.com/linode/manager/pull/11491))
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import {
mockGetObjectStorageEndpoints,
mockGetBucketAccess,
} from 'support/intercepts/object-storage';
import { checkRateLimitsTable } from 'support/util/object-storage-gen2';
import { ui } from 'support/ui';
import {
accountFactory,
objectStorageBucketFactoryGen2,
Expand Down Expand Up @@ -143,96 +141,4 @@ describe('Object Storage Gen 2 bucket details tabs', () => {
});
});
});

describe('Properties tab', () => {
['E0', 'E1'].forEach((endpoint: ObjectStorageEndpointTypes) => {
/**
* Parameterized test for buckets with endpoint types of E0 and E1
coliu-akamai marked this conversation as resolved.
Show resolved Hide resolved
* - Confirms the Properties tab is visible
* - Confirms there is no bucket rate limits table
*/
it(`confirms the Properties tab does not have a rate limits table for buckets with endpoint type ${endpoint}`, () => {
const { mockBucket, mockEndpoint } = createMocksBasedOnEndpointType(
endpoint
);
const { cluster, label } = mockBucket;

mockGetBucketsForRegion(mockRegion.id, [mockBucket]).as(
'getBucketsForRegion'
);
mockGetObjectStorageEndpoints([mockEndpoint]).as(
'getObjectStorageEndpoints'
);

cy.visitWithLogin(
`/object-storage/buckets/${cluster}/${label}/properties`
);
cy.wait([
'@getFeatureFlags',
'@getAccount',
'@getObjectStorageEndpoints',
'@getBucketsForRegion',
]);

cy.findByText('Bucket Rate Limits').should('be.visible');
// confirms helper text
cy.contains(
'This endpoint type supports up to 750 Requests Per Second (RPS). Understand bucket rate limits'
).should('be.visible');

// confirm bucket rate limit table should not exist
cy.get('[data-testid="bucket-rate-limit-table"]').should('not.exist');

// confirm 'Save' button is disabled (for now)
ui.button
.findByAttribute('label', 'Save')
.should('be.visible')
.should('be.disabled');
});
});

['E2', 'E3'].forEach((endpoint: ObjectStorageEndpointTypes) => {
/**
* Parameterized test for buckets with endpoint types of E2 and E3
* - Confirms the Properties tab is visible
* - Confirms bucket rates limit table exists
*/
it(`confirms the Properties tab and rate limits table for buckets with endpoint type ${endpoint}`, () => {
const { mockBucket, mockEndpoint } = createMocksBasedOnEndpointType(
endpoint
);
const { cluster, label } = mockBucket;

mockGetBucketsForRegion(mockRegion.id, [mockBucket]).as(
'getBucketsForRegion'
);
mockGetObjectStorageEndpoints([mockEndpoint]).as(
'getObjectStorageEndpoints'
);

cy.visitWithLogin(
`/object-storage/buckets/${cluster}/${label}/properties`
);
cy.wait([
'@getFeatureFlags',
'@getAccount',
'@getObjectStorageEndpoints',
'@getBucketsForRegion',
]);

cy.findByText('Bucket Rate Limits');
cy.contains(
'Specifies the maximum Requests Per Second (RPS) for a bucket. To increase it to High, open a support ticket. Understand bucket rate limits.'
).should('be.visible');
// Confirm bucket rate limits table exists with correct values
checkRateLimitsTable(endpoint);

// confirm 'Save' button is disabled (for now)
ui.button
.findByAttribute('label', 'Save')
.should('be.visible')
.should('be.disabled');
});
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ const BucketSSL = React.lazy(() =>
default: module.BucketSSL,
}))
);
const BucketProperties = React.lazy(() =>
import('./BucketProperties').then((module) => ({
default: module.BucketProperties,
}))
);

interface MatchProps {
bucketName: string;
Expand Down Expand Up @@ -75,14 +70,6 @@ export const BucketDetailLanding = React.memo((props: Props) => {
routeName: `${props.match.url}/access`,
title: 'Access',
},
...(isObjectStorageGen2Enabled
? [
{
routeName: `${props.match.url}/properties`,
title: 'Properties',
},
]
: []),
...(!isGen2Endpoint
? [
{
Expand Down Expand Up @@ -136,11 +123,6 @@ export const BucketDetailLanding = React.memo((props: Props) => {
endpointType={endpoint_type}
/>
</SafeTabPanel>
{isObjectStorageGen2Enabled && bucket && (
<SafeTabPanel index={2}>
<BucketProperties bucket={bucket} />
</SafeTabPanel>
)}
<SafeTabPanel index={tabs.length - 1}>
<BucketSSL bucketName={bucketName} clusterId={clusterId} />
</SafeTabPanel>
Expand Down
Loading