Skip to content

Commit

Permalink
Merge pull request #11037 from linode/staging
Browse files Browse the repository at this point in the history
Release v1.129.1 - staging → master
  • Loading branch information
coliu-akamai authored Oct 2, 2024
2 parents 311587f + c76488b commit a7fb5be
Show file tree
Hide file tree
Showing 10 changed files with 158 additions and 161 deletions.
41 changes: 23 additions & 18 deletions packages/manager/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,15 @@ 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-30] - v1.129.0
## [2024-10-02] - v1.129.1

### Fixed:

- DBaaS Landing Page V2 platform error for New Beta Users ([#11030](https://github.com/linode/manager/pull/11030))
- Add Volume button on Linodes Storage tab causing page crash ([#11032](https://github.com/linode/manager/pull/11032))
- Users unable to update to update profile timezone ([#11034](https://github.com/linode/manager/pull/11034))

## [2024-09-30] - v1.129.0

### Added:

Expand Down Expand Up @@ -34,7 +41,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
- Linode IPv6 Range rDNS typo ([#10948](https://github.com/linode/manager/pull/10948))
- Cancel Button Not Functioning in Delete Node Balancer Configuration Dialog ([#10962](https://github.com/linode/manager/pull/10962))
- Incorrect URL slug for Apache Spark Cluster Marketplace documentation ([#10965](https://github.com/linode/manager/pull/10965))
- Incorrect timezone in Database Maintenance Window tooltip, inaccurate Resize status of Database, and unneeded `replication_type` in v2 `createPayload` ([#10980](https://github.com/linode/manager/pull/10980))
- Incorrect timezone in Database Maintenance Window tooltip, inaccurate Resize status of Database, and unneeded `replication_type` in v2 `createPayload` ([#10980](https://github.com/linode/manager/pull/10980))
- DBaaS backups disable invalid dates ([#10988](https://github.com/linode/manager/pull/10988))
- DBaaS V2 logo on empty landing ([#10993](https://github.com/linode/manager/pull/10993))
- Enabled Shared CPU tab for 2-nodes Database Cluster Resize ([#10995](https://github.com/linode/manager/pull/10995))
Expand All @@ -57,7 +64,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
- Update `husky` to latest ([#10990](https://github.com/linode/manager/pull/10990))
- Add Accessibility tab to Storybook Stories ([#10942](https://github.com/linode/manager/pull/10942))
- Mark formik as deprecated ([#10944](https://github.com/linode/manager/pull/10944))
- Fix console error on Volume Create - Linode Config selection ([#10970](https://github.com/linode/manager/pull/10970))
- Fix console error on Volume Create - Linode Config selection ([#10970](https://github.com/linode/manager/pull/10970))

### Tests:

Expand All @@ -84,7 +91,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p

## [2024-09-16] - v1.128.0


### Added:

- Gravatar sunset banner for existing Gravatar users ([#10859](https://github.com/linode/manager/pull/10859))
Expand Down Expand Up @@ -170,7 +176,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p

## [2024-09-03] - v1.127.0


### Added:

- CheckoutBar Story ([#10784](https://github.com/linode/manager/pull/10784))
Expand Down Expand Up @@ -233,7 +238,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
- 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:
Expand Down Expand Up @@ -264,16 +268,17 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
- Guide link for Secure Your Server app on Marketplace (#10782)

### Removed:

- Animation from search results and animate icon instead ([#10754](https://github.com/linode/manager/pull/10754))

### Tech Stories:

- Replace Select with Autocomplete:
- Stackscripts and Images ([#10715](https://github.com/linode/manager/pull/10715))
- Linodes ([#10725](https://github.com/linode/manager/pull/10725))
- Stackscripts and Images ([#10715](https://github.com/linode/manager/pull/10715))
- Linodes ([#10725](https://github.com/linode/manager/pull/10725))
- Fix and enable Linode Create flow v1 form events ([#10722](https://github.com/linode/manager/pull/10722))
- Use Query Key Factory for Object Storage ([#10726](https://github.com/linode/manager/pull/10726))
- Remove `suppressImplicitAnyIndexErrors` and `ignoreDeprecations` Typescript options ([#10755](https://github.com/linode/manager/pull/10755))
- Remove `suppressImplicitAnyIndexErrors` and `ignoreDeprecations` Typescript options ([#10755](https://github.com/linode/manager/pull/10755))
- Use Query Key Factory for Linode Types ([#10760](https://github.com/linode/manager/pull/10760))
- Clean up Account Settings Object Storage and use React Query mutation ([#10766](https://github.com/linode/manager/pull/10766))
- Prepare for React Query v5 ([#10767](https://github.com/linode/manager/pull/10767))
Expand All @@ -292,7 +297,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
- Add Object Storage Gen2 `/endpoints` query ([#10736](https://github.com/linode/manager/pull/10736))
- Add data visualization tokens to theme files ([#10739](https://github.com/linode/manager/pull/10739))
- Add Object Storage Gen2 factories, mocks, and `BucketRateLimitTable` component ([#10744](https://github.com/linode/manager/pull/10744))
- Add CloudPulse conversion for data roll up and modify positioning of "No data to display" message ([#10747](https://github.com/linode/manager/pull/10747))
- Add CloudPulse conversion for data roll up and modify positioning of "No data to display" message ([#10747](https://github.com/linode/manager/pull/10747))
- Add Volume Encryption section to Volume Create page ([#10750](https://github.com/linode/manager/pull/10750))
- Add Secure VM informational banners ([#10751](https://github.com/linode/manager/pull/10751))
- Add Sentry Tag for Linode Create v2 ([#10763](https://github.com/linode/manager/pull/10763))
Expand All @@ -314,7 +319,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
- Use `getRestrictedResourceText` utility and move restrictions Notice to top of Image Create and Upload pages ([#10675](https://github.com/linode/manager/pull/10675))
- Improve Types for Object Storage ([#10686](https://github.com/linode/manager/pull/10686))
- Rename SRV column headers in Linode's DNS Manager ([#10687](https://github.com/linode/manager/pull/10687))
- Scale LISH to fit viewport ([#10689](https://github.com/linode/manager/pull/10689))
- Scale LISH to fit viewport ([#10689](https://github.com/linode/manager/pull/10689))
- Open LISH in new tab rather than new window ([#10689](https://github.com/linode/manager/pull/10689))
- Save and restore more form fields from local storage in support ticket dialog ([#10703](https://github.com/linode/manager/pull/10703))
- Update Placement Group policy text copy ([#10727](https://github.com/linode/manager/pull/10727))
Expand All @@ -338,12 +343,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
- Query Key Factory for Linodes ([#10659](https://github.com/linode/manager/pull/10659))
- Query Key Factory for Status Page ([#10672](https://github.com/linode/manager/pull/10672))
- Replace 'react-select' with Autocomplete:
- Billing ([#10681](https://github.com/linode/manager/pull/10681))
- NodeBalancers Create (#10688)
- Domains (#10693)
- Firewalls' Add Inbound/Outbound rule drawer ([#10701](https://github.com/linode/manager/pull/10701))
- `IPSelect`, `PaginationFooter`, and `TagsInput` (#10706)
- Longview ([#10721](https://github.com/linode/manager/pull/10721))
- Billing ([#10681](https://github.com/linode/manager/pull/10681))
- NodeBalancers Create (#10688)
- Domains (#10693)
- Firewalls' Add Inbound/Outbound rule drawer ([#10701](https://github.com/linode/manager/pull/10701))
- `IPSelect`, `PaginationFooter`, and `TagsInput` (#10706)
- Longview ([#10721](https://github.com/linode/manager/pull/10721))
- Migrate from `xterm` package to latest `@xterm/xterm` package ([#10689](https://github.com/linode/manager/pull/10689))
- Docker Compose changes to facilitate new testing pipeline ([#10713](https://github.com/linode/manager/pull/10713))
- Upgrade to latest Design Language System (DLS) 2.6.1 ([#10734](https://github.com/linode/manager/pull/10734))
Expand Down Expand Up @@ -378,7 +383,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
- Hide Monthly Network Transfer section for distributed regions ([#10714](https://github.com/linode/manager/pull/10714))
- Add new MSW, Factory, and E2E intercepts for OBJ Gen2 ([#10720](https://github.com/linode/manager/pull/10720))
- Add support for Two-step region select in Linode Create v2 ([#10723](https://github.com/linode/manager/pull/10723))
- Fix Image Capability and other tweaks in Image Service Gen2 ([#10731](https://github.com/linode/manager/pull/10731))
- Fix Image Capability and other tweaks in Image Service Gen2 ([#10731](https://github.com/linode/manager/pull/10731))

## [2024-07-22] - v1.124.0

Expand Down
2 changes: 1 addition & 1 deletion packages/manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "linode-manager",
"author": "Linode",
"description": "The Linode Manager website",
"version": "1.129.0",
"version": "1.129.1",
"private": true,
"type": "module",
"bugs": {
Expand Down
2 changes: 1 addition & 1 deletion packages/manager/src/assets/timezones/timezones.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// eslint-disable-next-line max-len
// [...$0.children].map(el => ({ label: (el.getAttribute('aria-label')|| '').replace(/\(.*?\)(.+)/, '$1').trim(), name: el.getAttribute('data-value'), offset: +(el.getAttribute('aria-label')|| '').replace(/\(.*?(-?[0-9]{2}):([0-9]{2})\).*/, (all, one, two) => +one + (two / 60) * (one > 0 ? 1 : -1)) }))

export default [
export const timezones = [
{
label: 'Niue Time',
name: 'Pacific/Niue',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,39 +207,45 @@ describe('Database Table', () => {
expect(screen.queryByText('New Database Clusters')).toBeNull();
expect(screen.queryByText('Powered by')).toBeNull();
});
});

describe('Database Landing', () => {
it('should have the "Create Database Cluster" button disabled for restricted users', async () => {
queryMocks.useProfile.mockReturnValue({ data: { restricted: true } });
it('should render a single new database table ', async () => {
const account = accountFactory.build({
capabilities: ['Managed Databases Beta'],
});
server.use(
http.get('*/v4/account', () => {
return HttpResponse.json(account);
})
);
server.use(
http.get('*/databases/instances', () => {
const databases = databaseInstanceFactory.buildList(5, {
platform: 'rdbms-default',
status: 'active',
});
return HttpResponse.json(makeResourcePage(databases));
})
);

const { container, getByTestId } = renderWithTheme(<DatabaseLanding />);
const { getByTestId } = renderWithTheme(<DatabaseLanding />, {
flags: { dbaasV2: { beta: true, enabled: true } },
});

expect(getByTestId(loadingTestId)).toBeInTheDocument();

await waitForElementToBeRemoved(getByTestId(loadingTestId));

const createClusterButton = container.querySelector('button');

expect(createClusterButton).toBeInTheDocument();
expect(createClusterButton).toHaveTextContent('Create Database Cluster');
expect(createClusterButton).toBeDisabled();
});

it('should have the "Create Database Cluster" button enabled for users with full access', async () => {
queryMocks.useProfile.mockReturnValue({ data: { restricted: false } });

const { container, getByTestId } = renderWithTheme(<DatabaseLanding />);

expect(getByTestId(loadingTestId)).toBeInTheDocument();
const tables = screen.getAllByRole('table');
expect(tables).toHaveLength(1);

await waitForElementToBeRemoved(getByTestId(loadingTestId));
const table = tables[0];

const createClusterButton = container.querySelector('button');
const headers = within(table).getAllByRole('columnheader');
expect(headers.some((header) => header.textContent === 'Plan')).toBe(true);

expect(createClusterButton).toBeInTheDocument();
expect(createClusterButton).toHaveTextContent('Create Database Cluster');
expect(createClusterButton).not.toBeDisabled();
expect(screen.queryByText('Legacy Database Clusters')).toBeNull();
expect(screen.queryByText('New Database Clusters')).toBeNull();
expect(screen.queryByText('Powered by')).toBeTruthy();
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,13 @@ const DatabaseLanding = () => {
globalGrantType: 'add_databases',
});

const { isDatabasesV2Enabled } = useIsDatabasesEnabled();
const {
isDatabasesV1Enabled,
isDatabasesV2Enabled,
isV2ExistingBetaUser,
isV2GAUser,
isV2NewBetaUser,
} = useIsDatabasesEnabled();
const { isLoading: isTypeLoading } = useDatabaseTypesQuery({
platform: isDatabasesV2Enabled ? 'rdbms-default' : 'rdbms-legacy',
});
Expand All @@ -57,7 +63,7 @@ const DatabaseLanding = () => {
['+order_by']: newDatabaseOrderBy,
};

if (isDatabasesV2Enabled) {
if (isV2ExistingBetaUser || isV2NewBetaUser || isV2GAUser) {
newDatabasesFilter['platform'] = 'rdbms-default';
}

Expand All @@ -70,7 +76,8 @@ const DatabaseLanding = () => {
page: newDatabasesPagination.page,
page_size: newDatabasesPagination.pageSize,
},
newDatabasesFilter
newDatabasesFilter,
isV2ExistingBetaUser || isV2NewBetaUser || isV2GAUser
);

const {
Expand All @@ -90,7 +97,7 @@ const DatabaseLanding = () => {
['+order_by']: legacyDatabaseOrderBy,
};

if (isDatabasesV2Enabled) {
if (isDatabasesV2Enabled && isV2ExistingBetaUser) {
legacyDatabasesFilter['platform'] = 'rdbms-legacy';
}

Expand All @@ -103,7 +110,8 @@ const DatabaseLanding = () => {
page: legacyDatabasesPagination.page,
page_size: legacyDatabasesPagination.pageSize,
},
legacyDatabasesFilter
legacyDatabasesFilter,
isV2ExistingBetaUser || isDatabasesV1Enabled
);

const error = newDatabasesError || legacyDatabasesError;
Expand All @@ -121,10 +129,11 @@ const DatabaseLanding = () => {
return <CircleProgress />;
}

const showTabs = isDatabasesV2Enabled && legacyDatabases?.data.length !== 0;
const showTabs = isV2ExistingBetaUser && legacyDatabases?.data.length !== 0;

const showEmpty =
newDatabases?.data.length === 0 && legacyDatabases?.data.length === 0;
(newDatabases?.data.length === 0 || newDatabases === undefined) &&
(legacyDatabases?.data.length === 0 || legacyDatabases === undefined);

if (showEmpty) {
return <DatabaseEmptyState />;
Expand Down
20 changes: 20 additions & 0 deletions packages/manager/src/features/Databases/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,31 @@ export const useIsDatabasesEnabled = () => {
account.capabilities.includes('Managed Databases Beta') &&
flags.dbaasV2?.enabled;

const isV2ExistingBetaUser =
account.capabilities.includes('Managed Databases') &&
account.capabilities.includes('Managed Databases Beta') &&
flags.dbaasV2?.enabled &&
flags.dbaasV2?.beta;

const isV2NewBetaUser =
account.capabilities.includes('Managed Databases Beta') &&
!account.capabilities.includes('Managed Databases') &&
flags.dbaasV2?.enabled &&
flags.dbaasV2?.beta;

const isV2GAUser =
account.capabilities.includes('Managed Databases') &&
flags.dbaasV2?.enabled &&
!flags.dbaasV2?.beta;

return {
isDatabasesEnabled: isDatabasesV1Enabled || isDatabasesV2Enabled,
isDatabasesV1Enabled,
isDatabasesV2Beta: isDatabasesV2Enabled && flags.dbaasV2?.beta,
isDatabasesV2Enabled,
isV2ExistingBetaUser,
isV2GAUser,
isV2NewBetaUser,
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { HttpResponse, http, server } from 'src/mocks/testServer';
import { queryClientFactory } from 'src/queries/base';
import { renderWithTheme } from 'src/utilities/testHelpers';

import { TimezoneForm, formatOffset } from './TimezoneForm';
import { TimezoneForm, getOptionLabel } from './TimezoneForm';

const queryClient = queryClientFactory();

Expand Down Expand Up @@ -75,7 +75,7 @@ describe('formatOffset', () => {
];

testMap.forEach(({ expectedOffset, timezone }) =>
expect(formatOffset(timezone)).toBe(
expect(getOptionLabel(timezone)).toBe(
`(GMT ${expectedOffset}) ${timezone.label}`
)
);
Expand Down
Loading

0 comments on commit a7fb5be

Please sign in to comment.