From 02d51cb86535a16a9caa4d2d655f483ad3e0d613 Mon Sep 17 00:00:00 2001 From: Jaalah Ramos <125309814+jaalah-akamai@users.noreply.github.com> Date: Fri, 16 Aug 2024 09:49:02 -0400 Subject: [PATCH 01/49] upcoming: [M3-8306] - Hide CORS and SSL for OBJ Gen2 (#10776) Co-authored-by: Jaalah Ramos Co-authored-by: Mariah Jacobs <114685994+mjac0bs@users.noreply.github.com> --- ...r-10776-upcoming-features-1723515799181.md | 5 +++++ .../BucketDetail/AccessSelect.tsx | 19 ++++++++++++++---- .../BucketDetail/BucketAccess.tsx | 9 +++++++-- .../ObjectStorage/BucketDetail/index.tsx | 20 ++++++++++++++----- .../src/queries/object-storage/queries.ts | 10 +++++----- 5 files changed, 47 insertions(+), 16 deletions(-) create mode 100644 packages/manager/.changeset/pr-10776-upcoming-features-1723515799181.md diff --git a/packages/manager/.changeset/pr-10776-upcoming-features-1723515799181.md b/packages/manager/.changeset/pr-10776-upcoming-features-1723515799181.md new file mode 100644 index 00000000000..6191af6f59d --- /dev/null +++ b/packages/manager/.changeset/pr-10776-upcoming-features-1723515799181.md @@ -0,0 +1,5 @@ +--- +"@linode/manager": Upcoming Features +--- + +Hide CORS and SSL for OBJ Gen2 ([#10776](https://github.com/linode/manager/pull/10776)) diff --git a/packages/manager/src/features/ObjectStorage/BucketDetail/AccessSelect.tsx b/packages/manager/src/features/ObjectStorage/BucketDetail/AccessSelect.tsx index e77dd8eb178..659cb2bba68 100644 --- a/packages/manager/src/features/ObjectStorage/BucketDetail/AccessSelect.tsx +++ b/packages/manager/src/features/ObjectStorage/BucketDetail/AccessSelect.tsx @@ -57,6 +57,8 @@ export const AccessSelect = React.memo((props: Props) => { // State for dealing with the confirmation modal when selecting read/write. const { close: closeDialog, isOpen, open: openDialog } = useOpenClose(); const label = capitalize(variant); + const isCorsEnabled = + variant === 'bucket' && endpointType !== 'E2' && endpointType !== 'E3'; React.useEffect(() => { setUpdateAccessError(''); @@ -141,9 +143,6 @@ export const AccessSelect = React.memo((props: Props) => { ? 'CORS Enabled' : 'CORS Disabled'; - const isCorsEnabled = - variant === 'bucket' && endpointType !== 'E2' && endpointType !== 'E3'; - const selectedOption = _options.find((thisOption) => thisOption.value === selectedACL) ?? _options.find((thisOption) => thisOption.value === 'private'); @@ -208,7 +207,19 @@ export const AccessSelect = React.memo((props: Props) => { . - ) : null} + ) : ( + // TODO: OBJGen2 - We need to handle link in upcoming PR + + ({ + fontFamily: theme.font.bold, + })} + > + CORS (Cross Origin Sharing) is not available for endpoint types E2 + and E3. Learn more. + + + )} { - const { bucketName, clusterId } = props; + const { bucketName, clusterId, endpointType } = props; return ( @@ -38,6 +42,7 @@ export const BucketAccess = React.memo((props: Props) => { return updateBucketAccess(clusterId, bucketName, payload); }} + endpointType={endpointType} getAccess={() => getBucketAccess(clusterId, bucketName)} name={bucketName} variant="bucket" diff --git a/packages/manager/src/features/ObjectStorage/BucketDetail/index.tsx b/packages/manager/src/features/ObjectStorage/BucketDetail/index.tsx index a9de5a9e16f..b907ddf48e1 100644 --- a/packages/manager/src/features/ObjectStorage/BucketDetail/index.tsx +++ b/packages/manager/src/features/ObjectStorage/BucketDetail/index.tsx @@ -57,6 +57,8 @@ export const BucketDetailLanding = React.memo((props: Props) => { const { endpoint_type: endpointType } = bucketsData?.buckets.find(({ label }) => label === bucketName) ?? {}; + const isSSLEnabled = endpointType !== 'E2' && endpointType === 'E3'; + const tabs = [ { routeName: `${props.match.url}/objects`, @@ -66,10 +68,14 @@ export const BucketDetailLanding = React.memo((props: Props) => { routeName: `${props.match.url}/access`, title: 'Access', }, - { - routeName: `${props.match.url}/ssl`, - title: 'SSL/TLS', - }, + ...(!isSSLEnabled + ? [ + { + routeName: `${props.match.url}/ssl`, + title: 'SSL/TLS', + }, + ] + : []), ]; const [index, setIndex] = React.useState( @@ -109,7 +115,11 @@ export const BucketDetailLanding = React.memo((props: Props) => { - + diff --git a/packages/manager/src/queries/object-storage/queries.ts b/packages/manager/src/queries/object-storage/queries.ts index ddc77351830..5314f337a1e 100644 --- a/packages/manager/src/queries/object-storage/queries.ts +++ b/packages/manager/src/queries/object-storage/queries.ts @@ -145,11 +145,11 @@ export const useObjectStorageBuckets = (enabled = true) => { ? allRegions?.filter((r) => r.capabilities.includes('Object Storage')) : undefined; - const queryEnabled = isObjectStorageGen2Enabled - ? Boolean(endpoints) && enabled - : isObjMultiClusterEnabled - ? Boolean(regions) && enabled - : Boolean(clusters) && enabled; + const queryEnabled = + enabled && + ((isObjectStorageGen2Enabled && Boolean(endpoints)) || + (isObjMultiClusterEnabled && Boolean(regions)) || + Boolean(clusters)); const queryFn = isObjectStorageGen2Enabled ? () => getAllBucketsFromEndpoints(endpoints) From bb375ff87a153137e6090172e2e7e7c2e4493804 Mon Sep 17 00:00:00 2001 From: Connie Liu <139280159+coliu-akamai@users.noreply.github.com> Date: Mon, 19 Aug 2024 09:08:05 -0400 Subject: [PATCH 02/49] change: [M3-6843] - Move manual snapshot error message to snapshot confirmation dialog (#10791) * move error to confirmation dialogue * reset errors when closing dialogue * Added changeset: Move manual snapshot error message from Linode Backups page to snapshot confirmation dialogue * fix typo + add tests * slight update to error message test * address feedback --- .../pr-10791-changed-1723820950904.md | 5 ++ .../LinodeBackup/CaptureSnapshot.tsx | 11 +-- ...CaptureSnapshotConfirmationDialog.test.tsx | 84 +++++++++++++++++++ .../CaptureSnapshotConfirmationDialog.tsx | 6 +- .../LinodeBackup/LinodeBackups.tsx | 5 +- 5 files changed, 100 insertions(+), 11 deletions(-) create mode 100644 packages/manager/.changeset/pr-10791-changed-1723820950904.md create mode 100644 packages/manager/src/features/Linodes/LinodesDetail/LinodeBackup/CaptureSnapshotConfirmationDialog.test.tsx diff --git a/packages/manager/.changeset/pr-10791-changed-1723820950904.md b/packages/manager/.changeset/pr-10791-changed-1723820950904.md new file mode 100644 index 00000000000..f9ed3e7ddfe --- /dev/null +++ b/packages/manager/.changeset/pr-10791-changed-1723820950904.md @@ -0,0 +1,5 @@ +--- +"@linode/manager": Changed +--- + +Move manual snapshot error message from Linode Backups page to snapshot confirmation dialog ([#10791](https://github.com/linode/manager/pull/10791)) diff --git a/packages/manager/src/features/Linodes/LinodesDetail/LinodeBackup/CaptureSnapshot.tsx b/packages/manager/src/features/Linodes/LinodesDetail/LinodeBackup/CaptureSnapshot.tsx index 3790cbfa58c..e25355458de 100644 --- a/packages/manager/src/features/Linodes/LinodesDetail/LinodeBackup/CaptureSnapshot.tsx +++ b/packages/manager/src/features/Linodes/LinodesDetail/LinodeBackup/CaptureSnapshot.tsx @@ -6,7 +6,6 @@ import * as React from 'react'; import { Box } from 'src/components/Box'; import { Button } from 'src/components/Button/Button'; import { FormControl } from 'src/components/FormControl'; -import { Notice } from 'src/components/Notice/Notice'; import { Paper } from 'src/components/Paper'; import { TextField } from 'src/components/TextField'; import { Typography } from 'src/components/Typography'; @@ -31,6 +30,7 @@ export const CaptureSnapshot = (props: Props) => { error: snapshotError, isLoading: isSnapshotLoading, mutateAsync: takeSnapshot, + reset, } = useLinodeBackupSnapshotMutation(linodeId); const [ @@ -65,19 +65,14 @@ export const CaptureSnapshot = (props: Props) => { manual snapshot will not be overwritten by automatic backups. - {hasErrorFor.none && ( - - {hasErrorFor.none} - - )} From 6c9ad93851b2c22bf3c4b7a5964d3057d4145a37 Mon Sep 17 00:00:00 2001 From: Jaalah Ramos <125309814+jaalah-akamai@users.noreply.github.com> Date: Wed, 28 Aug 2024 12:15:21 -0400 Subject: [PATCH 39/49] fix: [M3-8466] - Improve validation rules for create bucket schema (#10842) * Add more validation to our create bucket schema * Added changeset: Error validation for letter casing now correctly appears for labels. * Fix changeset --------- Co-authored-by: Jaalah Ramos --- .../validation/.changeset/pr-10842-fixed-1724786185430.md | 5 +++++ packages/validation/src/buckets.schema.ts | 4 ++++ 2 files changed, 9 insertions(+) create mode 100644 packages/validation/.changeset/pr-10842-fixed-1724786185430.md diff --git a/packages/validation/.changeset/pr-10842-fixed-1724786185430.md b/packages/validation/.changeset/pr-10842-fixed-1724786185430.md new file mode 100644 index 00000000000..368483e1310 --- /dev/null +++ b/packages/validation/.changeset/pr-10842-fixed-1724786185430.md @@ -0,0 +1,5 @@ +--- +"@linode/validation": Fixed +--- + +Error validation for letter casing when creating object storage bucket now correctly appears for labels. ([#10842](https://github.com/linode/manager/pull/10842)) diff --git a/packages/validation/src/buckets.schema.ts b/packages/validation/src/buckets.schema.ts index 3154665200b..02c74449a9c 100644 --- a/packages/validation/src/buckets.schema.ts +++ b/packages/validation/src/buckets.schema.ts @@ -8,6 +8,10 @@ export const CreateBucketSchema = object() label: string() .required('Label is required.') .matches(/^\S*$/, 'Label must not contain spaces.') + .matches( + /^[a-z0-9.-]*$/, + 'Label must consist only of lowercase letters, numbers, . (period), and - (dash).' + ) .min(3, 'Label must be between 3 and 63 characters.') .max(63, 'Label must be between 3 and 63 characters.') .test( From 14b02430623d770ddb6c60ac91957aec4863ed88 Mon Sep 17 00:00:00 2001 From: Connie Liu <139280159+coliu-akamai@users.noreply.github.com> Date: Wed, 28 Aug 2024 13:49:31 -0400 Subject: [PATCH 40/49] test: [M3-8432] - Cypress integration test for Object Storage Gen2: E0 endpoint, some additional unit tests (#10774) * starting unit tests for obj storage * bucket rate limit table unit tests * integration test for endpoint e0 * spacing disappeared? * create new folder for objStorage gen2 cypress tests * fixed test statement.. * Added changeset: Added cypress test for Object Storage Gen2 Create flow for endpoint type E0, added unit tests for new Gen2 components * update comments for test * include testid * ignore previous comment, updated flags for integration test * initial feedback pass * feedback additional pass * update flags, brb figuring out using mocks instead of intercepts * use mocks instead of intercepts * address feedback * reset mocks before tests * using waitfor instead? * unskip test/updates * additional checks on unit test @jaalah-akamai * server.boundary ?? * add additional timeout to waitFor * skipping bucket table tests - bit more investigating than I thought --- .../pr-10774-tests-1723501645286.md | 5 + .../bucket-create-gen2.spec.ts | 200 ++++++++++++++++++ .../support/intercepts/object-storage.ts | 22 +- .../BucketRateLimitTable.test.tsx | 49 +++++ .../BucketLanding/BucketRateLimitTable.tsx | 2 +- .../OMC_CreateBucketDrawer.test.tsx | 100 +++++++++ 6 files changed, 374 insertions(+), 4 deletions(-) create mode 100644 packages/manager/.changeset/pr-10774-tests-1723501645286.md create mode 100644 packages/manager/cypress/e2e/core/objectStorageGen2/bucket-create-gen2.spec.ts create mode 100644 packages/manager/src/features/ObjectStorage/BucketLanding/BucketRateLimitTable.test.tsx create mode 100644 packages/manager/src/features/ObjectStorage/BucketLanding/OMC_CreateBucketDrawer.test.tsx diff --git a/packages/manager/.changeset/pr-10774-tests-1723501645286.md b/packages/manager/.changeset/pr-10774-tests-1723501645286.md new file mode 100644 index 00000000000..26478266f9a --- /dev/null +++ b/packages/manager/.changeset/pr-10774-tests-1723501645286.md @@ -0,0 +1,5 @@ +--- +"@linode/manager": Tests +--- + +Added cypress test for Object Storage Gen2 Create flow for endpoint type E0, added unit tests for new Gen2 components ([#10774](https://github.com/linode/manager/pull/10774)) diff --git a/packages/manager/cypress/e2e/core/objectStorageGen2/bucket-create-gen2.spec.ts b/packages/manager/cypress/e2e/core/objectStorageGen2/bucket-create-gen2.spec.ts new file mode 100644 index 00000000000..9b28f1f4cd5 --- /dev/null +++ b/packages/manager/cypress/e2e/core/objectStorageGen2/bucket-create-gen2.spec.ts @@ -0,0 +1,200 @@ +import { mockGetAccount } from 'support/intercepts/account'; +import { mockAppendFeatureFlags } from 'support/intercepts/feature-flags'; +import { + mockGetObjectStorageEndpoints, + mockGetBuckets, + mockDeleteBucket, + mockCreateBucket, +} from 'support/intercepts/object-storage'; +import { mockGetRegions } from 'support/intercepts/regions'; +import { ui } from 'support/ui'; +import { randomLabel } from 'support/util/random'; +import { + accountFactory, + objectStorageBucketFactoryGen2, + objectStorageEndpointsFactory, + regionFactory, +} from 'src/factories'; +import { chooseRegion } from 'support/util/regions'; +import type { ObjectStorageEndpoint } from '@linode/api-v4'; + +describe('Object Storage Gen2 create bucket tests', () => { + // Moved these constants to top of scope - they will likely be used for other obj storage gen2 bucket create tests + const mockRegions = regionFactory.buildList(10, { + capabilities: ['Object Storage'], + }); + const mockRegion = chooseRegion({ regions: [...mockRegions] }); + + const mockEndpoints: ObjectStorageEndpoint[] = [ + objectStorageEndpointsFactory.build({ + endpoint_type: 'E0', + region: mockRegion.id, + s3_endpoint: null, + }), + objectStorageEndpointsFactory.build({ + endpoint_type: 'E1', + region: mockRegion.id, + s3_endpoint: null, + }), + objectStorageEndpointsFactory.build({ + endpoint_type: 'E1', + region: mockRegion.id, + s3_endpoint: 'us-sea-1.linodeobjects.com', + }), + objectStorageEndpointsFactory.build({ + endpoint_type: 'E2', + region: mockRegion.id, + s3_endpoint: null, + }), + objectStorageEndpointsFactory.build({ + endpoint_type: 'E3', + region: mockRegion.id, + s3_endpoint: null, + }), + ]; + + /** + * Confirms UI flow for creating a gen2 Object Storage bucket with endpoint E0 + * Confirms all endpoints are displayed regardless if there's multiple of the same type + * Confirms S3 endpoint hostname displayed to differentiate between identical options in the dropdown + */ + it('can create a bucket with endpoint type 0', () => { + const endpointTypeE0 = 'Legacy (E0)'; + const bucketLabel = randomLabel(); + + //wait for the newly 'created' mocked bucket to appear + const mockBucket = objectStorageBucketFactoryGen2.build({ + label: bucketLabel, + region: mockRegion.id, + endpoint_type: 'E0', + s3_endpoint: undefined, + }); + + mockGetBuckets([]).as('getBuckets'); + mockDeleteBucket(bucketLabel, mockRegion.id).as('deleteBucket'); + mockCreateBucket({ + label: bucketLabel, + endpoint_type: 'E0', + cors_enabled: true, + region: mockRegion.id, + }).as('createBucket'); + + mockAppendFeatureFlags({ + objMultiCluster: true, + objectStorageGen2: { enabled: true }, + }).as('getFeatureFlags'); + mockGetAccount( + accountFactory.build({ + capabilities: [ + 'Object Storage', + 'Object Storage Endpoint Types', + 'Object Storage Access Key Regions', + ], + }) + ).as('getAccount'); + + mockGetObjectStorageEndpoints(mockEndpoints).as( + 'getObjectStorageEndpoints' + ); + + mockGetRegions(mockRegions); + + cy.visitWithLogin('/object-storage/buckets/create'); + cy.wait([ + '@getFeatureFlags', + '@getBuckets', + '@getAccount', + '@getObjectStorageEndpoints', + ]); + + ui.drawer + .findByTitle('Create Bucket') + .should('be.visible') + .within(() => { + cy.findByText('Label').click().type(bucketLabel); + ui.regionSelect.find().click().type(`${mockRegion.label}{enter}`); + cy.findByLabelText('Object Storage Endpoint Type') + .should('be.visible') + .click(); + + // verify that all mocked endpoints show up as options + ui.autocompletePopper + .findByTitle('Standard (E1)') + .should('be.visible') + .should('be.enabled'); + ui.autocompletePopper + .findByTitle('Standard (E1) us-sea-1.linodeobjects.com') + .should('be.visible') + .should('be.enabled'); + ui.autocompletePopper + .findByTitle('Standard (E2)') + .should('be.visible') + .should('be.enabled'); + ui.autocompletePopper + .findByTitle('Standard (E3)') + .should('be.visible') + .should('be.enabled'); + + // Select E0 endpoint + ui.autocompletePopper + .findByTitle('Legacy (E0)') + .should('be.visible') + .should('be.enabled') + .click(); + + // Confirm bucket rate limits text for E0 endpoint + cy.findByText('Bucket Rate Limits').should('be.visible'); + 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 when E0 endpoint is selected + cy.get('[data-testid="bucket-rate-limit-table"]').should('not.exist'); + + ui.buttonGroup + .findButtonByTitle('Create Bucket') + .should('be.visible') + .should('be.enabled') + .click(); + }); + + mockGetBuckets([mockBucket]).as('getBuckets'); + cy.wait(['@getBuckets']); + + // Confirm request body has expected data + cy.wait('@createBucket').then((xhr) => { + const requestPayload = xhr.request.body; + expect(requestPayload['endpoint_type']).to.equal('E0'); + expect(requestPayload['cors_enabled']).to.equal(true); + }); + + ui.drawer.find().should('not.exist'); + + // Confirm that bucket is created, initiate deletion for cleanup + cy.findByText(endpointTypeE0).should('be.visible'); + cy.findByText(bucketLabel) + .should('be.visible') + .closest('tr') + .within(() => { + cy.findByText(mockRegion.label).should('be.visible'); + ui.button.findByTitle('Delete').should('be.visible').click(); + }); + + ui.dialog + .findByTitle(`Delete Bucket ${bucketLabel}`) + .should('be.visible') + .within(() => { + cy.findByLabelText('Bucket Name').click().type(bucketLabel); + ui.buttonGroup + .findButtonByTitle('Delete') + .should('be.visible') + .should('be.enabled') + .click(); + }); + + // Confirm bucket gets deleted + mockGetBuckets([]).as('getBuckets'); + cy.wait(['@deleteBucket', '@getBuckets']); + cy.findByText(bucketLabel).should('not.exist'); + }); +}); diff --git a/packages/manager/cypress/support/intercepts/object-storage.ts b/packages/manager/cypress/support/intercepts/object-storage.ts index ae266ee9482..0515ca8266b 100644 --- a/packages/manager/cypress/support/intercepts/object-storage.ts +++ b/packages/manager/cypress/support/intercepts/object-storage.ts @@ -8,10 +8,13 @@ import { apiMatcher } from 'support/util/intercepts'; import { paginateResponse } from 'support/util/paginate'; import { makeResponse } from 'support/util/response'; +import { objectStorageBucketFactoryGen2 } from 'src/factories'; + import type { CreateObjectStorageBucketPayload, ObjectStorageBucket, ObjectStorageCluster, + ObjectStorageEndpoint, ObjectStorageKey, } from '@linode/api-v4'; @@ -92,7 +95,12 @@ export const mockCreateBucket = ( return cy.intercept( 'POST', apiMatcher('object-storage/buckets'), - makeResponse(bucket) + makeResponse( + objectStorageBucketFactoryGen2.build({ + ...bucket, + s3_endpoint: undefined, + }) + ) ); }; @@ -483,8 +491,16 @@ export const interceptUpdateBucketAccess = ( /** * Intercepts GET request to get object storage endpoints. * + * @param endpoints - Object Storage endpoints for which to mock response + * * @returns Cypress chainable. */ -export const interceptGetObjectStorageEndpoints = (): Cypress.Chainable => { - return cy.intercept('GET', apiMatcher(`object-storage/endpoints`)); +export const mockGetObjectStorageEndpoints = ( + endpoints: ObjectStorageEndpoint[] +): Cypress.Chainable => { + return cy.intercept( + 'GET', + apiMatcher(`object-storage/endpoints*`), + paginateResponse(endpoints) + ); }; diff --git a/packages/manager/src/features/ObjectStorage/BucketLanding/BucketRateLimitTable.test.tsx b/packages/manager/src/features/ObjectStorage/BucketLanding/BucketRateLimitTable.test.tsx new file mode 100644 index 00000000000..69110f0ccda --- /dev/null +++ b/packages/manager/src/features/ObjectStorage/BucketLanding/BucketRateLimitTable.test.tsx @@ -0,0 +1,49 @@ +import * as React from 'react'; + +import { renderWithTheme } from 'src/utilities/testHelpers'; + +import { BucketRateLimitTable } from './BucketRateLimitTable'; + +// recent bucket rate limit changes cause these tests to fail + bug when opening up Create Bucket drawer. +// commenting out these tests for now + will investigate in a separate PR (need to investigate further) +describe.skip('BucketRateLimitTable', () => { + it('should render a BucketRateLimitTable', () => { + const { getAllByRole, getByText, queryByText } = renderWithTheme( + + ); + + // ensure table headers render as expected + const headers = ['Limits', 'GET', 'PUT', 'LIST', 'DELETE', 'OTHER']; + headers.forEach((header) => { + expect(getByText(header)).toBeInTheDocument(); + }); + + // ensure all rows render + const rows = getAllByRole('row'); + // 1 header row + 2 data rows + expect(rows).toHaveLength(3); + + // if endpoint type is not E3, table data should not contain value 20,000 + const limitValue5000 = getByText('5,000'); + expect(limitValue5000).toBeVisible(); + const limitValue20000 = queryByText('20,000'); + expect(limitValue20000).not.toBeInTheDocument(); + }); + + it('should update the limit table value for an E3 endpoint', () => { + const { getAllByRole, getByText, queryByText } = renderWithTheme( + + ); + + // ensure all rows render + const rows = getAllByRole('row'); + // 1 header row + 2 data rows + expect(rows).toHaveLength(3); + + // if endpoint type is E3, table data should contain value 20,000 + const limitValue20000 = getByText('20,000'); + expect(limitValue20000).toBeVisible(); + const limitValue5000 = queryByText('5,000'); + expect(limitValue5000).not.toBeInTheDocument(); + }); +}); diff --git a/packages/manager/src/features/ObjectStorage/BucketLanding/BucketRateLimitTable.tsx b/packages/manager/src/features/ObjectStorage/BucketLanding/BucketRateLimitTable.tsx index 3f698f1800b..4cd414406dd 100644 --- a/packages/manager/src/features/ObjectStorage/BucketLanding/BucketRateLimitTable.tsx +++ b/packages/manager/src/features/ObjectStorage/BucketLanding/BucketRateLimitTable.tsx @@ -58,7 +58,7 @@ export const BucketRateLimitTable = ({ }); return ( -
+
{tableHeaders.map((header, index) => { diff --git a/packages/manager/src/features/ObjectStorage/BucketLanding/OMC_CreateBucketDrawer.test.tsx b/packages/manager/src/features/ObjectStorage/BucketLanding/OMC_CreateBucketDrawer.test.tsx new file mode 100644 index 00000000000..a600017fb90 --- /dev/null +++ b/packages/manager/src/features/ObjectStorage/BucketLanding/OMC_CreateBucketDrawer.test.tsx @@ -0,0 +1,100 @@ +import { fireEvent, waitFor } from '@testing-library/react'; +import * as React from 'react'; + +import { objectStorageEndpointsFactory } from 'src/factories'; +import { makeResourcePage } from 'src/mocks/serverHandlers'; +import { HttpResponse, http, server } from 'src/mocks/testServer'; +import { renderWithThemeAndHookFormContext } from 'src/utilities/testHelpers'; + +import { OMC_CreateBucketDrawer } from './OMC_CreateBucketDrawer'; + +const props = { + isOpen: true, + onClose: vi.fn(), +}; + +describe('OMC_CreateBucketDrawer', () => { + beforeEach(() => { + vi.resetAllMocks(); + }); + + it('should render the drawer', () => { + const { + getByTestId, + getByText, + queryByText, + } = renderWithThemeAndHookFormContext({ + component: , + options: { + flags: { + objMultiCluster: true, + objectStorageGen2: { enabled: true }, + }, + }, + }); + + expect(getByTestId('drawer-title')).toBeVisible(); + expect(getByText('Label')).toBeVisible(); + expect(getByText('Region')).toBeVisible(); + expect(getByText('Cancel')).toBeVisible(); + expect(getByTestId('create-bucket-button')).toBeVisible(); + expect(queryByText('Object Storage Endpoint Type')).not.toBeInTheDocument(); + }); + + it( + 'should display the endpoint selector if endpoints exist', + server.boundary(async () => { + server.use( + http.get('*/v4/object-storage/endpoints', () => { + return HttpResponse.json( + makeResourcePage([ + objectStorageEndpointsFactory.build({ + endpoint_type: 'E0', + region: 'us-sea', + s3_endpoint: null, + }), + ]) + ); + }) + ); + + const { getByText, queryByText } = renderWithThemeAndHookFormContext({ + component: , + options: { + flags: { + objMultiCluster: true, + objectStorageGen2: { enabled: true }, + }, + }, + }); + + expect( + queryByText('Object Storage Endpoint Type') + ).not.toBeInTheDocument(); + + await waitFor( + () => + expect(getByText('Object Storage Endpoint Type')).toBeInTheDocument(), + { + timeout: 2000, + } + ); + + // Additional verification after waitFor + const endpointTypeElement = getByText('Object Storage Endpoint Type'); + expect(endpointTypeElement).toBeVisible(); + expect(endpointTypeElement.tagName).toBe('LABEL'); + }) + ); + + it('should close the drawer', () => { + const { getByText } = renderWithThemeAndHookFormContext({ + component: , + }); + + const cancelButton = getByText('Cancel'); + expect(cancelButton).toBeVisible(); + fireEvent.click(cancelButton); + expect(props.onClose).toHaveBeenCalled(); + }); +}); From fb93fa56002e169228e4a8c129e7488515e36d92 Mon Sep 17 00:00:00 2001 From: Banks Nussman <115251059+bnussman-akamai@users.noreply.github.com> Date: Wed, 28 Aug 2024 16:10:40 -0400 Subject: [PATCH 41/49] fix: [M3-8500] - Restricted users without account access unable to create Linodes on Linode Create v2 (#10846) * initial fix * Added changeset: Restricted users without account access unable to create Linodes on Linode Create v2 --------- Co-authored-by: Banks Nussman --- .../.changeset/pr-10846-fixed-1724859567426.md | 5 +++++ .../src/features/Linodes/LinodeCreatev2/index.tsx | 14 +++++++++----- .../features/Linodes/LinodeCreatev2/resolvers.ts | 9 ++++++--- .../features/Linodes/LinodeCreatev2/utilities.ts | 13 +++++++++++++ 4 files changed, 33 insertions(+), 8 deletions(-) create mode 100644 packages/manager/.changeset/pr-10846-fixed-1724859567426.md diff --git a/packages/manager/.changeset/pr-10846-fixed-1724859567426.md b/packages/manager/.changeset/pr-10846-fixed-1724859567426.md new file mode 100644 index 00000000000..1c37ba54784 --- /dev/null +++ b/packages/manager/.changeset/pr-10846-fixed-1724859567426.md @@ -0,0 +1,5 @@ +--- +"@linode/manager": Fixed +--- + +Restricted users without account access unable to create Linodes on Linode Create v2 ([#10846](https://github.com/linode/manager/pull/10846)) diff --git a/packages/manager/src/features/Linodes/LinodeCreatev2/index.tsx b/packages/manager/src/features/Linodes/LinodeCreatev2/index.tsx index 0a7e7524887..e3dde917e42 100644 --- a/packages/manager/src/features/Linodes/LinodeCreatev2/index.tsx +++ b/packages/manager/src/features/Linodes/LinodeCreatev2/index.tsx @@ -20,6 +20,7 @@ import { useCloneLinodeMutation, useCreateLinodeMutation, } from 'src/queries/linodes/linodes'; +import { useProfile } from 'src/queries/profile/profile'; import { sendLinodeCreateFormInputEvent, sendLinodeCreateFormSubmitEvent, @@ -58,18 +59,21 @@ import { import { VLAN } from './VLAN'; import { VPC } from './VPC/VPC'; -import type { LinodeCreateFormValues } from './utilities'; +import type { + LinodeCreateFormContext, + LinodeCreateFormValues, +} from './utilities'; import type { SubmitHandler } from 'react-hook-form'; export const LinodeCreatev2 = () => { const { params, setParams } = useLinodeCreateQueryParams(); + const { secureVMNoticesEnabled } = useSecureVMNoticesEnabled(); + const { data: profile } = useProfile(); const queryClient = useQueryClient(); - const { secureVMNoticesEnabled } = useSecureVMNoticesEnabled(); - - const form = useForm({ - context: { secureVMNoticesEnabled }, + const form = useForm({ + context: { profile, secureVMNoticesEnabled }, defaultValues: () => defaultValues(params, queryClient), mode: 'onBlur', resolver: getLinodeCreateResolver(params.type, queryClient), diff --git a/packages/manager/src/features/Linodes/LinodeCreatev2/resolvers.ts b/packages/manager/src/features/Linodes/LinodeCreatev2/resolvers.ts index e95f38d40f4..5981245a8d7 100644 --- a/packages/manager/src/features/Linodes/LinodeCreatev2/resolvers.ts +++ b/packages/manager/src/features/Linodes/LinodeCreatev2/resolvers.ts @@ -13,14 +13,17 @@ import { import { getLinodeCreatePayload } from './utilities'; import type { LinodeCreateType } from '../LinodesCreate/types'; -import type { LinodeCreateFormValues } from './utilities'; +import type { + LinodeCreateFormContext, + LinodeCreateFormValues, +} from './utilities'; import type { QueryClient } from '@tanstack/react-query'; import type { FieldErrors, Resolver } from 'react-hook-form'; export const getLinodeCreateResolver = ( tab: LinodeCreateType | undefined, queryClient: QueryClient -): Resolver => { +): Resolver => { const schema = linodeCreateResolvers[tab ?? 'OS']; return async (values, context, options) => { const transformedValues = getLinodeCreatePayload(structuredClone(values)); @@ -46,7 +49,7 @@ export const getLinodeCreateResolver = ( getRegionCountryGroup(selectedRegion) ); - if (hasSelectedAnEURegion) { + if (hasSelectedAnEURegion && !context?.profile?.restricted) { const agreements = await queryClient.ensureQueryData( accountQueries.agreements ); diff --git a/packages/manager/src/features/Linodes/LinodeCreatev2/utilities.ts b/packages/manager/src/features/Linodes/LinodeCreatev2/utilities.ts index b0c92b33886..a5b136b5044 100644 --- a/packages/manager/src/features/Linodes/LinodeCreatev2/utilities.ts +++ b/packages/manager/src/features/Linodes/LinodeCreatev2/utilities.ts @@ -20,6 +20,7 @@ import type { CreateLinodeRequest, InterfacePayload, Linode, + Profile, } from '@linode/api-v4'; import type { QueryClient } from '@tanstack/react-query'; import type { FieldErrors } from 'react-hook-form'; @@ -260,6 +261,18 @@ export interface LinodeCreateFormValues extends CreateLinodeRequest { linode?: Linode | null; } +export interface LinodeCreateFormContext { + /** + * Profile data is used in the Linode Create v2 resolver because + * restricted users are subject to different validation. + */ + profile: Profile | undefined; + /** + * Used for dispaying warnings to internal Akamai employees. + */ + secureVMNoticesEnabled: boolean; +} + /** * This function initializes the Linode Create flow form * when the form mounts. From 38eabf3c1b926d228794e0a3d2456c3607546551 Mon Sep 17 00:00:00 2001 From: Jaalah Ramos <125309814+jaalah-akamai@users.noreply.github.com> Date: Wed, 28 Aug 2024 16:28:11 -0400 Subject: [PATCH 42/49] fix: [M3-8467] - Improve validation rules for create bucket schema (#10847) * More validation * Update packages/validation/.changeset/pr-10842-fixed-1724786185430.md Co-authored-by: Mariah Jacobs <114685994+mjac0bs@users.noreply.github.com> * Review updates --------- Co-authored-by: Jaalah Ramos Co-authored-by: Mariah Jacobs <114685994+mjac0bs@users.noreply.github.com> --- .../BucketLanding/OMC_CreateBucketDrawer.tsx | 2 +- .../.changeset/pr-10842-fixed-1724786185430.md | 2 +- packages/validation/src/buckets.schema.ts | 10 +++++++--- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/packages/manager/src/features/ObjectStorage/BucketLanding/OMC_CreateBucketDrawer.tsx b/packages/manager/src/features/ObjectStorage/BucketLanding/OMC_CreateBucketDrawer.tsx index f38daab7343..4cce7084f1a 100644 --- a/packages/manager/src/features/ObjectStorage/BucketLanding/OMC_CreateBucketDrawer.tsx +++ b/packages/manager/src/features/ObjectStorage/BucketLanding/OMC_CreateBucketDrawer.tsx @@ -124,7 +124,7 @@ export const OMC_CreateBucketDrawer = (props: Props) => { region: '', s3_endpoint: undefined, }, - mode: 'onChange', + mode: 'onBlur', resolver: yupResolver(CreateBucketSchema), }); diff --git a/packages/validation/.changeset/pr-10842-fixed-1724786185430.md b/packages/validation/.changeset/pr-10842-fixed-1724786185430.md index 368483e1310..c5cc711f3ad 100644 --- a/packages/validation/.changeset/pr-10842-fixed-1724786185430.md +++ b/packages/validation/.changeset/pr-10842-fixed-1724786185430.md @@ -2,4 +2,4 @@ "@linode/validation": Fixed --- -Error validation for letter casing when creating object storage bucket now correctly appears for labels. ([#10842](https://github.com/linode/manager/pull/10842)) +Lack of `label` error validation for letter casing and symbols when creating Object Storage bucket ([#10842](https://github.com/linode/manager/pull/10842), [#10847](https://github.com/linode/manager/pull/10847)) diff --git a/packages/validation/src/buckets.schema.ts b/packages/validation/src/buckets.schema.ts index 02c74449a9c..e3d0d486608 100644 --- a/packages/validation/src/buckets.schema.ts +++ b/packages/validation/src/buckets.schema.ts @@ -7,12 +7,16 @@ export const CreateBucketSchema = object() { label: string() .required('Label is required.') + .min(3, 'Label must be between 3 and 63 characters.') .matches(/^\S*$/, 'Label must not contain spaces.') .matches( - /^[a-z0-9.-]*$/, - 'Label must consist only of lowercase letters, numbers, . (period), and - (dash).' + /^[a-z0-9].*[a-z0-9]$/, + 'Label must start and end with a letter or number.' + ) + .matches( + /^(?!.*[.-]{2})[a-z0-9.-]+$/, + 'Label must contain only lowercase letters, numbers, periods (.), and hyphens (-). Adjacent periods and hyphens are not allowed.' ) - .min(3, 'Label must be between 3 and 63 characters.') .max(63, 'Label must be between 3 and 63 characters.') .test( 'unique-label', From 2c891f971f51e18f007ec220db003f33dae84639 Mon Sep 17 00:00:00 2001 From: Hussain Khalil <122488130+hkhalil-akamai@users.noreply.github.com> Date: Wed, 28 Aug 2024 16:51:09 -0400 Subject: [PATCH 43/49] fix: [M3-8492] - Create Linode Firewall warning not appearing (#10838) * Simplify type for `firewall_id` field * Use `undefined` instead of -1 for no firewall selection * Remove redundant `useEffect` * Tweaks * Undo changes to validation package * Added changeset: Firewall warning not appearing in Create Linode flow * Added changeset: Remove `null` from `CreateLinodeRequest.firewall_id` * Fix `validateDOMNesting` warning * Fix `firewallOverride` in CLI payload * Re-add null to `firewall_id` * Remove debug --- .../pr-10838-fixed-1724705410961.md | 5 +++ .../SelectFirewallPanel.tsx | 10 ++--- .../Linodes/LinodeCreatev2/Firewall.tsx | 2 +- .../LinodeCreatev2/FirewallAuthorization.tsx | 41 +++++++---------- .../Linodes/LinodeCreatev2/resolvers.ts | 3 +- .../Linodes/LinodeCreatev2/utilities.ts | 6 ++- .../Linodes/LinodesCreate/LinodeCreate.tsx | 44 ++++++++----------- .../LinodesCreate/LinodeCreateContainer.tsx | 9 ++-- 8 files changed, 54 insertions(+), 66 deletions(-) create mode 100644 packages/manager/.changeset/pr-10838-fixed-1724705410961.md diff --git a/packages/manager/.changeset/pr-10838-fixed-1724705410961.md b/packages/manager/.changeset/pr-10838-fixed-1724705410961.md new file mode 100644 index 00000000000..7903e0317b5 --- /dev/null +++ b/packages/manager/.changeset/pr-10838-fixed-1724705410961.md @@ -0,0 +1,5 @@ +--- +"@linode/manager": Fixed +--- + +Firewall warning not appearing in Create Linode flow ([#10838](https://github.com/linode/manager/pull/10838)) diff --git a/packages/manager/src/components/SelectFirewallPanel/SelectFirewallPanel.tsx b/packages/manager/src/components/SelectFirewallPanel/SelectFirewallPanel.tsx index 6a16cb8a44f..ff9f53e57cb 100644 --- a/packages/manager/src/components/SelectFirewallPanel/SelectFirewallPanel.tsx +++ b/packages/manager/src/components/SelectFirewallPanel/SelectFirewallPanel.tsx @@ -20,9 +20,9 @@ import type { Firewall, FirewallDeviceEntityType } from '@linode/api-v4'; interface Props { disabled?: boolean; entityType: FirewallDeviceEntityType | undefined; - handleFirewallChange: (firewallID: number) => void; + handleFirewallChange: (firewallID: number | undefined) => void; helperText: JSX.Element; - selectedFirewallId: number; + selectedFirewallId: number | undefined; } export const SelectFirewallPanel = (props: Props) => { @@ -60,7 +60,7 @@ export const SelectFirewallPanel = (props: Props) => { })); const selectedFirewall = - selectedFirewallId !== -1 + selectedFirewallId !== undefined ? firewallsDropdownOptions.find( (option) => option.value === selectedFirewallId ) || null @@ -94,14 +94,12 @@ export const SelectFirewallPanel = (props: Props) => { /> )} - handleFirewallChange(selection?.value ?? -1) - } disabled={disabled} errorText={error?.[0].reason} label="Assign Firewall" loading={isLoading} noOptionsText="No Firewalls available" + onChange={(_, selection) => handleFirewallChange(selection?.value)} options={firewallsDropdownOptions} placeholder={'None'} value={selectedFirewall} diff --git a/packages/manager/src/features/Linodes/LinodeCreatev2/Firewall.tsx b/packages/manager/src/features/Linodes/LinodeCreatev2/Firewall.tsx index 374303ff6b9..00020a49f31 100644 --- a/packages/manager/src/features/Linodes/LinodeCreatev2/Firewall.tsx +++ b/packages/manager/src/features/Linodes/LinodeCreatev2/Firewall.tsx @@ -55,7 +55,7 @@ export const Firewall = () => { if (firewallId !== undefined) { clearErrors('firewallOverride'); } - field.onChange(firewallId ?? null); + field.onChange(firewallId); }; const firewallFormEventOptions: LinodeCreateFormEventOptions = { diff --git a/packages/manager/src/features/Linodes/LinodeCreatev2/FirewallAuthorization.tsx b/packages/manager/src/features/Linodes/LinodeCreatev2/FirewallAuthorization.tsx index 08981d673a6..418bbed7792 100644 --- a/packages/manager/src/features/Linodes/LinodeCreatev2/FirewallAuthorization.tsx +++ b/packages/manager/src/features/Linodes/LinodeCreatev2/FirewallAuthorization.tsx @@ -1,5 +1,4 @@ -import { Typography } from '@mui/material'; -import React, { useEffect } from 'react'; +import React from 'react'; import { useController, useFormContext } from 'react-hook-form'; import { AkamaiBanner } from 'src/components/AkamaiBanner/AkamaiBanner'; @@ -12,25 +11,16 @@ import type { LinodeCreateFormValues } from './utilities'; export const FirewallAuthorization = () => { const flags = useFlags(); - const { - clearErrors, - control, - watch, - } = useFormContext(); + const { control, watch } = useFormContext(); const { field, fieldState } = useController({ control, name: 'firewallOverride', }); const watchFirewall = watch('firewall_id'); - useEffect(() => { - if (isNotNullOrUndefined(watchFirewall)) { - clearErrors('firewallOverride'); - } - }, [clearErrors, watchFirewall]); if ( - watchFirewall !== undefined || + isNotNullOrUndefined(watchFirewall) || !(fieldState.isDirty || fieldState.error) ) { return; @@ -39,19 +29,18 @@ export const FirewallAuthorization = () => { return ( - } - disableTypography - onChange={field.onChange} - /> - + } + disableTypography + onChange={field.onChange} + sx={{ fontSize: 14 }} + /> } text={ flags.secureVmCopy?.firewallAuthorizationWarning ?? diff --git a/packages/manager/src/features/Linodes/LinodeCreatev2/resolvers.ts b/packages/manager/src/features/Linodes/LinodeCreatev2/resolvers.ts index 5981245a8d7..b98622b04b1 100644 --- a/packages/manager/src/features/Linodes/LinodeCreatev2/resolvers.ts +++ b/packages/manager/src/features/Linodes/LinodeCreatev2/resolvers.ts @@ -4,6 +4,7 @@ import { CreateLinodeSchema } from '@linode/validation'; import { accountQueries } from 'src/queries/account/queries'; import { regionQueries } from 'src/queries/regions/regions'; import { getRegionCountryGroup, isEURegion } from 'src/utilities/formatRegion'; +import { isNullOrUndefined } from 'src/utilities/nullOrUndefined'; import { CreateLinodeFromBackupSchema, @@ -70,7 +71,7 @@ export const getLinodeCreateResolver = ( const secureVMViolation = context?.secureVMNoticesEnabled && !values.firewallOverride && - !values.firewall_id; + isNullOrUndefined(values.firewall_id); if (secureVMViolation) { (errors as FieldErrors)['firewallOverride'] = { diff --git a/packages/manager/src/features/Linodes/LinodeCreatev2/utilities.ts b/packages/manager/src/features/Linodes/LinodeCreatev2/utilities.ts index a5b136b5044..631d6f417cb 100644 --- a/packages/manager/src/features/Linodes/LinodeCreatev2/utilities.ts +++ b/packages/manager/src/features/Linodes/LinodeCreatev2/utilities.ts @@ -148,7 +148,11 @@ export const tabs: LinodeCreateType[] = [ export const getLinodeCreatePayload = ( formValues: LinodeCreateFormValues ): CreateLinodeRequest => { - const values = omit(formValues, ['linode', 'hasSignedEUAgreement']); + const values = omit(formValues, [ + 'linode', + 'hasSignedEUAgreement', + 'firewallOverride', + ]); if (values.metadata?.user_data) { values.metadata.user_data = utoa(values.metadata.user_data); } diff --git a/packages/manager/src/features/Linodes/LinodesCreate/LinodeCreate.tsx b/packages/manager/src/features/Linodes/LinodesCreate/LinodeCreate.tsx index d214eee5753..96eed67ab62 100644 --- a/packages/manager/src/features/Linodes/LinodesCreate/LinodeCreate.tsx +++ b/packages/manager/src/features/Linodes/LinodesCreate/LinodeCreate.tsx @@ -119,10 +119,10 @@ export interface LinodeCreateProps { assignPublicIPv4Address: boolean; autoassignIPv4WithinVPC: boolean; checkValidation: LinodeCreateValidation; - checkedFirewallAuthorizaton: boolean; + checkedFirewallAuthorization: boolean; createType: CreateTypes; diskEncryptionEnabled: boolean; - firewallId?: number; + firewallId: number | undefined; handleAgreementChange: () => void; handleFirewallAuthorizationChange: () => void; handleFirewallChange: (firewallId: number) => void; @@ -297,8 +297,7 @@ export class LinodeCreate extends React.PureComponent< isDiskEncryptionFeatureEnabled && regionSupportsDiskEncryption ? diskEncryptionPayload : undefined, - firewall_id: - this.props.firewallId !== -1 ? this.props.firewallId : undefined, + firewall_id: this.props.firewallId, image: this.props.selectedImageID, label: this.props.label, placement_group: @@ -602,7 +601,7 @@ export class LinodeCreate extends React.PureComponent< const { account, accountBackupsEnabled, - checkedFirewallAuthorizaton, + checkedFirewallAuthorization, errors, flags, formIsSubmitting, @@ -793,11 +792,7 @@ export class LinodeCreate extends React.PureComponent< }); } - if ( - this.props.firewallId !== null && - this.props.firewallId !== undefined && - this.props.firewallId !== -1 - ) { + if (this.props.firewallId !== undefined) { displaySections.push({ title: 'Firewall Assigned', }); @@ -835,8 +830,8 @@ export class LinodeCreate extends React.PureComponent< const secureVMViolation = showFirewallAuthorization && - !checkedFirewallAuthorizaton && - this.props.firewallId === undefined; + this.props.firewallId === undefined && + !checkedFirewallAuthorization; return ( @@ -1003,9 +998,9 @@ export class LinodeCreate extends React.PureComponent< createType: (this.tabs[selectedTab].title as LinodeCreateType) ?? 'OS', - label: 'Choosing a Plan', headerName: 'Linode Plan', interaction: 'click', + label: 'Choosing a Plan', }); }} href="https://www.linode.com/docs/guides/choosing-a-compute-instance-plan/" @@ -1106,8 +1101,8 @@ export class LinodeCreate extends React.PureComponent< (this.tabs[selectedTab].title as LinodeCreateType) ?? 'OS', headerName: 'Firewall', - label: 'Learn more', interaction: 'click', + label: 'Learn more', }) } to={FIREWALL_GET_STARTED_LINK} @@ -1120,7 +1115,7 @@ export class LinodeCreate extends React.PureComponent< disabled={userCannotCreateLinode} entityType="linode" handleFirewallChange={this.props.handleFirewallChange} - selectedFirewallId={this.props.firewallId || -1} + selectedFirewallId={this.props.firewallId} /> )} - } - disableTypography - label={flags.secureVmCopy.firewallAuthorizationLabel} - onChange={handleFirewallAuthorizationChange} - /> - + } + disableTypography + label={flags.secureVmCopy.firewallAuthorizationLabel} + onChange={handleFirewallAuthorizationChange} + sx={{ fontSize: 14 }} + /> } text={flags.secureVmCopy.firewallAuthorizationWarning} warning diff --git a/packages/manager/src/features/Linodes/LinodesCreate/LinodeCreateContainer.tsx b/packages/manager/src/features/Linodes/LinodesCreate/LinodeCreateContainer.tsx index f88bfdb86d2..a22ee2d6371 100644 --- a/packages/manager/src/features/Linodes/LinodesCreate/LinodeCreateContainer.tsx +++ b/packages/manager/src/features/Linodes/LinodesCreate/LinodeCreateContainer.tsx @@ -25,6 +25,7 @@ import { withSecureVMNoticesEnabled } from 'src/containers/withSecureVMNoticesEn import withAgreements from 'src/features/Account/Agreements/withAgreements'; import { hasPlacementGroupReachedCapacity } from 'src/features/PlacementGroups/utils'; import { reportAgreementSigningError } from 'src/queries/account/agreements'; +import { accountQueries } from 'src/queries/account/queries'; import { sendCreateLinodeEvent, sendLinodeCreateFlowDocsClickEvent, @@ -36,11 +37,11 @@ import { import { capitalize } from 'src/utilities/capitalize'; import { getAPIErrorOrDefault } from 'src/utilities/errorUtils'; import { extendType } from 'src/utilities/extendType'; +import { isEURegion } from 'src/utilities/formatRegion'; import { getGDPRDetails, getSelectedRegionGroup, } from 'src/utilities/formatRegion'; -import { isEURegion } from 'src/utilities/formatRegion'; import { isNotNullOrUndefined } from 'src/utilities/nullOrUndefined'; import { UNKNOWN_PRICE } from 'src/utilities/pricing/constants'; import { getLinodeRegionPrice } from 'src/utilities/pricing/linodes'; @@ -89,7 +90,6 @@ import type { CreateTypes } from 'src/store/linodeCreate/linodeCreate.actions'; import type { MapState } from 'src/store/types'; import type { ExtendedType } from 'src/utilities/extendType'; import type { ExtendedIP } from 'src/utilities/ipUtils'; -import { accountQueries } from 'src/queries/account/queries'; const DEFAULT_IMAGE = 'linode/debian11'; @@ -371,7 +371,7 @@ class LinodeCreateContainer extends React.PureComponent { })); }; - handleFirewallChange = (firewallId: number) => { + handleFirewallChange = (firewallId: number | undefined) => { this.setState({ selectedfirewallId: firewallId }); }; @@ -903,9 +903,6 @@ class LinodeCreateContainer extends React.PureComponent { accountBackupsEnabled={ this.props.accountSettings.data?.backups_enabled ?? false } - checkedFirewallAuthorizaton={ - this.state.checkedFirewallAuthorization - } handleFirewallAuthorizationChange={ this.handleFirewallAuthorizationChange } From a169d1d846f2f68fb79fdcb77a404176f6832157 Mon Sep 17 00:00:00 2001 From: skulpok-akamai Date: Thu, 29 Aug 2024 15:36:18 +0200 Subject: [PATCH 44/49] fix: [M3-7305] - Correct Object Storage folder links containing special characters (#10822) * Add Intellij IDEA module files to .gitignore. * fix: [M3-7305] - Correct Object Storage folder links containing special characters. * Added changeset: Correct Object Storage folder links containing special characters. * fix: [M3-7305] - code review comment applied: table explicit declaration replaced with wrapWithTableBody * fix: [M3-7305] - corrected import for TableRowProps. * Update packages/manager/.changeset/pr-10819-fixed-1724404332335.md Co-authored-by: cpathipa <119517080+cpathipa@users.noreply.github.com> * Update packages/manager/src/features/ObjectStorage/BucketDetail/FolderTableRow.test.tsx Co-authored-by: cpathipa <119517080+cpathipa@users.noreply.github.com> * fix typo --------- Co-authored-by: cpathipa <119517080+cpathipa@users.noreply.github.com> Co-authored-by: Alban Bailly --- .gitignore | 1 + .../pr-10819-fixed-1724404332335.md | 5 ++++ .../BucketDetail/FolderTableRow.test.tsx | 27 +++++++++++++++++++ .../BucketDetail/FolderTableRow.tsx | 21 ++++++++++----- 4 files changed, 48 insertions(+), 6 deletions(-) create mode 100644 packages/manager/.changeset/pr-10819-fixed-1724404332335.md create mode 100644 packages/manager/src/features/ObjectStorage/BucketDetail/FolderTableRow.test.tsx diff --git a/.gitignore b/.gitignore index 933adffc825..734136b05e8 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ lib # editor configuration .vscode .idea +**/*.iml # misc .DS_Store diff --git a/packages/manager/.changeset/pr-10819-fixed-1724404332335.md b/packages/manager/.changeset/pr-10819-fixed-1724404332335.md new file mode 100644 index 00000000000..5a970fae343 --- /dev/null +++ b/packages/manager/.changeset/pr-10819-fixed-1724404332335.md @@ -0,0 +1,5 @@ +--- +"@linode/manager": Fixed +--- + +Correct links to Object Storage folders that contain special characters. ([#10819](https://github.com/linode/manager/pull/10819)) diff --git a/packages/manager/src/features/ObjectStorage/BucketDetail/FolderTableRow.test.tsx b/packages/manager/src/features/ObjectStorage/BucketDetail/FolderTableRow.test.tsx new file mode 100644 index 00000000000..ae323daa598 --- /dev/null +++ b/packages/manager/src/features/ObjectStorage/BucketDetail/FolderTableRow.test.tsx @@ -0,0 +1,27 @@ +import { render } from '@testing-library/react'; +import * as React from 'react'; + +import { FolderTableRow } from 'src/features/ObjectStorage/BucketDetail/FolderTableRow'; +import { wrapWithTableBody } from 'src/utilities/testHelpers'; + +import type { FolderTableRowProps } from 'src/features/ObjectStorage/BucketDetail/FolderTableRow'; + +describe('FolderTableRow', () => { + it('renders a link with URI-encoded special characters', () => { + const specialCharsProps: FolderTableRowProps = { + displayName: 'folder-with-special-chars...', + folderName: 'folder-with-special-chars <>#%+{}|^[]`;?:@=&$', + handleClickDelete: () => {}, + manuallyCreated: false, + }; + + const { getByRole } = render( + wrapWithTableBody() + ); + + expect(getByRole('link')).toHaveAttribute( + 'href', + '/?prefix=folder-with-special-chars%20%3C%3E%23%25%2B%7B%7D%7C%5E%5B%5D%60%3B%3F%3A%40%3D%26%24' + ); + }); +}); diff --git a/packages/manager/src/features/ObjectStorage/BucketDetail/FolderTableRow.tsx b/packages/manager/src/features/ObjectStorage/BucketDetail/FolderTableRow.tsx index f37af952753..72d2b094a38 100644 --- a/packages/manager/src/features/ObjectStorage/BucketDetail/FolderTableRow.tsx +++ b/packages/manager/src/features/ObjectStorage/BucketDetail/FolderTableRow.tsx @@ -6,29 +6,38 @@ import { Link } from 'react-router-dom'; import { EntityIcon } from 'src/components/EntityIcon/EntityIcon'; import { Hidden } from 'src/components/Hidden'; import { TableCell } from 'src/components/TableCell'; -import { TableRow } from 'src/components/TableRow'; +import { TableRow, TableRowProps } from 'src/components/TableRow'; import { FolderActionMenu } from './FolderActionMenu'; -interface Props { +export interface FolderTableRowProps extends TableRowProps { displayName: string; folderName: string; handleClickDelete: (objectName: string) => void; manuallyCreated: boolean; } -export const FolderTableRow = (props: Props) => { - const { displayName, folderName, handleClickDelete } = props; +export const FolderTableRow = (props: FolderTableRowProps) => { + const { + displayName, + folderName, + handleClickDelete, + manuallyCreated, + ...tableRowProps + } = props; return ( - + - + {displayName} From 94be125aff1f39f284cef1cde501f6544127829e Mon Sep 17 00:00:00 2001 From: Alban Bailly Date: Thu, 29 Aug 2024 10:22:31 -0400 Subject: [PATCH 45/49] Cloud version 1.127.0, API v4 version 0.125.0, and Validation version 0.52.0 --- ...r-10769-upcoming-features-1723465718778.md | 5 -- .../pr-10786-added-1723662117687.md | 5 -- .../pr-10801-changed-1724274276545.md | 5 -- ...r-10805-upcoming-features-1724163902024.md | 5 -- packages/api-v4/CHANGELOG.md | 17 +++++ packages/api-v4/package.json | 2 +- .../pr-10745-changed-1723666784731.md | 5 -- .../pr-10761-tests-1723056815829.md | 5 -- .../pr-10762-tech-stories-1723134446106.md | 5 -- ...r-10769-upcoming-features-1723465772614.md | 5 -- .../pr-10774-tests-1723501645286.md | 5 -- ...r-10776-upcoming-features-1723515799181.md | 5 -- .../pr-10781-tests-1723573598915.md | 5 -- .../pr-10784-added-1723651941893.md | 5 -- ...r-10786-upcoming-features-1723662207016.md | 5 -- ...r-10787-upcoming-features-1723672538179.md | 5 -- .../pr-10788-tests-1724160607781.md | 5 -- .../pr-10789-changed-1724075831126.md | 5 -- .../pr-10789-changed-1724075913480.md | 5 -- ...r-10790-upcoming-features-1724031092075.md | 5 -- .../pr-10791-changed-1723820950904.md | 5 -- ...r-10793-upcoming-features-1723845275155.md | 5 -- ...r-10795-upcoming-features-1724084768188.md | 5 -- ...r-10796-upcoming-features-1724152512210.md | 5 -- .../pr-10800-tech-stories-1724094117438.md | 5 -- ...r-10801-upcoming-features-1724274214381.md | 5 -- ...r-10803-upcoming-features-1724100276144.md | 5 -- ...r-10805-upcoming-features-1724163948287.md | 5 -- ...r-10807-upcoming-features-1724226251911.md | 5 -- .../pr-10808-changed-1724315097131.md | 5 -- .../pr-10809-changed-1724354812801.md | 5 -- .../pr-10811-tests-1724336950451.md | 5 -- .../pr-10818-tests-1724394944251.md | 5 -- .../pr-10819-fixed-1724404332335.md | 5 -- ...r-10821-upcoming-features-1724414057285.md | 5 -- .../pr-10824-fixed-1724428840947.md | 5 -- .../pr-10826-tests-1724431261722.md | 5 -- .../pr-10827-tech-stories-1724432793341.md | 5 -- .../pr-10828-fixed-1724688319150.md | 5 -- .../pr-10828-tests-1724688351092.md | 5 -- .../pr-10829-tech-stories-1724462593074.md | 5 -- .../pr-10830-tech-stories-1724469419694.md | 5 -- .../pr-10832-tests-1724681646686.md | 5 -- .../pr-10833-fixed-1724689652747.md | 5 -- .../pr-10836-tech-stories-1724703621384.md | 5 -- .../pr-10838-fixed-1724705410961.md | 5 -- .../pr-10840-tech-stories-1724713234913.md | 5 -- .../pr-10846-fixed-1724859567426.md | 5 -- packages/manager/CHANGELOG.md | 65 +++++++++++++++++++ packages/manager/package.json | 2 +- .../pr-10842-fixed-1724786185430.md | 5 -- packages/validation/CHANGELOG.md | 7 ++ packages/validation/package.json | 2 +- 53 files changed, 92 insertions(+), 238 deletions(-) delete mode 100644 packages/api-v4/.changeset/pr-10769-upcoming-features-1723465718778.md delete mode 100644 packages/api-v4/.changeset/pr-10786-added-1723662117687.md delete mode 100644 packages/api-v4/.changeset/pr-10801-changed-1724274276545.md delete mode 100644 packages/api-v4/.changeset/pr-10805-upcoming-features-1724163902024.md delete mode 100644 packages/manager/.changeset/pr-10745-changed-1723666784731.md delete mode 100644 packages/manager/.changeset/pr-10761-tests-1723056815829.md delete mode 100644 packages/manager/.changeset/pr-10762-tech-stories-1723134446106.md delete mode 100644 packages/manager/.changeset/pr-10769-upcoming-features-1723465772614.md delete mode 100644 packages/manager/.changeset/pr-10774-tests-1723501645286.md delete mode 100644 packages/manager/.changeset/pr-10776-upcoming-features-1723515799181.md delete mode 100644 packages/manager/.changeset/pr-10781-tests-1723573598915.md delete mode 100644 packages/manager/.changeset/pr-10784-added-1723651941893.md delete mode 100644 packages/manager/.changeset/pr-10786-upcoming-features-1723662207016.md delete mode 100644 packages/manager/.changeset/pr-10787-upcoming-features-1723672538179.md delete mode 100644 packages/manager/.changeset/pr-10788-tests-1724160607781.md delete mode 100644 packages/manager/.changeset/pr-10789-changed-1724075831126.md delete mode 100644 packages/manager/.changeset/pr-10789-changed-1724075913480.md delete mode 100644 packages/manager/.changeset/pr-10790-upcoming-features-1724031092075.md delete mode 100644 packages/manager/.changeset/pr-10791-changed-1723820950904.md delete mode 100644 packages/manager/.changeset/pr-10793-upcoming-features-1723845275155.md delete mode 100644 packages/manager/.changeset/pr-10795-upcoming-features-1724084768188.md delete mode 100644 packages/manager/.changeset/pr-10796-upcoming-features-1724152512210.md delete mode 100644 packages/manager/.changeset/pr-10800-tech-stories-1724094117438.md delete mode 100644 packages/manager/.changeset/pr-10801-upcoming-features-1724274214381.md delete mode 100644 packages/manager/.changeset/pr-10803-upcoming-features-1724100276144.md delete mode 100644 packages/manager/.changeset/pr-10805-upcoming-features-1724163948287.md delete mode 100644 packages/manager/.changeset/pr-10807-upcoming-features-1724226251911.md delete mode 100644 packages/manager/.changeset/pr-10808-changed-1724315097131.md delete mode 100644 packages/manager/.changeset/pr-10809-changed-1724354812801.md delete mode 100644 packages/manager/.changeset/pr-10811-tests-1724336950451.md delete mode 100644 packages/manager/.changeset/pr-10818-tests-1724394944251.md delete mode 100644 packages/manager/.changeset/pr-10819-fixed-1724404332335.md delete mode 100644 packages/manager/.changeset/pr-10821-upcoming-features-1724414057285.md delete mode 100644 packages/manager/.changeset/pr-10824-fixed-1724428840947.md delete mode 100644 packages/manager/.changeset/pr-10826-tests-1724431261722.md delete mode 100644 packages/manager/.changeset/pr-10827-tech-stories-1724432793341.md delete mode 100644 packages/manager/.changeset/pr-10828-fixed-1724688319150.md delete mode 100644 packages/manager/.changeset/pr-10828-tests-1724688351092.md delete mode 100644 packages/manager/.changeset/pr-10829-tech-stories-1724462593074.md delete mode 100644 packages/manager/.changeset/pr-10830-tech-stories-1724469419694.md delete mode 100644 packages/manager/.changeset/pr-10832-tests-1724681646686.md delete mode 100644 packages/manager/.changeset/pr-10833-fixed-1724689652747.md delete mode 100644 packages/manager/.changeset/pr-10836-tech-stories-1724703621384.md delete mode 100644 packages/manager/.changeset/pr-10838-fixed-1724705410961.md delete mode 100644 packages/manager/.changeset/pr-10840-tech-stories-1724713234913.md delete mode 100644 packages/manager/.changeset/pr-10846-fixed-1724859567426.md delete mode 100644 packages/validation/.changeset/pr-10842-fixed-1724786185430.md diff --git a/packages/api-v4/.changeset/pr-10769-upcoming-features-1723465718778.md b/packages/api-v4/.changeset/pr-10769-upcoming-features-1723465718778.md deleted file mode 100644 index 4edc74fe1c9..00000000000 --- a/packages/api-v4/.changeset/pr-10769-upcoming-features-1723465718778.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/api-v4": Upcoming Features ---- - -Update the type for AclpConfig ([#10769](https://github.com/linode/manager/pull/10769)) diff --git a/packages/api-v4/.changeset/pr-10786-added-1723662117687.md b/packages/api-v4/.changeset/pr-10786-added-1723662117687.md deleted file mode 100644 index 960ca5330b4..00000000000 --- a/packages/api-v4/.changeset/pr-10786-added-1723662117687.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/api-v4": Added ---- - -Managed Databases V2` capability and types ([#10786](https://github.com/linode/manager/pull/10786)) diff --git a/packages/api-v4/.changeset/pr-10801-changed-1724274276545.md b/packages/api-v4/.changeset/pr-10801-changed-1724274276545.md deleted file mode 100644 index d52b1ff5d74..00000000000 --- a/packages/api-v4/.changeset/pr-10801-changed-1724274276545.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/api-v4": Changed ---- - -Deprecated `getClusters` ([#10801](https://github.com/linode/manager/pull/10801)) diff --git a/packages/api-v4/.changeset/pr-10805-upcoming-features-1724163902024.md b/packages/api-v4/.changeset/pr-10805-upcoming-features-1724163902024.md deleted file mode 100644 index 46b8dd2d56c..00000000000 --- a/packages/api-v4/.changeset/pr-10805-upcoming-features-1724163902024.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/api-v4": Upcoming Features ---- - -Change resource_id to resource_ids in CloudPulseMetricRequest interface and add two new interfaces. Add getCloudPulseServiceTypes to fetch list of service types & modify getDashboards function to accept serviceType parameter ([#10805](https://github.com/linode/manager/pull/10805)) diff --git a/packages/api-v4/CHANGELOG.md b/packages/api-v4/CHANGELOG.md index 5310b2b6755..ad18b28f4b9 100644 --- a/packages/api-v4/CHANGELOG.md +++ b/packages/api-v4/CHANGELOG.md @@ -1,3 +1,20 @@ +## [2024-09-03] - v0.125.0 + + +### Added: + +- Managed Databases V2 capability and types ([#10786](https://github.com/linode/manager/pull/10786)) + +### Changed: + +- Deprecate `getClusters` ([#10801](https://github.com/linode/manager/pull/10801)) + +### Upcoming Features: + +- Update `AclpConfig` type ([#10769](https://github.com/linode/manager/pull/10769)) +- Add service types and `getCloudPulseServiceTypes` request ([#10805](https://github.com/linode/manager/pull/10805)) + + ## [2024-08-19] - v0.124.0 ### Added: diff --git a/packages/api-v4/package.json b/packages/api-v4/package.json index 2a590b140f7..2b6b3b95700 100644 --- a/packages/api-v4/package.json +++ b/packages/api-v4/package.json @@ -1,6 +1,6 @@ { "name": "@linode/api-v4", - "version": "0.124.0", + "version": "y", "homepage": "https://github.com/linode/manager/tree/develop/packages/api-v4", "bugs": { "url": "https://github.com/linode/manager/issues" diff --git a/packages/manager/.changeset/pr-10745-changed-1723666784731.md b/packages/manager/.changeset/pr-10745-changed-1723666784731.md deleted file mode 100644 index 1db2047bf20..00000000000 --- a/packages/manager/.changeset/pr-10745-changed-1723666784731.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/manager": Changed ---- - -Improve support ticket form pre-population and field labels ([#10745](https://github.com/linode/manager/pull/10745)) diff --git a/packages/manager/.changeset/pr-10761-tests-1723056815829.md b/packages/manager/.changeset/pr-10761-tests-1723056815829.md deleted file mode 100644 index 31314c0aa7b..00000000000 --- a/packages/manager/.changeset/pr-10761-tests-1723056815829.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/manager": Tests ---- - -Add test for Linode create error flows ([#10761](https://github.com/linode/manager/pull/10761)) diff --git a/packages/manager/.changeset/pr-10762-tech-stories-1723134446106.md b/packages/manager/.changeset/pr-10762-tech-stories-1723134446106.md deleted file mode 100644 index 665493fde8a..00000000000 --- a/packages/manager/.changeset/pr-10762-tech-stories-1723134446106.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/manager": Tech Stories ---- - -Improve local Storybook performance ([#10762](https://github.com/linode/manager/pull/10762)) diff --git a/packages/manager/.changeset/pr-10769-upcoming-features-1723465772614.md b/packages/manager/.changeset/pr-10769-upcoming-features-1723465772614.md deleted file mode 100644 index 2c7e4fd5794..00000000000 --- a/packages/manager/.changeset/pr-10769-upcoming-features-1723465772614.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/manager": Upcoming Features ---- - -Enhance support for passing Xfilters in existing databases fetch all instances query and Add a new query method for supporting custom filter using inbuilt API-V4 query factories for services like linode, dbaas etc., for upcoming CloudpulseCustomSelection component ([#10769](https://github.com/linode/manager/pull/10769)) diff --git a/packages/manager/.changeset/pr-10774-tests-1723501645286.md b/packages/manager/.changeset/pr-10774-tests-1723501645286.md deleted file mode 100644 index 26478266f9a..00000000000 --- a/packages/manager/.changeset/pr-10774-tests-1723501645286.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/manager": Tests ---- - -Added cypress test for Object Storage Gen2 Create flow for endpoint type E0, added unit tests for new Gen2 components ([#10774](https://github.com/linode/manager/pull/10774)) diff --git a/packages/manager/.changeset/pr-10776-upcoming-features-1723515799181.md b/packages/manager/.changeset/pr-10776-upcoming-features-1723515799181.md deleted file mode 100644 index 6191af6f59d..00000000000 --- a/packages/manager/.changeset/pr-10776-upcoming-features-1723515799181.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/manager": Upcoming Features ---- - -Hide CORS and SSL for OBJ Gen2 ([#10776](https://github.com/linode/manager/pull/10776)) diff --git a/packages/manager/.changeset/pr-10781-tests-1723573598915.md b/packages/manager/.changeset/pr-10781-tests-1723573598915.md deleted file mode 100644 index 92b25bc8c5a..00000000000 --- a/packages/manager/.changeset/pr-10781-tests-1723573598915.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/manager": Tests ---- - -Add test for Linode VPC config not recommended notices ([#10781](https://github.com/linode/manager/pull/10781)) diff --git a/packages/manager/.changeset/pr-10784-added-1723651941893.md b/packages/manager/.changeset/pr-10784-added-1723651941893.md deleted file mode 100644 index 3d28dae816f..00000000000 --- a/packages/manager/.changeset/pr-10784-added-1723651941893.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/manager": Added ---- - -CheckoutBar Story ([#10784](https://github.com/linode/manager/pull/10784)) diff --git a/packages/manager/.changeset/pr-10786-upcoming-features-1723662207016.md b/packages/manager/.changeset/pr-10786-upcoming-features-1723662207016.md deleted file mode 100644 index 60c3e568960..00000000000 --- a/packages/manager/.changeset/pr-10786-upcoming-features-1723662207016.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/manager": Upcoming Features ---- - -Update DBaaS menu item with V1 or V2 capability, add mock data ([#10786](https://github.com/linode/manager/pull/10786)) diff --git a/packages/manager/.changeset/pr-10787-upcoming-features-1723672538179.md b/packages/manager/.changeset/pr-10787-upcoming-features-1723672538179.md deleted file mode 100644 index f3a4d6841f4..00000000000 --- a/packages/manager/.changeset/pr-10787-upcoming-features-1723672538179.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/manager": Upcoming Features ---- - -Add 'Encrypt Volume' checkbox in Edit Volume drawer ([#10787](https://github.com/linode/manager/pull/10787)) diff --git a/packages/manager/.changeset/pr-10788-tests-1724160607781.md b/packages/manager/.changeset/pr-10788-tests-1724160607781.md deleted file mode 100644 index f834d75adb3..00000000000 --- a/packages/manager/.changeset/pr-10788-tests-1724160607781.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/manager": Tests ---- - -Refactor StackScript create test to be resilient to Image deprecations ([#10788](https://github.com/linode/manager/pull/10788)) diff --git a/packages/manager/.changeset/pr-10789-changed-1724075831126.md b/packages/manager/.changeset/pr-10789-changed-1724075831126.md deleted file mode 100644 index 1a181987e1e..00000000000 --- a/packages/manager/.changeset/pr-10789-changed-1724075831126.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/manager": Changed ---- - -Open LISH in a popup window rather than a new tab ([#10789](https://github.com/linode/manager/pull/10789)) diff --git a/packages/manager/.changeset/pr-10789-changed-1724075913480.md b/packages/manager/.changeset/pr-10789-changed-1724075913480.md deleted file mode 100644 index 4923307c7fb..00000000000 --- a/packages/manager/.changeset/pr-10789-changed-1724075913480.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/manager": Changed ---- - -Use static number of rows in column in LISH to prevent resize and cursor positioning problems ([#10789](https://github.com/linode/manager/pull/10789)) diff --git a/packages/manager/.changeset/pr-10790-upcoming-features-1724031092075.md b/packages/manager/.changeset/pr-10790-upcoming-features-1724031092075.md deleted file mode 100644 index 6e121f0bea1..00000000000 --- a/packages/manager/.changeset/pr-10790-upcoming-features-1724031092075.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/manager": Upcoming Features ---- - -Updated Bucket Rate Limits ([#10790](https://github.com/linode/manager/pull/10790)) diff --git a/packages/manager/.changeset/pr-10791-changed-1723820950904.md b/packages/manager/.changeset/pr-10791-changed-1723820950904.md deleted file mode 100644 index f9ed3e7ddfe..00000000000 --- a/packages/manager/.changeset/pr-10791-changed-1723820950904.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/manager": Changed ---- - -Move manual snapshot error message from Linode Backups page to snapshot confirmation dialog ([#10791](https://github.com/linode/manager/pull/10791)) diff --git a/packages/manager/.changeset/pr-10793-upcoming-features-1723845275155.md b/packages/manager/.changeset/pr-10793-upcoming-features-1723845275155.md deleted file mode 100644 index af5e1c985df..00000000000 --- a/packages/manager/.changeset/pr-10793-upcoming-features-1723845275155.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/manager": Upcoming Features ---- - -Add "Encryption" column to Linode Volumes table ([#10793](https://github.com/linode/manager/pull/10793)) diff --git a/packages/manager/.changeset/pr-10795-upcoming-features-1724084768188.md b/packages/manager/.changeset/pr-10795-upcoming-features-1724084768188.md deleted file mode 100644 index 58439d5a717..00000000000 --- a/packages/manager/.changeset/pr-10795-upcoming-features-1724084768188.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/manager": Upcoming Features ---- - -Add bucket management Properties Tab for Object Storage Gen2 ([#10795](https://github.com/linode/manager/pull/10795)) diff --git a/packages/manager/.changeset/pr-10796-upcoming-features-1724152512210.md b/packages/manager/.changeset/pr-10796-upcoming-features-1724152512210.md deleted file mode 100644 index c3649a92a72..00000000000 --- a/packages/manager/.changeset/pr-10796-upcoming-features-1724152512210.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/manager": Upcoming Features ---- - -Display Endpoint Type alongside each endpoint hostname in Regions Column & Hostnames Drawers ([#10796](https://github.com/linode/manager/pull/10796)) diff --git a/packages/manager/.changeset/pr-10800-tech-stories-1724094117438.md b/packages/manager/.changeset/pr-10800-tech-stories-1724094117438.md deleted file mode 100644 index 0886b75b4b2..00000000000 --- a/packages/manager/.changeset/pr-10800-tech-stories-1724094117438.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/manager": Tech Stories ---- - -Remove `patch-package` package ([#10800](https://github.com/linode/manager/pull/10800)) diff --git a/packages/manager/.changeset/pr-10801-upcoming-features-1724274214381.md b/packages/manager/.changeset/pr-10801-upcoming-features-1724274214381.md deleted file mode 100644 index a8a7db694ee..00000000000 --- a/packages/manager/.changeset/pr-10801-upcoming-features-1724274214381.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/manager": Upcoming Features ---- - -Add useRegionQuery and cleanup bucket landing page ([#10801](https://github.com/linode/manager/pull/10801)) diff --git a/packages/manager/.changeset/pr-10803-upcoming-features-1724100276144.md b/packages/manager/.changeset/pr-10803-upcoming-features-1724100276144.md deleted file mode 100644 index 3fa7cdbabd1..00000000000 --- a/packages/manager/.changeset/pr-10803-upcoming-features-1724100276144.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/manager": Upcoming Features ---- - -Add 'Encrypt Volume' checkbox to Clone Volume drawer ([#10803](https://github.com/linode/manager/pull/10803)) diff --git a/packages/manager/.changeset/pr-10805-upcoming-features-1724163948287.md b/packages/manager/.changeset/pr-10805-upcoming-features-1724163948287.md deleted file mode 100644 index 9c34b95554a..00000000000 --- a/packages/manager/.changeset/pr-10805-upcoming-features-1724163948287.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/manager": Upcoming Features ---- - -Modify CloudPulseDashboardSelect and its relevant queries to support multiple service types in the list ([#10805](https://github.com/linode/manager/pull/10805)) diff --git a/packages/manager/.changeset/pr-10807-upcoming-features-1724226251911.md b/packages/manager/.changeset/pr-10807-upcoming-features-1724226251911.md deleted file mode 100644 index b710ea68af5..00000000000 --- a/packages/manager/.changeset/pr-10807-upcoming-features-1724226251911.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/manager": Upcoming Features ---- - -Add new CloudPulseCustomSelect component and integrate with the global filter builder ([#10807](https://github.com/linode/manager/pull/10807)) diff --git a/packages/manager/.changeset/pr-10808-changed-1724315097131.md b/packages/manager/.changeset/pr-10808-changed-1724315097131.md deleted file mode 100644 index 655fd7dbb93..00000000000 --- a/packages/manager/.changeset/pr-10808-changed-1724315097131.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/manager": Changed ---- - -"Create Volume" button text to "Add Volume" ([#10808](https://github.com/linode/manager/pull/10808)) diff --git a/packages/manager/.changeset/pr-10809-changed-1724354812801.md b/packages/manager/.changeset/pr-10809-changed-1724354812801.md deleted file mode 100644 index 34116e2d1f9..00000000000 --- a/packages/manager/.changeset/pr-10809-changed-1724354812801.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/manager": Changed ---- - -Storybook nav organization ([#10809](https://github.com/linode/manager/pull/10809)) diff --git a/packages/manager/.changeset/pr-10811-tests-1724336950451.md b/packages/manager/.changeset/pr-10811-tests-1724336950451.md deleted file mode 100644 index 6f4175005c7..00000000000 --- a/packages/manager/.changeset/pr-10811-tests-1724336950451.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/manager": Tests ---- - -Resolve StackScripts pagination test failure ([#10811](https://github.com/linode/manager/pull/10811)) diff --git a/packages/manager/.changeset/pr-10818-tests-1724394944251.md b/packages/manager/.changeset/pr-10818-tests-1724394944251.md deleted file mode 100644 index 9ce4d41ea24..00000000000 --- a/packages/manager/.changeset/pr-10818-tests-1724394944251.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/manager": Tests ---- - -Add unit test cases for CheckoutBar component ([#10818](https://github.com/linode/manager/pull/10818)) diff --git a/packages/manager/.changeset/pr-10819-fixed-1724404332335.md b/packages/manager/.changeset/pr-10819-fixed-1724404332335.md deleted file mode 100644 index 5a970fae343..00000000000 --- a/packages/manager/.changeset/pr-10819-fixed-1724404332335.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/manager": Fixed ---- - -Correct links to Object Storage folders that contain special characters. ([#10819](https://github.com/linode/manager/pull/10819)) diff --git a/packages/manager/.changeset/pr-10821-upcoming-features-1724414057285.md b/packages/manager/.changeset/pr-10821-upcoming-features-1724414057285.md deleted file mode 100644 index bb6b4d6c586..00000000000 --- a/packages/manager/.changeset/pr-10821-upcoming-features-1724414057285.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/manager": Upcoming Features ---- - -Add bucket rate limit info to Object Storage Bucket Details drawer ([#10821](https://github.com/linode/manager/pull/10821)) diff --git a/packages/manager/.changeset/pr-10824-fixed-1724428840947.md b/packages/manager/.changeset/pr-10824-fixed-1724428840947.md deleted file mode 100644 index 94eda937dd4..00000000000 --- a/packages/manager/.changeset/pr-10824-fixed-1724428840947.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/manager": Fixed ---- - -Event handlers making a proportional number of GET requests to the number of incoming events ([#10824](https://github.com/linode/manager/pull/10824)) diff --git a/packages/manager/.changeset/pr-10826-tests-1724431261722.md b/packages/manager/.changeset/pr-10826-tests-1724431261722.md deleted file mode 100644 index 44f90061d7f..00000000000 --- a/packages/manager/.changeset/pr-10826-tests-1724431261722.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/manager": Tests ---- - -Resolve StackScript Linode deploy test flake ([#10826](https://github.com/linode/manager/pull/10826)) diff --git a/packages/manager/.changeset/pr-10827-tech-stories-1724432793341.md b/packages/manager/.changeset/pr-10827-tech-stories-1724432793341.md deleted file mode 100644 index 5cf22e645af..00000000000 --- a/packages/manager/.changeset/pr-10827-tech-stories-1724432793341.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/manager": Tech Stories ---- - -Update storybook to fix IP package vulnerability ([#10827](https://github.com/linode/manager/pull/10827)) diff --git a/packages/manager/.changeset/pr-10828-fixed-1724688319150.md b/packages/manager/.changeset/pr-10828-fixed-1724688319150.md deleted file mode 100644 index d416acf6081..00000000000 --- a/packages/manager/.changeset/pr-10828-fixed-1724688319150.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/manager": Fixed ---- - -Inaccessible, non-theme error text color in confirmation dialogs ([#10828](https://github.com/linode/manager/pull/10828)) diff --git a/packages/manager/.changeset/pr-10828-tests-1724688351092.md b/packages/manager/.changeset/pr-10828-tests-1724688351092.md deleted file mode 100644 index 3ebde0bb023..00000000000 --- a/packages/manager/.changeset/pr-10828-tests-1724688351092.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/manager": Tests ---- - -Add unit tests for Confirmation Dialogs ([#10828](https://github.com/linode/manager/pull/10828)) diff --git a/packages/manager/.changeset/pr-10829-tech-stories-1724462593074.md b/packages/manager/.changeset/pr-10829-tech-stories-1724462593074.md deleted file mode 100644 index 28f08628074..00000000000 --- a/packages/manager/.changeset/pr-10829-tech-stories-1724462593074.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/manager": Tech Stories ---- - -Update jsdom to remove WS package vulnerability ([#10829](https://github.com/linode/manager/pull/10829)) diff --git a/packages/manager/.changeset/pr-10830-tech-stories-1724469419694.md b/packages/manager/.changeset/pr-10830-tech-stories-1724469419694.md deleted file mode 100644 index 5a3b4d68cdc..00000000000 --- a/packages/manager/.changeset/pr-10830-tech-stories-1724469419694.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/manager": Tech Stories ---- - -Dependencies updates and resolution for `braces` package vulnerability ([#10830](https://github.com/linode/manager/pull/10830)) diff --git a/packages/manager/.changeset/pr-10832-tests-1724681646686.md b/packages/manager/.changeset/pr-10832-tests-1724681646686.md deleted file mode 100644 index bdee7bb7728..00000000000 --- a/packages/manager/.changeset/pr-10832-tests-1724681646686.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/manager": Tests ---- - -Allow region select helpers to be used with mock data ([#10832](https://github.com/linode/manager/pull/10832)) diff --git a/packages/manager/.changeset/pr-10833-fixed-1724689652747.md b/packages/manager/.changeset/pr-10833-fixed-1724689652747.md deleted file mode 100644 index 00a3b183d68..00000000000 --- a/packages/manager/.changeset/pr-10833-fixed-1724689652747.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/manager": Fixed ---- - -CreateSSHKeyDrawer being hidden by Rebuild Linode dialog ([#10833](https://github.com/linode/manager/pull/10833)) diff --git a/packages/manager/.changeset/pr-10836-tech-stories-1724703621384.md b/packages/manager/.changeset/pr-10836-tech-stories-1724703621384.md deleted file mode 100644 index 5ceebc8d2f3..00000000000 --- a/packages/manager/.changeset/pr-10836-tech-stories-1724703621384.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/manager": Tech Stories ---- - -Update browserlist to latest version ([#10836](https://github.com/linode/manager/pull/10836)) diff --git a/packages/manager/.changeset/pr-10838-fixed-1724705410961.md b/packages/manager/.changeset/pr-10838-fixed-1724705410961.md deleted file mode 100644 index 7903e0317b5..00000000000 --- a/packages/manager/.changeset/pr-10838-fixed-1724705410961.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/manager": Fixed ---- - -Firewall warning not appearing in Create Linode flow ([#10838](https://github.com/linode/manager/pull/10838)) diff --git a/packages/manager/.changeset/pr-10840-tech-stories-1724713234913.md b/packages/manager/.changeset/pr-10840-tech-stories-1724713234913.md deleted file mode 100644 index 79a55ef77ca..00000000000 --- a/packages/manager/.changeset/pr-10840-tech-stories-1724713234913.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/manager": Tech Stories ---- - -Tag Linode Create v2 with form events ([#10840](https://github.com/linode/manager/pull/10840)) diff --git a/packages/manager/.changeset/pr-10846-fixed-1724859567426.md b/packages/manager/.changeset/pr-10846-fixed-1724859567426.md deleted file mode 100644 index 1c37ba54784..00000000000 --- a/packages/manager/.changeset/pr-10846-fixed-1724859567426.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/manager": Fixed ---- - -Restricted users without account access unable to create Linodes on Linode Create v2 ([#10846](https://github.com/linode/manager/pull/10846)) diff --git a/packages/manager/CHANGELOG.md b/packages/manager/CHANGELOG.md index d56c2f42db3..abc35edd1f6 100644 --- a/packages/manager/CHANGELOG.md +++ b/packages/manager/CHANGELOG.md @@ -4,6 +4,71 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [2024-09-03] - v1.127.0 + + +### Added: + +- CheckoutBar Story ([#10784](https://github.com/linode/manager/pull/10784)) + +### Changed: + +- Improve support ticket form pre-population and field labels ([#10745](https://github.com/linode/manager/pull/10745)) +- Open LISH in a popup window rather than a new tab ([#10789](https://github.com/linode/manager/pull/10789)) +- Use static number of rows in column in LISH to prevent resize and cursor positioning problems ([#10789](https://github.com/linode/manager/pull/10789)) +- Move manual snapshot error message from Linode Backups page to snapshot confirmation dialog ([#10791](https://github.com/linode/manager/pull/10791)) +- "Create Volume" button text to "Add Volume" ([#10808](https://github.com/linode/manager/pull/10808)) +- Storybook navigation bar organization ([#10809](https://github.com/linode/manager/pull/10809)) + +### Fixed: + +- Inability to open Object Storage folders that contain special characters ([#10819](https://github.com/linode/manager/pull/10819)) +- Event handlers making a proportional number of GET requests to the number of incoming events ([#10824](https://github.com/linode/manager/pull/10824)) +- Inaccessible, non-theme error text color in confirmation dialogs ([#10828](https://github.com/linode/manager/pull/10828)) +- CreateSSHKeyDrawer being hidden by Rebuild Linode dialog ([#10833](https://github.com/linode/manager/pull/10833)) +- Firewall warning not appearing in Create Linode flow ([#10838](https://github.com/linode/manager/pull/10838)) +- Restricted users without account access unable to create Linodes on Linode Create v2 ([#10846](https://github.com/linode/manager/pull/10846)) + +### Tech Stories: + +- Improve local Storybook performance ([#10762](https://github.com/linode/manager/pull/10762)) +- Remove `patch-package` dependency ([#10800](https://github.com/linode/manager/pull/10800)) +- Update `storybook` to fix `ip` package vulnerability ([#10827](https://github.com/linode/manager/pull/10827)) +- Update `jsdom` to remove `ws` package vulnerability ([#10829](https://github.com/linode/manager/pull/10829)) +- Dependencies updates and resolution for `braces` package vulnerability ([#10830](https://github.com/linode/manager/pull/10830)) +- Update `browserlist` to latest version ([#10836](https://github.com/linode/manager/pull/10836)) +- Tag Linode Create v2 with form events ([#10840](https://github.com/linode/manager/pull/10840)) + +### Tests: + +- Add test for Linode create error flows ([#10761](https://github.com/linode/manager/pull/10761)) +- Add Cypress test for Object Storage Gen2 Create flow for endpoint type E0, added unit tests for new Gen2 components ([#10774](https://github.com/linode/manager/pull/10774)) +- Add unit tests for new Gen2 components ([#10774](https://github.com/linode/manager/pull/10774)) +- Add test for Linode VPC config not recommended notices ([#10781](https://github.com/linode/manager/pull/10781)) +- Refactor StackScript create test to be resilient to Image deprecations ([#10788](https://github.com/linode/manager/pull/10788)) +- Resolve StackScripts pagination test failure ([#10811](https://github.com/linode/manager/pull/10811)) +- Add unit test cases for CheckoutBar component ([#10818](https://github.com/linode/manager/pull/10818)) +- Resolve StackScript Linode deploy test flake ([#10826](https://github.com/linode/manager/pull/10826)) +- Add unit tests for Confirmation Dialogs ([#10828](https://github.com/linode/manager/pull/10828)) +- Allow region select helpers to be used with mock data ([#10832](https://github.com/linode/manager/pull/10832)) + +### Upcoming Features: + +- Enhance support for CloudPulse X-Filters ([#10769](https://github.com/linode/manager/pull/10769)) +- Hide CORS and SSL for OBJ Gen2 ([#10776](https://github.com/linode/manager/pull/10776)) +- Update DBaaS menu item with V1 or V2 capability, add mock data ([#10786](https://github.com/linode/manager/pull/10786)) +- Add “Encrypt Volume” checkbox in Edit Volume drawer ([#10787](https://github.com/linode/manager/pull/10787)) +- Update Bucket Rate Limits ([#10790](https://github.com/linode/manager/pull/10790)) +- Add "Encryption" column to Linode Volumes table ([#10793](https://github.com/linode/manager/pull/10793)) +- Add bucket management Properties Tab for Object Storage Gen2 ([#10795](https://github.com/linode/manager/pull/10795)) +- Display Endpoint Type alongside each endpoint hostname in Regions Column & Hostnames Drawers ([#10796](https://github.com/linode/manager/pull/10796)) +- Add useRegionQuery and cleanup bucket landing page ([#10801](https://github.com/linode/manager/pull/10801)) +- Add 'Encrypt Volume' checkbox to Clone Volume drawer ([#10803](https://github.com/linode/manager/pull/10803)) +- Modify CloudPulseDashboardSelect and its relevant queries to support multiple service types ([#10805](https://github.com/linode/manager/pull/10805)) +- Add new CloudPulseCustomSelect component and integrate with the global filter builder ([#10807](https://github.com/linode/manager/pull/10807)) +- Add bucket rate limit info to Object Storage Bucket Details drawer ([#10821](https://github.com/linode/manager/pull/10821)) + + ## [2024-08-22] - v1.126.1 ### Fix: diff --git a/packages/manager/package.json b/packages/manager/package.json index a7134241805..b9d8690d519 100644 --- a/packages/manager/package.json +++ b/packages/manager/package.json @@ -2,7 +2,7 @@ "name": "linode-manager", "author": "Linode", "description": "The Linode Manager website", - "version": "1.126.1", + "version": "y", "private": true, "type": "module", "bugs": { diff --git a/packages/validation/.changeset/pr-10842-fixed-1724786185430.md b/packages/validation/.changeset/pr-10842-fixed-1724786185430.md deleted file mode 100644 index c5cc711f3ad..00000000000 --- a/packages/validation/.changeset/pr-10842-fixed-1724786185430.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@linode/validation": Fixed ---- - -Lack of `label` error validation for letter casing and symbols when creating Object Storage bucket ([#10842](https://github.com/linode/manager/pull/10842), [#10847](https://github.com/linode/manager/pull/10847)) diff --git a/packages/validation/CHANGELOG.md b/packages/validation/CHANGELOG.md index b71b911287f..1160cd22c08 100644 --- a/packages/validation/CHANGELOG.md +++ b/packages/validation/CHANGELOG.md @@ -1,3 +1,10 @@ +## [2024-09-03] - v0.52.0 + + +### Fixed: + +- Lack of `label` error validation for letter casing and symbols when creating Object Storage bucket ([#10842](https://github.com/linode/manager/pull/10842), [#10847](https://github.com/linode/manager/pull/10847)) + ## [2024-08-05] - v0.51.0 diff --git a/packages/validation/package.json b/packages/validation/package.json index 285493a1b04..2549dccaee2 100644 --- a/packages/validation/package.json +++ b/packages/validation/package.json @@ -1,6 +1,6 @@ { "name": "@linode/validation", - "version": "0.51.0", + "version": "y", "description": "Yup validation schemas for use with the Linode APIv4", "type": "module", "main": "lib/index.cjs", From def0778127234b318e2a1b69a29a087de50fd012 Mon Sep 17 00:00:00 2001 From: Alban Bailly Date: Thu, 29 Aug 2024 10:35:27 -0400 Subject: [PATCH 46/49] Fix package.json versions --- packages/api-v4/package.json | 2 +- packages/manager/package.json | 2 +- packages/validation/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/api-v4/package.json b/packages/api-v4/package.json index 2b6b3b95700..e692d259f3d 100644 --- a/packages/api-v4/package.json +++ b/packages/api-v4/package.json @@ -1,6 +1,6 @@ { "name": "@linode/api-v4", - "version": "y", + "version": "0.125.0", "homepage": "https://github.com/linode/manager/tree/develop/packages/api-v4", "bugs": { "url": "https://github.com/linode/manager/issues" diff --git a/packages/manager/package.json b/packages/manager/package.json index b9d8690d519..c7de8fa0381 100644 --- a/packages/manager/package.json +++ b/packages/manager/package.json @@ -2,7 +2,7 @@ "name": "linode-manager", "author": "Linode", "description": "The Linode Manager website", - "version": "y", + "version": "1.127.0", "private": true, "type": "module", "bugs": { diff --git a/packages/validation/package.json b/packages/validation/package.json index 2549dccaee2..477bc81f799 100644 --- a/packages/validation/package.json +++ b/packages/validation/package.json @@ -1,6 +1,6 @@ { "name": "@linode/validation", - "version": "y", + "version": "0.52.0", "description": "Yup validation schemas for use with the Linode APIv4", "type": "module", "main": "lib/index.cjs", From 2986d19d655340170f1caac72706295ae19eff93 Mon Sep 17 00:00:00 2001 From: jmarmolm Date: Tue, 3 Sep 2024 11:11:20 -0400 Subject: [PATCH 47/49] change: increased block storage max volume size to 16TB (#10865) * new: increased block storage max volume size to 16TB * Update changelogs --------- Co-authored-by: Jaalah Ramos --- packages/api-v4/CHANGELOG.md | 1 + packages/api-v4/src/constants.ts | 2 +- packages/manager/CHANGELOG.md | 1 + packages/manager/src/constants.ts | 2 +- packages/validation/CHANGELOG.md | 6 +++++- packages/validation/src/constants.ts | 2 +- 6 files changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/api-v4/CHANGELOG.md b/packages/api-v4/CHANGELOG.md index ad18b28f4b9..e897c5dcad3 100644 --- a/packages/api-v4/CHANGELOG.md +++ b/packages/api-v4/CHANGELOG.md @@ -8,6 +8,7 @@ ### Changed: - Deprecate `getClusters` ([#10801](https://github.com/linode/manager/pull/10801)) +- Increase block storage max volume size to 16TB ([#10865](https://github.com/linode/manager/pull/10865)) ### Upcoming Features: diff --git a/packages/api-v4/src/constants.ts b/packages/api-v4/src/constants.ts index ed26b4f7482..73a67980fda 100644 --- a/packages/api-v4/src/constants.ts +++ b/packages/api-v4/src/constants.ts @@ -4,4 +4,4 @@ export const BETA_API_ROOT = API_ROOT + 'beta'; // Value from 1-4 reflecting a minimum score from zxcvbn export const MINIMUM_PASSWORD_STRENGTH = 4; -export const MAX_VOLUME_SIZE = 10240; +export const MAX_VOLUME_SIZE = 16384; diff --git a/packages/manager/CHANGELOG.md b/packages/manager/CHANGELOG.md index abc35edd1f6..ffcc8ea809e 100644 --- a/packages/manager/CHANGELOG.md +++ b/packages/manager/CHANGELOG.md @@ -19,6 +19,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p - Move manual snapshot error message from Linode Backups page to snapshot confirmation dialog ([#10791](https://github.com/linode/manager/pull/10791)) - "Create Volume" button text to "Add Volume" ([#10808](https://github.com/linode/manager/pull/10808)) - Storybook navigation bar organization ([#10809](https://github.com/linode/manager/pull/10809)) +- Increase block storage max volume size to 16TB ([#10865](https://github.com/linode/manager/pull/10865)) ### Fixed: diff --git a/packages/manager/src/constants.ts b/packages/manager/src/constants.ts index 5f670a92209..1d01abb8eaa 100644 --- a/packages/manager/src/constants.ts +++ b/packages/manager/src/constants.ts @@ -88,7 +88,7 @@ export const DATETIME_DISPLAY_FORMAT = 'yyyy-MM-dd HH:mm'; export const ISO_DATE_FORMAT = 'yyyy-MM-dd'; export const ISO_DATETIME_NO_TZ_FORMAT = "yyyy-MM-dd'T'HH:mm:ss"; -export const MAX_VOLUME_SIZE = 10240; +export const MAX_VOLUME_SIZE = 16384; /** * As per the current support polocy diff --git a/packages/validation/CHANGELOG.md b/packages/validation/CHANGELOG.md index 1160cd22c08..9b6a47f0457 100644 --- a/packages/validation/CHANGELOG.md +++ b/packages/validation/CHANGELOG.md @@ -5,6 +5,10 @@ - Lack of `label` error validation for letter casing and symbols when creating Object Storage bucket ([#10842](https://github.com/linode/manager/pull/10842), [#10847](https://github.com/linode/manager/pull/10847)) +### Changed: + +- Increase block storage max volume size to 16TB ([#10865](https://github.com/linode/manager/pull/10865)) + ## [2024-08-05] - v0.51.0 @@ -33,7 +37,7 @@ ### Changed: - Breaking: change Placement Group `is_strict` to `placement_group_policy` and `affinity_type` to `placement_group_type` ([#10651](https://github.com/linode/manager/pull/10651)) - + ## [2024-07-08] - v0.49.0 ### Added: diff --git a/packages/validation/src/constants.ts b/packages/validation/src/constants.ts index 22dedfa50fc..39b605fcb2b 100644 --- a/packages/validation/src/constants.ts +++ b/packages/validation/src/constants.ts @@ -1 +1 @@ -export const MAX_VOLUME_SIZE = 10240; +export const MAX_VOLUME_SIZE = 16384; From cec1df40d18448d6b9b8fb993693f28607cebc54 Mon Sep 17 00:00:00 2001 From: Connie Liu <139280159+coliu-akamai@users.noreply.github.com> Date: Tue, 3 Sep 2024 11:42:48 -0400 Subject: [PATCH 48/49] Update changelog to use correct PR number for Upcoming Features entry (#10873) --- packages/manager/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/manager/CHANGELOG.md b/packages/manager/CHANGELOG.md index ffcc8ea809e..879802e170d 100644 --- a/packages/manager/CHANGELOG.md +++ b/packages/manager/CHANGELOG.md @@ -61,7 +61,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p - Add “Encrypt Volume” checkbox in Edit Volume drawer ([#10787](https://github.com/linode/manager/pull/10787)) - Update Bucket Rate Limits ([#10790](https://github.com/linode/manager/pull/10790)) - Add "Encryption" column to Linode Volumes table ([#10793](https://github.com/linode/manager/pull/10793)) -- Add bucket management Properties Tab for Object Storage Gen2 ([#10795](https://github.com/linode/manager/pull/10795)) +- Add bucket management Properties Tab for Object Storage Gen2 ([#10797](https://github.com/linode/manager/pull/10797)) - Display Endpoint Type alongside each endpoint hostname in Regions Column & Hostnames Drawers ([#10796](https://github.com/linode/manager/pull/10796)) - Add useRegionQuery and cleanup bucket landing page ([#10801](https://github.com/linode/manager/pull/10801)) - Add 'Encrypt Volume' checkbox to Clone Volume drawer ([#10803](https://github.com/linode/manager/pull/10803)) From ffa43bb2eb44d740e3025e96c248be06b85527e2 Mon Sep 17 00:00:00 2001 From: Jaalah Ramos Date: Tue, 3 Sep 2024 15:25:30 -0400 Subject: [PATCH 49/49] fix: cherry-picked our changes to feature flag rate limit text --- .../BucketLanding/BucketDetailsDrawer.tsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/manager/src/features/ObjectStorage/BucketLanding/BucketDetailsDrawer.tsx b/packages/manager/src/features/ObjectStorage/BucketLanding/BucketDetailsDrawer.tsx index 7b774484f9e..0b4109f8eca 100644 --- a/packages/manager/src/features/ObjectStorage/BucketLanding/BucketDetailsDrawer.tsx +++ b/packages/manager/src/features/ObjectStorage/BucketLanding/BucketDetailsDrawer.tsx @@ -59,6 +59,12 @@ export const BucketDetailsDrawer = React.memo( account?.capabilities ?? [] ); + const isObjectStorageGen2Enabled = isFeatureEnabledV2( + 'Object Storage Endpoint Types', + Boolean(flags.objectStorageGen2?.enabled), + account?.capabilities ?? [] + ); + // @TODO OBJGen2 - We could clean this up when OBJ Gen2 is in GA. const { data: clusters } = useObjectStorageClusters( !isObjMultiClusterEnabled @@ -141,7 +147,7 @@ export const BucketDetailsDrawer = React.memo( )} {/* @TODO OBJ Multicluster: use region instead of cluster if isObjMultiClusterEnabled to getBucketAccess and updateBucketAccess. */} - { + {isObjectStorageGen2Enabled && ( <> Bucket Rate Limits @@ -154,9 +160,9 @@ export const BucketDetailsDrawer = React.memo( Understand bucket rate limits. )} + - } - {} + )} {cluster && label && (