Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Release v1.106.0 - release → staging #9842

Merged
merged 47 commits into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from 46 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
cc259e7
refactor: [M3-6287] - MUI v5 `Features > Users` (#9748)
carrillo-erik Oct 12, 2023
d6161ce
refactor: [M3-6282] MUI v5 Migration - `SRC > Features > StackScripts…
coliu-akamai Oct 12, 2023
684e235
refactor: [M3-7229] - Migrate UserDefinedSelect from a TextField Sele…
bnussman-akamai Oct 12, 2023
addbf1c
refactor: [M3-7230] - Migrate NodeBalancer Node Mode Select TextField…
bnussman-akamai Oct 12, 2023
5e023c7
change: [M3-7266] - Improve Linode Create Error Placement (#9788)
bnussman-akamai Oct 12, 2023
d542062
change: [M3-7232] Rename isPropValid and update codebase & documentat…
abailly-akamai Oct 12, 2023
472cfa2
feat: [M3-7121 & M3-7122] - Support VPC in Linode Add/Edit Config dia…
hana-akamai Oct 16, 2023
49f467d
test: Fix Cypress LKE create test failures stemming from reset mocks …
jdamore-linode Oct 16, 2023
cdc51b6
test: Resolve Cypress test flake for Linode config edit test (#9781)
jdamore-linode Oct 16, 2023
cc73646
test: Improve Cypress error messages when Linode API errors occur (#9…
jdamore-linode Oct 16, 2023
31a89ac
fix: [M3-7081] - Quote variable in changeset shell command (#9791)
abailly-akamai Oct 17, 2023
60f2729
Merge pull request #9794 from linode/staging
dwiley-akamai Oct 17, 2023
8dee619
test: Resolve warnings and errors in Jest tests (#9784)
jdamore-linode Oct 17, 2023
72b0030
Merge pull request #9803 from linode/master
coliu-akamai Oct 17, 2023
609c64b
feat: [M3-7254] - Add AGLB Routes - Rule Edit Drawer (#9778)
bnussman-akamai Oct 17, 2023
8b581a8
test: Fix DBaaS tests after API update (#9801)
jdamore-linode Oct 17, 2023
f35a923
feat: [M3-7252] - Only show regions that support VPCs in VPC Create p…
coliu-akamai Oct 17, 2023
49d9db2
docs: Add MigrationNotification Storybook (#9799)
jaalah-akamai Oct 17, 2023
b8e1b04
fix: [M3-7270] - Edit Linode VLAN config interface (#9798)
hana-akamai Oct 17, 2023
ee83522
refactor: [M3-6282] MUI v5 Migration - `SRC > Features > StackScripts…
coliu-akamai Oct 18, 2023
97fbca8
chore: Clean up `src/utilities` exports (#9783)
bnussman-akamai Oct 18, 2023
a6ef14d
fix: [UIE-6961]: Only show regions that support Databases on the Data…
corya-akamai Oct 19, 2023
3df9d02
fix: [UIE-6952] - DBaaS menu flickers on page load (#9808)
corya-akamai Oct 19, 2023
fd2dcae
test: [M3-7283] - Make `ConfigureForm.test.tsx` Vitest compatible (#…
bnussman-akamai Oct 19, 2023
2847116
test: [M3-7071] - Add Cypress integration tests for NodeBalancer Crea…
cliu-akamai Oct 19, 2023
d674091
feat: [M3-6816] - Add AGLB Create Route Drawer (#9806)
jaalah-akamai Oct 19, 2023
7de9843
add options to chooseRegion (#9819)
bnussman-akamai Oct 19, 2023
54b5f00
feat: [M3-7257] - Invalidate VPC-related queries after deleting a lin…
coliu-akamai Oct 19, 2023
b0dba9d
feat: [M3-7267] - Add AGLB Rule Delete Dialog (#9804)
bnussman-akamai Oct 19, 2023
8dea090
fix: [M3-7104] - Images create > upload image > reduce space above an…
tyler-akamai Oct 20, 2023
0fb7b36
feat: [M3-7063] - Provide dynamic price error handling for DC-specifi…
cpathipa Oct 20, 2023
8a610d3
test: [M3-7183] - Handle Managed test acccounts in Linode Backup test…
jdamore-linode Oct 20, 2023
e159bc6
feat: [M3-6973] - Add DC-specific pricing Object Storage overages (#9…
mjac0bs Oct 20, 2023
86ba6e8
fix: [M3-7262] - Create Firewall Drawer opens in the same tab in the …
tyler-akamai Oct 23, 2023
fdd5f1f
feat: [M3-7143] - Add 2FA Status and Last Login to the Account Users …
bnussman-akamai Oct 23, 2023
cc8a9af
fix: [M3-7298] - Improve Footer Styles (#9823)
bnussman-akamai Oct 23, 2023
f0b17fe
change: [M3-7227] - Update VPC-related API types in accordance with n…
coliu-akamai Oct 24, 2023
4a63694
feat: [M3-7253] - Add AGLB details - Configurations - Routes Table (#…
cpathipa Oct 24, 2023
8b65300
feat: [M3-7028] - Add AGLB Edit Route Drawer (#9822)
jaalah-akamai Oct 24, 2023
f25f849
tests: [M3-6219] - Clean up Cypress Firewall tests (#9807)
jdamore-linode Oct 25, 2023
71c8d6d
refactor: [M3-7098] - Create `Stack` component (#9830)
bnussman-akamai Oct 25, 2023
2a145d2
change: [M3-7323] - Add Rule Index to AGLB Rule Table (#9838)
bnussman-akamai Oct 25, 2023
2923601
fix: [M3-6889] CreateCluster styles (#9835)
abailly-akamai Oct 25, 2023
57721cc
fix: [M3-7210] - Rendering of unsanitized titles in event notificatio…
abailly-akamai Oct 25, 2023
dc1550a
feat: 10/30/23 Marketplace apps (#9771)
tbaka-akamai Oct 25, 2023
814dafb
feat: [M3-6888] - Add AGLB "Edit Service Target" drawer (#9800)
mjac0bs Oct 25, 2023
01b826d
Cloud version 1.106.0, API v4 version 0.104.0, and Validation version…
carrillo-erik Oct 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .github/workflows/e2e_schedule_and_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ env:
USER_3: ${{ secrets.USER_3 }}
USER_4: ${{ secrets.USER_4 }}
CLIENT_ID: ${{ secrets.REACT_APP_CLIENT_ID }}
CY_TEST_FAIL_ON_MANAGED: 1
on:
schedule:
- cron: "0 13 * * 1-5"
Expand Down
43 changes: 29 additions & 14 deletions docs/development-guide/02-component-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,59 +7,74 @@ The basic structure of a component file should follow:
```
[ imports ]
[ types and interfaces ]
[ function component definition ]
[ styles ]
[ utility functions ]
[ default export ]
[ exported function component definition ]
[ styles ] (possibly in their own file)
[ utility functions ] (possibly in their own file)
```

Here is a minimal code example demonstrating the basic structure of a component file:

```tsx
import * as React from "react";
import { styled } from "@mui/material/styles";
import { isPropValid } from "src/utilities/isPropValid";
import { omittedProps } from "src/utilities/omittedProps";

interface SayHelloProps {
// If not exported, it can just be named `Props`
export interface SayHelloProps {
name: string;
isDisabled: boolean;
}

const SayHello = (props: SayHelloProps) => {
export const SayHello = (props: SayHelloProps) => {
const { name, isDisabled } = props;

return <StyledH1 isDisabled={isDisabled}>Hello, {capitalize(name)}</StyledH1>;
};

/**
* Should be moved to SayHello.styles.ts if component was large (> 100 lines).
*/
const StyledH1 = styled("h1", {
label: "StyledH1",
shouldForwardProp: (prop) => isPropValid(["isDisabled"], prop),
shouldForwardProp: omittedProps(["isDisabled"]),
})(({ theme, ...props }) => ({
color: props.isDisabled ? theme.color.grey : theme.color.black,
}));

/**
* It's often a good idea to move utilities to their own files as well,
* either in the `src/utilities` directory if meant to be portable and reusable,
* or in the feature's directory as a .utils.ts file. ex: `SayHello.utils.ts`.
* Isolation makes utils easier to test and reduces the main file size for better readability.
* Doing so also may also reveal the use case is already covered by an existing utility.
*/
export const capitalize = (s: string) => {
return s.charAt(0).toUpperCase() + s.slice(1);
};

export { SayHello };
```

- There are cases where you don't want the prop to be forwarded to the DOM element, so we've provided a helper `isPropValid` to assist in these cases.
- The `label` property in the `styled` API is used to provide a unique identifier for the component when it is being styled. This can be useful when debugging a large codebase, as it can help identify which component the style is being applied to. For example, if you have multiple instances of the `StyledH1` component, the `label` property can help you identify which instance is being styled in the browser's developer tools.

#### Imports

- Import React with `import * as React from 'react'`.
- Use absolute imports, e.g. `import { queryClient } from 'src/queries/base'`.
- Methods from the api-v4 package should be imported from `@linode/api-v4/lib/..`.

#### Composition

When building a large component, it is recommended to break it down and avoid writing several components within the same file. It improves readability and testability. Components should, in most cases, come with their own unit test, although they can be skipped if an e2e suite is covering the functionality.
Utilities should almost always feature a unit test.

#### Styles

- With the transition to MUI v5, the [`styled`](https://mui.com/system/styled/) API, along with the [`sx` prop](https://mui.com/system/getting-started/the-sx-prop/), is the preferred way to specify component-specific styles.
- Component-specific styles may be defined at the end of the component file or in a dedicated file, named `ComponentName.styles.tsx`.
- Component-specific styles may be defined at the end of the component file or in a dedicated file, named `ComponentName.styles.ts`.
- Component files longer than 100 lines must have these styles defined in a dedicated file.

##### Styled Components
- The `label` property in the `styled` API is used to provide a unique identifier for the component when it is being styled. This can be useful when debugging a large codebase, as it can help identify which component the style is being applied to. For example, if you have multiple instances of the `StyledH1` component, the `label` property can help you identify which instance is being styled in the browser's developer tools.
- There are cases where you don't want the prop to be forwarded to the DOM element, so we've provided a helper `omittedProps` to assist in these cases.
It is the responsibility of the developer to check for any console error in case non-semantic props make their way to the dom.

#### Types and Interfaces

- To specify component props, define an interface with the name of the component `MyComponentProps` and pass it to the component as a type argument. This is to provide clarity if ever we need to export this type into another component.
Expand Down
1 change: 1 addition & 0 deletions docs/development-guide/08-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ Environment variables related to Cypress logging and reporting, as well as repor
| `CY_TEST_USER_REPORT` | Log test account information when tests begin | `1` | Unset; disabled by default |
| `CY_TEST_JUNIT_REPORT` | Enable JUnit reporting | `1` | Unset; disabled by default |
| `CY_TEST_DISABLE_FILE_WATCHING` | Disable file watching in Cypress UI | `1` | Unset; disabled by default |
| `CY_TEST_FAIL_ON_MANAGED` | Fail affected tests when Managed is enabled | `1` | Unset; disabled by default |

### Writing End-to-End Tests

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/api-v4": Upcoming Features
---

Update schema and request method of `updateLoadbalancerServiceTarget` ([#9800](https://github.com/linode/manager/pull/9800))
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/api-v4": Upcoming Features
---

Updated AGLB createLoadbalancerRoute endpoint with payload/schema ([#9806](https://github.com/linode/manager/pull/9806))
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/api-v4": Upcoming Features
---

Update the `Subnet` and `Interface` interfaces to match new API spec ([#9824](https://github.com/linode/manager/pull/9824))
21 changes: 21 additions & 0 deletions packages/api-v4/src/account/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,27 @@ export interface User {
ssh_keys: string[];
tfa_enabled: boolean;
verified_phone_number: string | null;
/**
* The date of when a password was set on a user.
* `null` if this user has not created a password yet
* @example 2022-02-09T16:19:26
* @example null
*/
password_created: string | null;
/**
* Information for the most recent login attempt for this User.
* `null` if no login attempts have been made since creation of this User.
*/
last_login: {
/**
* @example 2022-02-09T16:19:26
*/
login_datetime: string;
/**
* @example successful
*/
status: AccountLoginStatus;
} | null;
}

export interface Account {
Expand Down
8 changes: 4 additions & 4 deletions packages/api-v4/src/aglb/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import Request, {
} from '../request';
import { Filter, Params, ResourcePage } from '../types';
import { BETA_API_ROOT } from '../constants';
import type { Route, RoutePayload, UpdateRoutePayload } from './types';
import { UpdateRouteSchema } from '@linode/validation';
import type { Route, CreateRoutePayload, UpdateRoutePayload } from './types';
import { UpdateRouteSchema, CreateRouteSchema } from '@linode/validation';

/**
* getLoadbalancerRoutes
Expand Down Expand Up @@ -51,13 +51,13 @@ export const getLoadbalancerRoute = (loadbalancerId: number, routeId: number) =>
*/
export const createLoadbalancerRoute = (
loadbalancerId: number,
data: RoutePayload
data: CreateRoutePayload
) =>
Request<Route>(
setURL(
`${BETA_API_ROOT}/aglb/${encodeURIComponent(loadbalancerId)}/routes`
),
setData(data),
setData(data, CreateRouteSchema),
setMethod('POST')
);

Expand Down
9 changes: 6 additions & 3 deletions packages/api-v4/src/aglb/service-targets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ import Request, {
import { Filter, Params, ResourcePage } from '../types';
import { BETA_API_ROOT } from '../constants';
import type { ServiceTarget, ServiceTargetPayload } from './types';
import { CreateServiceTargetSchema } from '@linode/validation';
import {
CreateServiceTargetSchema,
UpdateServiceTargetSchema,
} from '@linode/validation';

/**
* getLoadbalancerServiceTargets
Expand Down Expand Up @@ -84,8 +87,8 @@ export const updateLoadbalancerServiceTarget = (
loadbalancerId
)}/service-targets/${encodeURIComponent(serviceTargetId)}`
),
setData(data),
setMethod('POST')
setData(data, UpdateServiceTargetSchema),
setMethod('PUT')
);

/**
Expand Down
3 changes: 2 additions & 1 deletion packages/api-v4/src/linodes/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,14 +165,15 @@ export interface Interface {
purpose: InterfacePurpose;
ipam_address: string | null;
primary?: boolean;
active: boolean;
subnet_id?: number | null;
vpc_id?: number | null;
ipv4?: ConfigInterfaceIPv4;
ipv6?: ConfigInterfaceIPv6;
ip_ranges?: string[];
}

export type InterfacePayload = Omit<Interface, 'id'>;
export type InterfacePayload = Omit<Interface, 'id' | 'active'>;

export interface ConfigInterfaceOrderPayload {
ids: number[];
Expand Down
1 change: 1 addition & 0 deletions packages/api-v4/src/regions/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export type Capabilities =
| 'GPU Linodes'
| 'Kubernetes'
| 'Linodes'
| 'Managed Databases'
| 'Metadata'
| 'NodeBalancers'
| 'Object Storage'
Expand Down
11 changes: 10 additions & 1 deletion packages/api-v4/src/vpcs/types.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { Interface } from 'src/linodes';

export interface VPC {
id: number;
label: string;
Expand Down Expand Up @@ -28,11 +30,18 @@ export interface CreateSubnetPayload {

export interface Subnet extends CreateSubnetPayload {
id: number;
linodes: number[];
linodes: SubnetAssignedLinodeData[];
created: string;
updated: string;
}

export interface ModifySubnetPayload {
label: string;
}

export type SubnetLinodeInterfaceData = Pick<Interface, 'active' | 'id'>;

export interface SubnetAssignedLinodeData {
id: number;
interfaces: SubnetLinodeInterfaceData[];
}
5 changes: 5 additions & 0 deletions packages/manager/.changeset/pr-9660-added-1697473425862.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Added
---

Dynamic price error handling for DC-specific pricing ([#9660](https://github.com/linode/manager/pull/9660))
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Upcoming Features
---

Support VPCs in Add/Edit Linode Config dialog ([#9709](https://github.com/linode/manager/pull/9709))
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Tech Stories
---

MUI v5 Migration - Src > Features > Users ([#9748](https://github.com/linode/manager/pull/9748))
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Tech Stories
---

Migrate NodeBalancer Node Mode Select TextField to Autocomplete ([#9754](https://github.com/linode/manager/pull/9754))
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Tech Stories
---

Migrate UserDefinedSelect from a TextField Select to an Autocomplete ([#9756](https://github.com/linode/manager/pull/9756))
5 changes: 5 additions & 0 deletions packages/manager/.changeset/pr-9771-added-1698247004747.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Added
---

October Marketplace apps ([#9771](https://github.com/linode/manager/pull/9771))
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Tech Stories
---

MUI v5 Migration - `SRC > Features > StackScripts` pt1 ([#9773](https://github.com/linode/manager/pull/9773))
5 changes: 5 additions & 0 deletions packages/manager/.changeset/pr-9777-tests-1696958372039.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Tests
---

Improve error message display when Linode API error occurs in Cypress test ([#9777](https://github.com/linode/manager/pull/9777))
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Upcoming Features
---

Add AGLB Routes - Rule Edit Drawer ([#9778](https://github.com/linode/manager/pull/9778))
5 changes: 5 additions & 0 deletions packages/manager/.changeset/pr-9781-tests-1697144294347.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Tests
---

Improve Linode config edit test stability ([#9781](https://github.com/linode/manager/pull/9781))
5 changes: 5 additions & 0 deletions packages/manager/.changeset/pr-9782-tests-1697147463647.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Tests
---

Improve LKE create test reattempt stability ([#9782](https://github.com/linode/manager/pull/9782))
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Tech Stories
---

Clean up `src/utilities` exports ([#9783](https://github.com/linode/manager/pull/9783))
5 changes: 5 additions & 0 deletions packages/manager/.changeset/pr-9784-tests-1697487553929.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Tests
---

Clean up Jest warnings and errors ([#9784](https://github.com/linode/manager/pull/9784))
5 changes: 5 additions & 0 deletions packages/manager/.changeset/pr-9785-fixed-1697059201989.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Fixed
---

Firewall Create Drawer opens in the same tab in the Linode Create Flow ([#9785](https://github.com/linode/manager/pull/9785))
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Tech Stories
---

MUI v5 Migration - `SRC > Features > StackScripts` pt 2 ([#9786](https://github.com/linode/manager/pull/9786))
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Upcoming Features
---

Only show regions that support VPCs in VPC Create page ([#9787](https://github.com/linode/manager/pull/9787))
5 changes: 5 additions & 0 deletions packages/manager/.changeset/pr-9788-changed-1697134985443.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Changed
---

Improve Linode Create Error Placement ([#9788](https://github.com/linode/manager/pull/9788))
5 changes: 5 additions & 0 deletions packages/manager/.changeset/pr-9790-changed-1697132255387.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Changed
---

Rename isPropValid utility ([#9790](https://github.com/linode/manager/pull/9790))
5 changes: 5 additions & 0 deletions packages/manager/.changeset/pr-9791-fixed-1697461463011.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Fixed
---

Quote variable in changeset shell command ([#9791](https://github.com/linode/manager/pull/9791))
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Upcoming Features
---

Add AGLB Edit Service Target drawer ([#9800](https://github.com/linode/manager/pull/9800))
5 changes: 5 additions & 0 deletions packages/manager/.changeset/pr-9801-tests-1697547109194.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Tests
---

Fix DBaaS UI test failures stemming from API update ([#9801](https://github.com/linode/manager/pull/9801))
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Upcoming Features
---

Add AGLB Rule Delete Dialog ([#9804](https://github.com/linode/manager/pull/9804))
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Upcoming Features
---

Add AGLB Create Route Drawer ([#9806](https://github.com/linode/manager/pull/9806))
5 changes: 5 additions & 0 deletions packages/manager/.changeset/pr-9807-tests-1697570775779.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Tests
---

Refactor Cypress Firewall migration tests ([#9807](https://github.com/linode/manager/pull/9807))
Loading
Loading