Skip to content

Commit

Permalink
Merge pull request #10209 from linode/staging
Browse files Browse the repository at this point in the history
Release v1.113.0 – `staging` → `master`
  • Loading branch information
dwiley-akamai authored Feb 20, 2024
2 parents f1d10aa + 2576d32 commit 3dc7512
Show file tree
Hide file tree
Showing 232 changed files with 5,365 additions and 2,528 deletions.
5 changes: 4 additions & 1 deletion docs/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ List any change relevant to the reviewer.
- ...
- ...

## Target release date 🗓️
Please specify a release date to guarantee timely review of this PR. If exact date is not known, please approximate and update it as needed.

## Preview 📷
**Include a screenshot or screen recording of the change**

Expand All @@ -27,7 +30,7 @@ List any change relevant to the reviewer.
- ...
- ...

### Verification steps
### Verification steps
(How to verify changes)
- ...
- ...
Expand Down
9 changes: 7 additions & 2 deletions docs/development-guide/05-fetching-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,11 @@ const UsernameDisplay = () => {
## When to use React Query or an api-v4 method directly

Because **api-v4** methods don't commit data to a cache, it is acceptable to use **api-v4** methods directly
when performing ***one-time actions*** that do not require any immediate state change in Cloud Manager's UI.
when performing ***one-time actions*** that do not require any immediate state change in Cloud Manager's UI.

While use of **api-v4** methods directly are acceptable, use of **React Query** Queries or Mutations are **still prefered** for the benefits described above.

A minimal example of accepable direct **api-v4** use:
A minimal example of acceptable direct **api-v4** use:

```ts
resetKubeConfig({ id }).then(() => {
Expand Down Expand Up @@ -229,3 +229,8 @@ console.log(errorMap);
none: 'a linode_id error or similar'
}
```

### Toast / Event Message Punctuation
**Best practice:**
- If a message is a sentence or a sentence fragment with a subject and a verb, add punctuation. Otherwise, leave punctuation off.
- If a developer notices inconsistencies within files they are already working in, they can progressively fix them. In this case, be prepared to fix any Cypress test failures.
2 changes: 1 addition & 1 deletion docs/development-guide/08-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Test execution will stop at the debugger statement, and you will be able to use

### React Testing Library

We have some older tests that still use the Enzyme framework, but for new tests we generally use [React Testing Library](https://testing-library.com/docs/react-testing-library/intro). This library provides a set of tools to render React components from within the Vitest environment. The library's philosophy is that components should be tested as closely as possible to how they are used.
This library provides a set of tools to render React components from within the Vitest environment. The library's philosophy is that components should be tested as closely as possible to how they are used.

A simple test using this library will look something like this:

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"build:sdk": "yarn workspace @linode/api-v4 build",
"build:validation": "yarn workspace @linode/validation build",
"build": "yarn build:validation && yarn build:sdk && yarn workspace linode-manager build",
"build:analyze": "yarn build --bundle-analyze",
"build:analyze": "yarn workspace linode-manager build:analyze",
"up": "yarn install:all && yarn build:validation && yarn build:sdk && yarn start:all",
"up:expose": "yarn install:all && yarn build:validation && yarn build:sdk && yarn start:all:expose",
"dev": "yarn install:all && yarn start:all",
Expand Down
13 changes: 7 additions & 6 deletions packages/api-v4/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## [2024-02-05] - v0.109.0
## [2024-02-20] - v0.110.0

### Upcoming Features:

- Update /account and /profile UserType from `null` to `"default"` ([#10176](https://github.com/linode/manager/pull/10176))

## [2024-02-05] - v0.109.0

### Fixed:

Expand All @@ -13,7 +18,6 @@

## [2024-01-22] - v0.108.0


### Added:

- AGLB endpoint health endpoints ([#10008](https://github.com/linode/manager/pull/10008))
Expand All @@ -25,18 +29,16 @@

## [2024-01-08] - v0.107.0


### Added:

- Optional `headers` to `getProfile` function ([#9987](https://github.com/linode/manager/pull/9987))
- Optional `headers` to `getProfile` function ([#9987](https://github.com/linode/manager/pull/9987))

### Tech Stories:

- Add Lint GitHub Action ([#9973](https://github.com/linode/manager/pull/9973))

## [2023-12-11] - v0.106.0


### Added:

- Beta flag DC Get Well endpoints ([#9904](https://github.com/linode/manager/pull/9904))
Expand All @@ -55,7 +57,6 @@

## [2023-11-13] - v0.105.0


### Upcoming Features:

- Add `UpdateConfigurationPayload` ([#9853](https://github.com/linode/manager/pull/9853))
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.109.0",
"version": "0.110.0",
"homepage": "https://github.com/linode/manager/tree/develop/packages/api-v4",
"bugs": {
"url": "https://github.com/linode/manager/issues"
Expand Down
5 changes: 3 additions & 2 deletions packages/api-v4/src/account/types.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { APIWarning, RequestOptions } from '../types';
import type { Capabilities, Region } from '../regions';

export type UserType = 'child' | 'parent' | 'proxy';
export type UserType = 'child' | 'parent' | 'proxy' | 'default';

export interface User {
email: string;
Expand Down Expand Up @@ -30,7 +30,7 @@ export interface User {
ssh_keys: string[];
tfa_enabled: boolean;
username: string;
user_type: UserType | null;
user_type: UserType;
verified_phone_number: string | null;
}

Expand Down Expand Up @@ -71,6 +71,7 @@ export type AccountCapability =
| 'NodeBalancers'
| 'Object Storage Access Key Regions'
| 'Object Storage'
| 'Placement Group'
| 'Vlans'
| 'VPCs';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const getLoadbalancerCertificates = (
) =>
Request<ResourcePage<Certificate>>(
setURL(
`${BETA_API_ROOT}/aglb/${encodeURIComponent(loadbalancerId)}/certificates`
`${BETA_API_ROOT}/aclb/${encodeURIComponent(loadbalancerId)}/certificates`
),
setMethod('GET'),
setParams(params),
Expand All @@ -47,7 +47,7 @@ export const getLoadbalancerCertificate = (
) =>
Request<Certificate>(
setURL(
`${BETA_API_ROOT}/aglb/${encodeURIComponent(
`${BETA_API_ROOT}/aclb/${encodeURIComponent(
loadbalancerId
)}/certificates/${encodeURIComponent(certificateId)}`
),
Expand All @@ -65,7 +65,7 @@ export const createLoadbalancerCertificate = (
) =>
Request<Certificate>(
setURL(
`${BETA_API_ROOT}/aglb/${encodeURIComponent(loadbalancerId)}/certificates`
`${BETA_API_ROOT}/aclb/${encodeURIComponent(loadbalancerId)}/certificates`
),
setMethod('POST'),
setData(data, CreateCertificateSchema)
Expand All @@ -83,7 +83,7 @@ export const updateLoadbalancerCertificate = (
) =>
Request<Certificate>(
setURL(
`${BETA_API_ROOT}/aglb/${encodeURIComponent(
`${BETA_API_ROOT}/aclb/${encodeURIComponent(
loadbalancerId
)}/certificates/${encodeURIComponent(certificateId)}`
),
Expand All @@ -102,7 +102,7 @@ export const deleteLoadbalancerCertificate = (
) =>
Request<{}>(
setURL(
`${BETA_API_ROOT}/aglb/${encodeURIComponent(
`${BETA_API_ROOT}/aclb/${encodeURIComponent(
loadbalancerId
)}/certificates/${encodeURIComponent(certificateId)}`
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const getLoadbalancerConfigurations = (
) =>
Request<ResourcePage<Configuration>>(
setURL(
`${BETA_API_ROOT}/aglb/${encodeURIComponent(
`${BETA_API_ROOT}/aclb/${encodeURIComponent(
loadbalancerId
)}/configurations`
),
Expand All @@ -50,7 +50,7 @@ export const getLoadbalancerConfiguration = (
) =>
Request<Configuration>(
setURL(
`${BETA_API_ROOT}/aglb/${encodeURIComponent(
`${BETA_API_ROOT}/aclb/${encodeURIComponent(
loadbalancerId
)}/configurations/${encodeURIComponent(configurationId)}`
),
Expand All @@ -67,7 +67,7 @@ export const getLoadbalancerConfigurationsEndpointHealth = (
) =>
Request<ConfigurationsEndpointHealth>(
setURL(
`${BETA_API_ROOT}/aglb/${encodeURIComponent(
`${BETA_API_ROOT}/aclb/${encodeURIComponent(
loadbalancerId
)}/configurations/endpoints-health`
),
Expand All @@ -85,7 +85,7 @@ export const createLoadbalancerConfiguration = (
) =>
Request<Configuration>(
setURL(
`${BETA_API_ROOT}/aglb/${encodeURIComponent(
`${BETA_API_ROOT}/aclb/${encodeURIComponent(
loadbalancerId
)}/configurations`
),
Expand All @@ -105,7 +105,7 @@ export const updateLoadbalancerConfiguration = (
) =>
Request<Configuration>(
setURL(
`${BETA_API_ROOT}/aglb/${encodeURIComponent(
`${BETA_API_ROOT}/aclb/${encodeURIComponent(
loadbalancerId
)}/configurations/${encodeURIComponent(configurationId)}`
),
Expand All @@ -124,7 +124,7 @@ export const deleteLoadbalancerConfiguration = (
) =>
Request<{}>(
setURL(
`${BETA_API_ROOT}/aglb/${encodeURIComponent(
`${BETA_API_ROOT}/aclb/${encodeURIComponent(
loadbalancerId
)}/configurations/${encodeURIComponent(configurationId)}`
),
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { CreateBasicLoadbalancerSchema } from '@linode/validation';
*/
export const getLoadbalancers = (params?: Params, filter?: Filter) =>
Request<ResourcePage<Loadbalancer>>(
setURL(`${BETA_API_ROOT}/aglb`),
setURL(`${BETA_API_ROOT}/aclb`),
setMethod('GET'),
setParams(params),
setXFilter(filter)
Expand All @@ -36,7 +36,7 @@ export const getLoadbalancers = (params?: Params, filter?: Filter) =>
*/
export const getLoadbalancer = (id: number) =>
Request<Loadbalancer>(
setURL(`${BETA_API_ROOT}/aglb/${encodeURIComponent(id)}`),
setURL(`${BETA_API_ROOT}/aclb/${encodeURIComponent(id)}`),
setMethod('GET')
);

Expand All @@ -47,7 +47,7 @@ export const getLoadbalancer = (id: number) =>
*/
export const getLoadbalancerEndpointHealth = (id: number) =>
Request<LoadBalancerEndpointHealth>(
setURL(`${BETA_API_ROOT}/aglb/${encodeURIComponent(id)}/endpoints-health`),
setURL(`${BETA_API_ROOT}/aclb/${encodeURIComponent(id)}/endpoints-health`),
setMethod('GET')
);

Expand All @@ -58,7 +58,7 @@ export const getLoadbalancerEndpointHealth = (id: number) =>
*/
export const createLoadbalancer = (data: CreateLoadbalancerPayload) =>
Request<Loadbalancer>(
setURL(`${BETA_API_ROOT}/aglb`),
setURL(`${BETA_API_ROOT}/aclb`),
setData(data),
setMethod('POST')
);
Expand All @@ -70,7 +70,7 @@ export const createLoadbalancer = (data: CreateLoadbalancerPayload) =>
*/
export const createBasicLoadbalancer = (data: CreateBasicLoadbalancerPayload) =>
Request<Loadbalancer>(
setURL(`${BETA_API_ROOT}/aglb`),
setURL(`${BETA_API_ROOT}/aclb`),
setData(data, CreateBasicLoadbalancerSchema),
setMethod('POST')
);
Expand All @@ -85,7 +85,7 @@ export const updateLoadbalancer = (
data: UpdateLoadbalancerPayload
) =>
Request<Loadbalancer>(
setURL(`${BETA_API_ROOT}/aglb/${encodeURIComponent(id)}`),
setURL(`${BETA_API_ROOT}/aclb/${encodeURIComponent(id)}`),
setData(data),
setMethod('PUT')
);
Expand All @@ -97,6 +97,6 @@ export const updateLoadbalancer = (
*/
export const deleteLoadbalancer = (id: number) =>
Request<{}>(
setURL(`${BETA_API_ROOT}/aglb/${encodeURIComponent(id)}`),
setURL(`${BETA_API_ROOT}/aclb/${encodeURIComponent(id)}`),
setMethod('DELETE')
);
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const getLoadbalancerRoutes = (
) =>
Request<ResourcePage<Route>>(
setURL(
`${BETA_API_ROOT}/aglb/${encodeURIComponent(loadbalancerId)}/routes`
`${BETA_API_ROOT}/aclb/${encodeURIComponent(loadbalancerId)}/routes`
),
setMethod('GET'),
setParams(params),
Expand All @@ -37,7 +37,7 @@ export const getLoadbalancerRoutes = (
export const getLoadbalancerRoute = (loadbalancerId: number, routeId: number) =>
Request<Route>(
setURL(
`${BETA_API_ROOT}/aglb/${encodeURIComponent(
`${BETA_API_ROOT}/aclb/${encodeURIComponent(
loadbalancerId
)}/routes/${encodeURIComponent(routeId)}`
),
Expand All @@ -55,7 +55,7 @@ export const createLoadbalancerRoute = (
) =>
Request<Route>(
setURL(
`${BETA_API_ROOT}/aglb/${encodeURIComponent(loadbalancerId)}/routes`
`${BETA_API_ROOT}/aclb/${encodeURIComponent(loadbalancerId)}/routes`
),
setData(data, CreateRouteSchema),
setMethod('POST')
Expand All @@ -73,7 +73,7 @@ export const updateLoadbalancerRoute = (
) =>
Request<Route>(
setURL(
`${BETA_API_ROOT}/aglb/${encodeURIComponent(
`${BETA_API_ROOT}/aclb/${encodeURIComponent(
loadbalancerId
)}/routes/${encodeURIComponent(routeId)}`
),
Expand All @@ -92,7 +92,7 @@ export const deleteLoadbalancerRoute = (
) =>
Request<{}>(
setURL(
`${BETA_API_ROOT}/aglb/${encodeURIComponent(
`${BETA_API_ROOT}/aclb/${encodeURIComponent(
loadbalancerId
)}/routes/${encodeURIComponent(routeId)}`
),
Expand Down
Loading

0 comments on commit 3dc7512

Please sign in to comment.