Skip to content

Commit

Permalink
Merge pull request #9898 from linode/staging
Browse files Browse the repository at this point in the history
Release v1.107.0 - staging → master
  • Loading branch information
abailly-akamai authored Nov 13, 2023
2 parents c40386d + 41356e5 commit 52246bf
Show file tree
Hide file tree
Showing 250 changed files with 7,862 additions and 4,881 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@
"node": "18.14.1"
},
"dependencies": {}
}
}
9 changes: 9 additions & 0 deletions packages/api-v4/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## [2023-11-13] - v0.105.0


### Upcoming Features:

- Add `UpdateConfigurationPayload` ([#9853](https://github.com/linode/manager/pull/9853))
- Add `getAccountAvailabilities` and `getAccountAvailability` methods for DC Get Well initiative ([#9860](https://github.com/linode/manager/pull/9860))
- Add `getRegionAvailabilities` and `getRegionAvailability` endpoints and related types for Sold Out Plans initiative ([#9878](https://github.com/linode/manager/pull/9878))

## [2023-10-30] - v0.104.0

### Upcoming Features:
Expand Down
2 changes: 1 addition & 1 deletion packages/api-v4/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@linode/api-v4",
"version": "0.104.0",
"version": "0.105.0",
"homepage": "https://github.com/linode/manager/tree/develop/packages/api-v4",
"bugs": {
"url": "https://github.com/linode/manager/issues"
Expand Down
38 changes: 37 additions & 1 deletion packages/api-v4/src/account/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,23 @@ import {
UpdateAccountSettingsSchema,
} from '@linode/validation/lib/account.schema';
import { API_ROOT, BETA_API_ROOT } from '../constants';
import Request, { setData, setMethod, setURL } from '../request';
import Request, {
setData,
setMethod,
setURL,
setParams,
setXFilter,
} from '../request';
import {
Account,
AccountAvailability,
AccountSettings,
CancelAccount,
CancelAccountPayload,
Agreements,
RegionalNetworkUtilization,
} from './types';
import { Filter, ResourcePage as Page, Params } from '../types';

/**
* getAccountInfo
Expand Down Expand Up @@ -99,6 +107,34 @@ export const getAccountAgreements = () =>
setMethod('GET')
);

/**
* getAccountAvailabilities
*
* Gets the account's entity availability for each region. Specifically
* tells which entities the account does not have capability for in each region.
*
*/
export const getAccountAvailabilities = (params?: Params, filter?: Filter) =>
Request<Page<AccountAvailability>>(
setURL(`${API_ROOT}/account/availability`),
setMethod('GET'),
setParams(params),
setXFilter(filter)
);

/**
* getAccountAvailability
*
* Gets the account's entity availability for given region. Specifically
* tells which entities the account does not have capability for in given region.
*
*/
export const getAccountAvailability = (regionId: string) =>
Request<AccountAvailability>(
setURL(`${API_ROOT}/account/availability/${encodeURIComponent(regionId)}`),
setMethod('GET')
);

/**
* signAgreement
*
Expand Down
7 changes: 6 additions & 1 deletion packages/api-v4/src/account/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { APIWarning } from '../types';
import type { Region } from '../regions';
import type { Capabilities, Region } from '../regions';

export interface User {
username: string;
Expand Down Expand Up @@ -69,6 +69,11 @@ export type AccountCapability =
| 'Vlans'
| 'VPCs';

export interface AccountAvailability {
id: string; // will be ID of region
unavailable: Capabilities[];
}

export interface AccountSettings {
managed: boolean;
longview_subscription: string | null;
Expand Down
11 changes: 8 additions & 3 deletions packages/api-v4/src/aglb/configurations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ import Request, {
} from '../request';
import { Filter, Params, ResourcePage } from '../types';
import { BETA_API_ROOT } from '../constants';
import type { Configuration, ConfigurationPayload } from './types';
import type {
Configuration,
ConfigurationPayload,
UpdateConfigurationPayload,
} from './types';
import { UpdateConfigurationSchema } from '@linode/validation';

/**
* getLoadbalancerConfigurations
Expand Down Expand Up @@ -75,15 +80,15 @@ export const createLoadbalancerConfiguration = (
export const updateLoadbalancerConfiguration = (
loadbalancerId: number,
configurationId: number,
data: Partial<Configuration>
data: UpdateConfigurationPayload
) =>
Request<Configuration>(
setURL(
`${BETA_API_ROOT}/aglb/${encodeURIComponent(
loadbalancerId
)}/configurations/${encodeURIComponent(configurationId)}`
),
setData(data),
setData(data, UpdateConfigurationSchema),
setMethod('PUT')
);

Expand Down
14 changes: 14 additions & 0 deletions packages/api-v4/src/aglb/loadbalancers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ import Request, {
import { BETA_API_ROOT } from '../constants';
import { Filter, Params, ResourcePage } from '../types';
import type {
CreateBasicLoadbalancerPayload,
CreateLoadbalancerPayload,
Loadbalancer,
UpdateLoadbalancerPayload,
} from './types';
import { CreateBasicLoadbalancerSchema } from '@linode/validation';

/**
* getLoadbalancers
Expand Down Expand Up @@ -49,6 +51,18 @@ export const createLoadbalancer = (data: CreateLoadbalancerPayload) =>
setMethod('POST')
);

/**
* createBasicLoadbalancer
*
* Creates an unconfigured Akamai Global Load Balancer
*/
export const createBasicLoadbalancer = (data: CreateBasicLoadbalancerPayload) =>
Request<Loadbalancer>(
setURL(`${BETA_API_ROOT}/aglb`),
setData(data, CreateBasicLoadbalancerSchema),
setMethod('POST')
);

/**
* updateLoadbalancer
*
Expand Down
15 changes: 15 additions & 0 deletions packages/api-v4/src/aglb/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ export interface CreateLoadbalancerPayload {
configurations?: ConfigurationPayload[];
}

/**
* TODO: AGLB - remove when we move to full creation flow
*/
export interface CreateBasicLoadbalancerPayload {
label: string;
}

export interface UpdateLoadbalancerPayload {
label?: string;
regions?: string[];
Expand Down Expand Up @@ -104,6 +111,14 @@ export interface Configuration {
routes: { id: number; label: string }[];
}

export type UpdateConfigurationPayload = Partial<{
label: string;
port: number;
protocol: Protocol;
certificates: CertificateConfig[];
routes: number[];
}>;

export interface CertificateConfig {
hostname: string;
id: number;
Expand Down
38 changes: 32 additions & 6 deletions packages/api-v4/src/regions/regions.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { API_ROOT } from '../constants';
import Request, { setMethod, setParams, setURL } from '../request';
import { Params, ResourcePage as Page } from '../types';
import { Region } from './types';
import Request, { setMethod, setParams, setURL, setXFilter } from '../request';
import { Filter, Params, ResourcePage as Page } from '../types';
import { Region, RegionAvailability } from './types';

/**
* getRegions
Expand All @@ -27,13 +27,39 @@ export const getRegions = (params?: Params) =>
*
* Return detailed information about a particular region.
*
* @param regionID { string } The region to be retrieved.
* @param regionId { string } The region to be retrieved.
*
*/
export const getRegion = (regionID: string) =>
export const getRegion = (regionId: string) =>
Request<Region>(
setURL(`${API_ROOT}/regions/${encodeURIComponent(regionID)}`),
setURL(`${API_ROOT}/regions/${encodeURIComponent(regionId)}`),
setMethod('GET')
);

export { Region };

/**
* getRegionAvailabilities
*
* Returns the availability status for all Linode plans for all regions.
*/
export const getRegionAvailabilities = (params?: Params, filter?: Filter) =>
Request<Page<RegionAvailability>>(
setURL(`${API_ROOT}/regions/availability`),
setMethod('GET'),
setParams(params),
setXFilter(filter)
);

/**
* getRegionAvailability
*
* Return the availability status of Linode plans for the given region.
*
* @param regionId { string } The region to get the availabilities for
*/
export const getRegionAvailability = (regionId: string) =>
Request<RegionAvailability[]>(
setURL(`${API_ROOT}/regions/${encodeURIComponent(regionId)}/availability`),
setMethod('GET')
);
6 changes: 6 additions & 0 deletions packages/api-v4/src/regions/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,9 @@ export interface Region {
status: RegionStatus;
resolvers: DNSResolvers;
}

export interface RegionAvailability {
available: boolean;
plan: string;
region: string;
}
4 changes: 3 additions & 1 deletion packages/manager/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,10 @@ module.exports = {
'scanjs-rules',
'xss',
'perfectionist',
'@linode/eslint-plugin-cloud-manager',
],
rules: {
'@linode/cloud-manager/no-custom-fontWeight': 'error',
'@typescript-eslint/camelcase': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
Expand All @@ -126,8 +128,8 @@ module.exports = {
'@typescript-eslint/no-use-before-define': 'off',
'array-callback-return': 'error',
'comma-dangle': 'off', // Prettier and TS both handle and check for this one
curly: 'warn',
// radix: Codacy considers it as an error, i put it here to fix it before push
curly: 'warn',
// See: https://www.w3.org/TR/graphics-aria-1.0/
'jsx-a11y/aria-role': [
'error',
Expand Down
59 changes: 59 additions & 0 deletions packages/manager/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,65 @@ 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/).

## [2023-11-13] - v1.107.0


### Changed:

- Logic governing inclusion of public interfaces in Linode Create payload ([#9834](https://github.com/linode/manager/pull/9834))
- Improve layout of breadcrumb for support tickets ([#9855](https://github.com/linode/manager/pull/9855))
- Logic governing display of Network Interfaces/Networking section in Linode Config dialog ([#9868](https://github.com/linode/manager/pull/9868))
- Temporarily remove region sorting on DBaaS landing page ([#9861](https://github.com/linode/manager/pull/9861))


### Fixed:

- Linodes Landing flickering ([#9836](https://github.com/linode/manager/pull/9836))
- Faux-bold font rendering ([#9843](https://github.com/linode/manager/pull/9843))
- Incorrect docs links for Main Concept and Simplex Marketplace apps ([#9854](https://github.com/linode/manager/pull/9854))
- Select Backup grid layout ([#9862](https://github.com/linode/manager/pull/9862))

### Tech Stories:

- `Tag` Component v7 story migration ([#9840](https://github.com/linode/manager/pull/9840))
- `BetaChip` Component v7 story migration ([#9864](https://github.com/linode/manager/pull/9864))
- MUI Migration - `SRC > Components > Crumbs` ([#9841](https://github.com/linode/manager/pull/9841))
- Clean up app entrypoint render logic ([#9844](https://github.com/linode/manager/pull/9844))
- Fix Safari LaunchDarkly MSW Errors ([#9863](https://github.com/linode/manager/pull/9863))

### Tests:

- Add DBaaS test coverage for disk metrics ([#9833](https://github.com/linode/manager/pull/9833))
- Improve Cypress rescue and rebuild test stability ([#9867](https://github.com/linode/manager/pull/9867))
- Upgrade Cypress to v13.x ([#9874](https://github.com/linode/manager/pull/9874))
- Add integration tests for AGLB certificate edit flow ([#9880](https://github.com/linode/manager/pull/9880))
- Add integration tests for AGLB certificate delete flow ([#9846](https://github.com/linode/manager/pull/9846))


### Upcoming Features:

- Fix Unassign multiple Linodes from Subnet ([#9820](https://github.com/linode/manager/pull/9820))
- `RemovableSelectionsList` default maximum height and overflow scroll ([#9827](https://github.com/linode/manager/pull/9827))
- VPC UX feedback ([#9832](https://github.com/linode/manager/pull/9832))
- Remove temporary code for surfacing VPC interface errors and fix formatting of error in Linode Config dialog ([#9839](https://github.com/linode/manager/pull/9839))
- Refine payload in subnet "Assign Linodes" drawer ([#9845](https://github.com/linode/manager/pull/9845))
- Add Create VPC drawer to Linode Create flow and update Create Firewall button width ([#9847](https://github.com/linode/manager/pull/9847))
- Only unassign linodes in the 'Linodes to be Unassigned from Subnet' list for Subnet Unassign Drawer ([#9851](https://github.com/linode/manager/pull/9851))
- Clear subnet errors in Linode Create flow and VPC label errors in VPC Edit flow upon input change ([#9857](https://github.com/linode/manager/pull/9857))
- Fix IPv4 checkboxes for VPC interfaces in Linode Config dialog ([#9865](https://github.com/linode/manager/pull/9865))
- Fix incorrectly displayed error text in Linode Edit/Add config flow and prevent subnet section from incorrectly clearing in Linode Edit/Add Config and Linode Create flow ([#9866](https://github.com/linode/manager/pull/9866))
- Linode Details: VPC Subnets Not Associated with VPC IP Address Are Displayed ([#9872](https://github.com/linode/manager/pull/9872))
- Add VPC BETA Feedback link to VPC landing and detail pages ([#9879](https://github.com/linode/manager/pull/9879))
- Add `dcGetWell` feature flag ([#9859](https://github.com/linode/manager/pull/9859))
- Add RQ queries and mock data for DC Get Well ([#9860](https://github.com/linode/manager/pull/9860))
- Add RQ queries and mock data for Sold Out Plans ([#9878](https://github.com/linode/manager/pull/9878))
- Add basic AGLB create page and feature flag ([#9856](https://github.com/linode/manager/pull/9856))
- Add AGLB create page with Actions buttons ([#9825](https://github.com/linode/manager/pull/9825))
- Manage state in Create Load Balancer flow ([#9848](https://github.com/linode/manager/pull/9848))
- AGLB Configurations Add Route Drawer and other refinements ([#9853](https://github.com/linode/manager/pull/9853))
- Add missing label field validation in AGLB Edit Certificate drawer ([#9880](https://github.com/linode/manager/pull/9880))


## [2023-10-30] - v1.106.0

### Added:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,12 @@ describe('Update database clusters', () => {

cy.get('[data-qa-cluster-config]').within(() => {
cy.findByText(configuration.region.label).should('be.visible');
cy.findByText(database.used_disk_size_gb + ' GB').should(
'be.visible'
);
cy.findByText(database.total_disk_size_gb + ' GB').should(
'be.visible'
);
});

cy.get('[data-qa-connection-details]').within(() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { apiMatcher } from 'support/util/intercepts';

describe('account activation', () => {
/**
* The API will return 403 with the body below for most endpoint except `/v4/profile`.
*
* { "errors": [ { "reason": "Your account must be activated before you can use this endpoint" } ] }
*/
it('should render an activation landing page if the customer is not activated', () => {
cy.intercept('GET', apiMatcher('*'), {
statusCode: 403,
body: {
errors: [
{
reason:
'Your account must be activated before you can use this endpoint',
},
],
},
});

cy.visitWithLogin('/');

cy.findByText('Your account is currently being reviewed.');
cy.findByText('open a support ticket', { exact: false });
});
});
Loading

0 comments on commit 52246bf

Please sign in to comment.