Skip to content

Commit

Permalink
Merge pull request #9793 from linode/release-v1.105.0
Browse files Browse the repository at this point in the history
Release v1.105.0 - `release → staging`
  • Loading branch information
dwiley-akamai authored Oct 16, 2023
2 parents dfc1e73 + a7154dc commit 2ad844f
Show file tree
Hide file tree
Showing 166 changed files with 5,773 additions and 1,791 deletions.
21 changes: 8 additions & 13 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,13 @@ Feel free to open an issue to report a bug or request a feature.
4. Make your changes, commit them following the standards below, and then push them to your fork.
5. Commit message format standard: `<commit type>: [JIRA-ticket-number] - <description>`

**commit types:**
`feat`: New feature for the user (not a part of the code, or ci, ...).
`fix`: Bugfix for the user (not a fix to build something, ...).
`refactor`: Restructuring existing code without changing its external behavior or visual UI. Typically to improve readability, maintainability, and performance.
`style`: General styling changes. Does not change any functionality.
`build`: Changes to the application build.
`chore`: Other changes that do not impact production code.
`ci`: Changes to the CI pipeline.
`docs`: Changes to the documentation docs.
`perf`: Performance changes.
`test`: New tests or changes to existing tests. Does not change the production code.
`change`: Only use for something that doesn’t fit in any other category.
**Commit Types:**
`feat`: New feature for the user (not a part of the code, or ci, ...).
`fix`: Bugfix for the user (not a fix to build something, ...).
`change`: Modifying an existing visual UI instance. Such as a component or a feature.
`refactor`: Restructuring existing code without changing its external behavior or visual UI. Typically to improve readability, maintainability, and performance.
`test`: New tests or changes to existing tests. Does not change the production code.
`upcoming`: A new feature that is in progress, not visible to users yet, and usually behind a feature flag.

**Example:** `feat: [M3-1234] - Allow user to view their login history`

Expand All @@ -40,6 +35,6 @@ Feel free to open an issue to report a bug or request a feature.
- Run `yarn changeset`from the root, choose the package to create a changeset for, and provide a description for the change.
You can either have it committed automatically or do it manually if you need to edit it.
- A changeset is optional, it merely depends if it falls in one of the following categories:
`Added`, `Fixed`, `Changed`, `Removed`, `Tech Stories`, `Upcoming Features`
`Added`, `Fixed`, `Changed`, `Removed`, `Tech Stories`, `Tests`, `Upcoming Features`

Two reviews from members of the Cloud Manager team are required before merge. After approval, all pull requests are squash merged.
63 changes: 44 additions & 19 deletions docs/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,70 @@
## Description 📝
**Brief description explaining the purpose of the changes**
Highlight the Pull Request's context and intentions.

## Major Changes 🔄
**List highlighting major changes**
- Change #1
- Change #2
## Changes 🔄
List any change relevant to the reviewer.
- ...
- ...

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

> **Note**: Use `<video src="" />` tag when including recordings in table
:bulb: Use `<video src="" />` tag when including recordings in table.

| Before | After |
| ------- | ------- |
| Content | Content |
| 📷 | 📷 |

## How to test 🧪
1. **How to setup test environment?**
2. **How to reproduce the issue (if applicable)?**
3. **How to verify changes?**
4. **How to run Unit or E2E tests?**

### Prerequisites
(How to setup test environment)
- ...
- ...

### Reproduction steps
(How to reproduce the issue, if applicable)
- ...
- ...

### Verification steps
(How to verify changes)
- ...
- ...

## As an Author I have considered 🤔

*Check all that apply*

- [ ] 👀 Doing a self review
- [ ] ❔ Our [contribution guidelines](https://github.com/linode/manager/blob/develop/docs/CONTRIBUTING.md)
- [ ] 🤏 Splitting feature into small PRs
- [ ] ➕ Adding a changeset
- [ ] 🧪 Providing/Improving test coverage
- [ ] 🔐 Removing all sensitive information from the code and PR description
- [ ] 🚩 Using a feature flag to protect the release
- [ ] 👣 Providing comprehensive reproduction steps
- [ ] 📑 Providing or updating our documentation
- [ ] 🕛 Scheduling a pair reviewing session
- [ ] 📱 Providing mobile support
- [ ] ♿ Providing accessibility support

---
## Commit message and pull request title format standards

> **Note**: Remove this section before opening the pull request
**Make sure your PR title and commit message on squash and merge are as shown below**

`<commit type>: [JIRA-ticket-number] - <description>`

**Commit Types:**
- `feat`: New feature for the user (not a part of the code, or ci, ...).
- `fix`: Bugfix for the user (not a fix to build something, ...).
- `change`: Modifying an existing visual UI instance. Such as a component or a feature.
- `refactor`: Restructuring existing code without changing its external behavior or visual UI. Typically to improve readability, maintainability, and performance.
- `style`: General styling changes. Does not change any functionality.
- `build`: Changes to the application build.
- `chore`: Other changes that do not impact production code.
- `ci`: Changes to the CI pipeline.
- `docs`: Changes to the documentation docs.
- `perf`: Performance changes.
- `test`: New tests or changes to existing tests. Does not change the production code.
- `change`: Only use for something that doesn’t fit in any other category.
- `upcoming`: A new feature that is in progress, not visible to users yet, and usually behind a feature flag.

**Example:** `feat: [M3-1234] - Allow user to view their login history`

---
2 changes: 1 addition & 1 deletion packages/api-v4/.changeset/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Changesets

This directory gets auto-populated when running `yarn changeset`.
You can however add your changesets manually as well, knowing that the [TYPE] is limited to the following options `Added`, `Fixed`, `Changed`, `Removed`, `Tech Stories`, `Upcoming Features` and follow this format:
You can however add your changesets manually as well, knowing that the [TYPE] is limited to the following options `Added`, `Fixed`, `Changed`, `Removed`, `Tech Stories`, `Tests`, `Upcoming Features` and follow this format:

```md
---
Expand Down
7 changes: 7 additions & 0 deletions packages/api-v4/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [2023-10-16] - v0.103.0


### Added:

- New payload option `migration_type` in `ResizeLinodePayload` and new event type `linode_resize_warm_create` ([#9677](https://github.com/linode/manager/pull/9677))

## [2023-10-02] - v0.102.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.102.0",
"version": "0.103.0",
"homepage": "https://github.com/linode/manager/tree/develop/packages/api-v4",
"bugs": {
"url": "https://github.com/linode/manager/issues"
Expand Down
1 change: 1 addition & 0 deletions packages/api-v4/src/account/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ export type EventAction =
| 'linode_reboot'
| 'linode_rebuild'
| 'linode_resize_create'
| 'linode_resize_warm_create'
| 'linode_resize'
| 'linode_shutdown'
| 'linode_snapshot'
Expand Down
17 changes: 12 additions & 5 deletions packages/api-v4/src/aglb/certificates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,15 @@ import Request, {
} from '../request';
import { BETA_API_ROOT } from '../constants';
import { Filter, Params, ResourcePage } from '../types';
import { Certificate, CreateCertificatePayload } from './types';
import { CreateCertificateSchema } from '@linode/validation';
import {
Certificate,
CreateCertificatePayload,
UpdateCertificatePayload,
} from './types';
import {
CreateCertificateSchema,
UpdateCertificateSchema,
} from '@linode/validation';

/**
* getLoadbalancerCertificates
Expand Down Expand Up @@ -67,12 +74,12 @@ export const createLoadbalancerCertificate = (
/**
* updateLoadbalancerCertificate
*
* Creates an Akamai Global Load Balancer certificate
* Updates an Akamai Global Load Balancer certificate
*/
export const updateLoadbalancerCertificate = (
loadbalancerId: number,
certificateId: number,
data: Partial<CreateCertificatePayload>
data: Partial<UpdateCertificatePayload>
) =>
Request<Certificate>(
setURL(
Expand All @@ -81,7 +88,7 @@ export const updateLoadbalancerCertificate = (
)}/certificates/${encodeURIComponent(certificateId)}`
),
setMethod('PUT'),
setData(data)
setData(data, UpdateCertificateSchema)
);

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

/**
* getLoadbalancerRoutes
Expand Down Expand Up @@ -68,16 +69,16 @@ export const createLoadbalancerRoute = (
export const updateLoadbalancerRoute = (
loadbalancerId: number,
routeId: number,
data: Partial<RoutePayload>
data: UpdateRoutePayload
) =>
Request<Route>(
setURL(
`${BETA_API_ROOT}/aglb/${encodeURIComponent(
loadbalancerId
)}/routes/${encodeURIComponent(routeId)}`
),
setData(data),
setMethod('POST')
setData(data, UpdateRouteSchema),
setMethod('PUT')
);

/**
Expand Down
60 changes: 44 additions & 16 deletions packages/api-v4/src/aglb/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ export interface UpdateLoadbalancerPayload {

type Protocol = 'tcp' | 'http' | 'https';

type RouteProtocol = 'tcp' | 'http';

type Policy =
| 'round_robin'
| 'least_request'
Expand All @@ -37,25 +39,13 @@ export type MatchField = 'path_prefix' | 'query' | 'host' | 'header' | 'method';

export interface RoutePayload {
label: string;
rules: Rule[];
}

export interface ExtendedMatchCondition extends MatchCondition {
service_targets: { id: number; label: string; percentage: number }[];
rules: RuleCreatePayload[];
}

export interface Route {
id: number;
label: string;
protocol: Protocol;
rules: {
match_condition: ExtendedMatchCondition;
}[];
}

export interface CreateRoutePayload {
label: string;
protocol: Protocol;
protocol: RouteProtocol;
rules: {
match_condition: MatchCondition;
service_targets: {
Expand All @@ -66,6 +56,36 @@ export interface CreateRoutePayload {
}[];
}

export type UpdateRoutePayload = Partial<{
label: string;
protocol: RouteProtocol;
rules: RulePayload[];
}>;

export interface CreateRoutePayload {
label: string;
protocol: RouteProtocol;
rules: RulePayload[];
}

export interface Rule {
match_condition: MatchCondition;
service_targets: {
id: number;
label: string;
percentage: number;
}[];
}

export interface RulePayload {
match_condition: MatchCondition;
service_targets: {
id: number;
label: string;
percentage: number;
}[];
}

export interface ConfigurationPayload {
label: string;
port: number;
Expand All @@ -89,7 +109,7 @@ export interface CertificateConfig {
id: number;
}

export interface Rule {
export interface RuleCreatePayload {
match_condition: MatchCondition;
service_targets: ServiceTargetPayload[];
}
Expand All @@ -99,7 +119,7 @@ export interface MatchCondition {
match_field: MatchField;
match_value: string;
session_stickiness_cookie: string | null;
session_stickiness_ttl: string | null;
session_stickiness_ttl: number | null;
}

export interface RouteServiceTargetPayload {
Expand Down Expand Up @@ -141,6 +161,7 @@ type CertificateType = 'ca' | 'downstream';
export interface Certificate {
id: number;
label: string;
certificate: string;
type: CertificateType;
}

Expand All @@ -150,3 +171,10 @@ export interface CreateCertificatePayload {
label: string;
type: CertificateType;
}

export interface UpdateCertificatePayload {
key?: string;
certificate?: string;
label?: string;
type?: CertificateType;
}
7 changes: 5 additions & 2 deletions packages/api-v4/src/linodes/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,13 @@ export const linodeShutdown = (linodeId: number | string) =>
* than the new Type allows.
*
* @param linodeId { number } The id of the Linode to resize.
* @param type { string } the new size of the Linode
* @param auto_resize_linode { boolean } do you want to resize your disks after
* @param data { object }
* @param data.type { string } the new size of the Linode
* @param data.allow_auto_disk_resize { boolean } do you want to resize your disks after
* the Linode is resized? NOTE: Unless the user has 1 ext disk or 1 ext disk and
* 1 swap disk, this flag does nothing, regardless of whether it's true or false
* @param data.migrate_type { string } Warm migrations allow Linodes to remain booted during
* most of their cold migration, reducing their downtime to the duration of a simple reboot.
*/
export const resizeLinode = (linodeId: number, data: ResizeLinodePayload) =>
Request<{}>(
Expand Down
4 changes: 4 additions & 0 deletions packages/api-v4/src/linodes/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -394,10 +394,14 @@ export interface LinodeDiskCreationData {
stackscript_data?: any;
}

export type MigrationTypes = 'warm' | 'cold';

export interface ResizeLinodePayload {
type: string;
/** @default true */
allow_auto_disk_resize?: boolean;
/** @default 'cold' */
migration_type?: MigrationTypes;
}

export interface DeleteLinodeConfigInterfacePayload {
Expand Down
2 changes: 1 addition & 1 deletion packages/manager/.changeset/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Changesets

This directory gets auto-populated when running `yarn changeset`.
You can however add your changesets manually as well, knowing that the [TYPE] is limited to the following options `Added`, `Fixed`, `Changed`, `Removed`, `Tech Stories`, `Upcoming Features` and follow this format:
You can however add your changesets manually as well, knowing that the [TYPE] is limited to the following options `Added`, `Fixed`, `Changed`, `Removed`, `Tech Stories`, `Tests`, `Upcoming Features` and follow this format:

```md
---
Expand Down
Loading

0 comments on commit 2ad844f

Please sign in to comment.