Skip to content

Commit

Permalink
Merge pull request #9686 from jaalah-akamai/release-v1.102.0
Browse files Browse the repository at this point in the history
Co-authored-by: Alban Bailly <[email protected]>
Co-authored-by: Connie Liu <[email protected]>
Co-authored-by: jdamore-linode <[email protected]>
Co-authored-by: Jaalah Ramos <[email protected]>
Co-authored-by: Alban Bailly <[email protected]>
Co-authored-by: Mariah Jacobs <[email protected]>
Co-authored-by: Dajahi Wiley <[email protected]>
Co-authored-by: mjac0bs <[email protected]>
Co-authored-by: Banks Nussman <[email protected]>
Co-authored-by: Banks Nussman <[email protected]>
Co-authored-by: Hana Xu <[email protected]>
Co-authored-by: tyler-akamai <[email protected]>
Co-authored-by: TylerWJ <[email protected]>
Co-authored-by: cliu-akamai <[email protected]>
Co-authored-by: John Callahan <[email protected]>
Co-authored-by: cpathipa <[email protected]>
Co-authored-by: Joe D'Amore <[email protected]>
Co-authored-by: kekkon <[email protected]>
Co-authored-by: corya-akamai <[email protected]>
  • Loading branch information
20 people authored Sep 18, 2023
2 parents 94bd772 + aee12c0 commit 575bd32
Show file tree
Hide file tree
Showing 329 changed files with 10,811 additions and 3,972 deletions.
6 changes: 3 additions & 3 deletions docs/development-guide/05-fetching-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import * as React from 'react';
import { getProfile } from '@linode/api-v4/lib/profile';
// ... other imports

const UsernameDisplay: React.FC<> = () => {
const UsernameDisplay = () => {
const [loading, setLoading] = React.useState(false);
const [error, setError] = React.useState<APIError | null>(null);
const [profile, setProfile] = React.useState<Profile | null>(null);
Expand Down Expand Up @@ -114,7 +114,7 @@ Loading and error states are managed by React Query. The earlier username displa
import * as React from "react";
import { useProfile } from "src/queries/profile";

const UsernameDisplay: React.FC<> = () => {
const UsernameDisplay = () => {
const { loading, error, data: profile } = useProfile();

if (loading) {
Expand Down Expand Up @@ -157,7 +157,7 @@ import profileContainer, {
Props as ProfileProps,
} from "src/containers/profile.container";

const UsernameDisplay: React.FC<ProfileProps> = (props) => {
const UsernameDisplay = (props: ProfileProps) => {
const { requestProfile, profileLoading, profileError, profileData } = props;

React.useEffect(() => requestProfile, []);
Expand Down
4 changes: 2 additions & 2 deletions docs/development-guide/06-performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interface Props {
linode: Linode;
}

const LinodeLabelDisplay: React.FC<Props> = (props) => {
const LinodeLabelDisplay = (props: Props) => {
return <span>{props.linode.label}</span>;
};

Expand All @@ -20,7 +20,7 @@ interface Props {
label: string;
}

const LinodeLabelDisplay: React.FC<Props> = (props) => {
const LinodeLabelDisplay = (props: Props) => {
return <span>{props.label}</span>;
};

Expand Down
11 changes: 6 additions & 5 deletions docs/development-guide/08-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,14 @@ These environment variables facilitate splitting the Cypress run between multipl
| `CY_TEST_SPLIT_RUN_INDEX` | Numeric index for each Cypress test runner | `1`, `2`, etc. | Unset |
| `CY_TEST_SPLIT_RUN_TOTAL` | Total number of runners for the tests | `2` | Unset |
###### Logging & Reporting
###### Development, Logging, and Reporting
Environment variables related to Cypress logging and reporting, as well as report generation.
| Environment Variable | Description | Example | Default |
|------------------------|-------------------------------------------------|-----------|----------------------------|
| `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 |
| Environment Variable | Description | Example | Default |
|---------------------------------|-----------------------------------------------|-----------|----------------------------|
| `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 |
### Writing End-to-End Tests
Expand Down
2 changes: 1 addition & 1 deletion docs/development-guide/11-feature-flags.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ To consume a feature flag from a function component, use the `useFlags` hook:
import * as React from "react";
import { useFlags } from "src/hooks/useFlags";

const ImagesPricingBanner: React.FC<> = () => {
const ImagesPricingBanner = () => {
const flags = useFlags();

if (flags.imagesPricingBanner) {
Expand Down
15 changes: 15 additions & 0 deletions packages/api-v4/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
## [2023-09-18] - v0.101.0

### Changed:

- Change `Account` and `Grant`-related types to include VPC-related grants and capabilities ([#9585](https://github.com/linode/manager/pull/9585))

### Fixed:

- Fix invalid absolute imports ([#9656](https://github.com/linode/manager/pull/9656))

### Upcoming Features:

- DBaaS disk size and used size ([#9638](https://github.com/linode/manager/pull/9638))


## [2023-09-05] - v0.100.0

### Changed:
Expand Down
2 changes: 1 addition & 1 deletion packages/api-v4/REACT.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import { getLinodes, Linode } from '@linode/api-v4/lib/linodes'
import { APIError, ResourcePage } from '@linode/api-v4/lib/types';
import React from 'react'

const MyComponent: React.FC<{}> = () => {
const MyComponent = () => {
const [linodes, setLinodesData] = React.useState<Linode[] | undefined>(undefined);
const [errors, setErrors] = React.useState<APIError[] | undefined>(undefined);
const [loading, setLoading] = React.useState<boolean>(false);
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.100.0",
"version": "0.101.0",
"homepage": "https://github.com/linode/manager/tree/develop/packages/api-v4",
"bugs": {
"url": "https://github.com/linode/manager/issues"
Expand Down
8 changes: 5 additions & 3 deletions 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 { Region } from 'src/regions';
import type { Region } from '../regions';

export interface User {
username: string;
Expand Down Expand Up @@ -118,7 +118,7 @@ export interface InvoiceItem {
unit_price: null | string;
tax: number;
total: number;
region: Region['id'];
region: string | null;
}

export interface Payment {
Expand Down Expand Up @@ -165,7 +165,8 @@ export type GrantType =
| 'stackscript'
| 'volume'
| 'database'
| 'firewall';
| 'firewall'
| 'vpc';

export type Grants = GlobalGrants & Record<GrantType, Grant[]>;

Expand Down Expand Up @@ -248,6 +249,7 @@ export type EventAction =
| 'community_mention'
| 'community_question_reply'
| 'credit_card_updated'
| 'database_low_disk_space'
| 'database_backup_restore'
| 'database_create'
| 'database_credentials_reset'
Expand Down
5 changes: 3 additions & 2 deletions packages/api-v4/src/aglb/certificates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import Request, {
setURL,
setXFilter,
} from '../request';
import { BETA_API_ROOT } from 'src/constants';
import { BETA_API_ROOT } from '../constants';
import { Filter, Params, ResourcePage } from '../types';
import { Certificate, CreateCertificatePayload } from './types';
import { CreateCertificateSchema } from '@linode/validation';

/**
* getLoadbalancerCertificates
Expand Down Expand Up @@ -60,7 +61,7 @@ export const createLoadbalancerCertificate = (
`${BETA_API_ROOT}/aglb/${encodeURIComponent(loadbalancerId)}/certificates`
),
setMethod('POST'),
setData(data)
setData(data, CreateCertificateSchema)
);

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/api-v4/src/aglb/configurations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export const createLoadbalancerConfiguration = (
export const updateLoadbalancerConfiguration = (
loadbalancerId: number,
configurationId: number,
data: Partial<ConfigurationPayload>
data: Partial<Configuration>
) =>
Request<Configuration>(
setURL(
Expand Down
14 changes: 7 additions & 7 deletions packages/api-v4/src/aglb/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export interface UpdateLoadbalancerPayload {
configuration_ids?: number[];
}

type Protocol = 'TCP' | 'HTTP' | 'HTTPS';
type Protocol = 'tcp' | 'http' | 'https';

type Policy =
| 'round_robin'
Expand Down Expand Up @@ -69,7 +69,7 @@ export interface ConfigurationPayload {
label: string;
port: number;
protocol: Protocol;
certificate_table: CertificateTable[];
certificates: CertificateConfig[];
routes?: RoutePayload[];
route_ids?: number[];
}
Expand All @@ -79,13 +79,13 @@ export interface Configuration {
label: string;
port: number;
protocol: Protocol;
certificate_table: CertificateTable[];
routes: string[];
certificates: CertificateConfig[];
routes: { id: number; label: string }[];
}

export interface CertificateTable {
sni_hostname: string;
certificate_id: string;
export interface CertificateConfig {
hostname: string;
id: number;
}

export interface Rule {
Expand Down
10 changes: 10 additions & 0 deletions packages/api-v4/src/databases/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,16 @@ export interface BaseDatabase {
hosts: DatabaseHosts;
port: number;
updates: UpdatesSchedule;
/**
* total_disk_size_gb is feature flagged by the API.
* It may not be defined.
*/
total_disk_size_gb?: number;
/**
* used_disk_size_gb is feature flagged by the API.
* It may not be defined.
*/
used_disk_size_gb?: number;
}

export interface MySQLDatabase extends BaseDatabase {
Expand Down
4 changes: 2 additions & 2 deletions packages/api-v4/src/linodes/info.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { API_ROOT } from '../constants';
import { NetworkUtilization, NetworkTransfer } from '../account/types';
import { RegionalNetworkUtilization, NetworkTransfer } from '../account/types';
import Request, { setMethod, setParams, setURL, setXFilter } from '../request';
import { Filter, Params, ResourcePage as Page } from '../types';
import { Kernel, LinodeType as Type, Stats } from './types';
Expand Down Expand Up @@ -52,7 +52,7 @@ export const getLinodeStatsByDate = (
* @param linodeId { number } The id of the Linode to retrieve network transfer information for.
*/
export const getLinodeTransfer = (linodeId: number) =>
Request<NetworkUtilization>(
Request<RegionalNetworkUtilization>(
setURL(
`${API_ROOT}/linode/instances/${encodeURIComponent(linodeId)}/transfer`
),
Expand Down
4 changes: 2 additions & 2 deletions packages/api-v4/src/linodes/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Region } from 'src/regions';
import type { Region } from '../regions';
import { IPAddress, IPRange } from '../networking/types';
import { SSHKey } from '../profile/types';

Expand Down Expand Up @@ -290,7 +290,7 @@ export interface PriceObject {
hourly: number | null;
}

interface RegionPriceObject extends PriceObject {
export interface RegionPriceObject extends PriceObject {
id: Region['id'];
}

Expand Down
2 changes: 1 addition & 1 deletion packages/api-v4/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"outDir": "./lib",
"esModuleInterop": true,
"moduleResolution": "node",
"skipLibCheck":true,
"skipLibCheck": true,
"strict": true,
"baseUrl": ".",
"noUnusedLocals": true,
Expand Down
48 changes: 48 additions & 0 deletions packages/manager/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,54 @@ 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-09-18] - v1.102.0

### Added:

- Configuration Profiles docs link to Linode Details Configurations tab ([#9658](https://github.com/linode/manager/pull/9658))

### Fixed:

- Stuck LKE node pools when HA Control Plane is unavailable for self-hosting Cloud Manager users ([#9558](https://github.com/linode/manager/pull/9558))
- Longview styling regressions ([#9619](https://github.com/linode/manager/pull/9619))
- Typo in 'Confirm Ticket Close' modal ([#9639](https://github.com/linode/manager/pull/9639))
- Selected state of Longview processes table ([#9643](https://github.com/linode/manager/pull/9643))
- Typo in NodeBalancer landing table column header ([#9648](https://github.com/linode/manager/pull/9648))
- Metadata CLI command ([#9665](https://github.com/linode/manager/pull/9665))
- Billing Contact UI regression caused by MUI Update ([#9667](https://github.com/linode/manager/pull/9667))
- Panels alignment in NodeBalancer create flow ([#9673](https://github.com/linode/manager/pull/9673))
- Misplaced helper text and static copy in Linode Create Volume drawer ([#9683](https://github.com/linode/manager/pull/9683))
- Redis trademark changes ([#9694](https://github.com/linode/manager/pull/9694))

### Tech Stories:

- Add Autocomplete component ([#9497](https://github.com/linode/manager/pull/9497))
- MUI v5 Migration - `SRC > Features > EntityTransfers` ([#9582](https://github.com/linode/manager/pull/9582))
- MUI v5 Migration - `SRC > Features > Longview` Pt1: Longview Detail ([#9600](https://github.com/linode/manager/pull/9600))

### Upcoming Features:

- Add VPC-related permissions, capabilities, and grants ([#9585](https://github.com/linode/manager/pull/9585))
- Add VPC data in Linode Detail header ([#9645](https://github.com/linode/manager/pull/9645))
- Add VPC Create Subnet drawer ([#9652](https://github.com/linode/manager/pull/9652))
- Add VPC Delete Subnet dialog ([#9640](https://github.com/linode/manager/pull/9640))
- Add VPC filter subnets field ([#9647](https://github.com/linode/manager/pull/9647))
- Populate VPC Subnets table with data ([#9599](https://github.com/linode/manager/pull/9599))
- Standardize "region" and "data center" copy for DC-specific pricing ([#9670](https://github.com/linode/manager/pull/9670))
- Removed VPC column from Linodes landing page table ([#9625](https://github.com/linode/manager/pull/9625))
- Improved VPC Create validation for subnets ([#9659](https://github.com/linode/manager/pull/9659))
- Add DC-specific pricing Invoice support ([#9597](https://github.com/linode/manager/pull/9597))
- Add DC-specific pricing Linode Create support ([#9598](https://github.com/linode/manager/pull/9598))
- Add DC-specific pricing to Kubernetes node pools ([#9606](https://github.com/linode/manager/pull/9606))
- Add DC-specific transfer pools and linode usage displays ([#9620](https://github.com/linode/manager/pull/9620))
- Add Region label to DC-specific pricing invoices ([#9663](https://github.com/linode/manager/pull/9663))
- Add AGLB Details - Configuration Tab ([#9591](https://github.com/linode/manager/pull/9591))
- Add AGLB Certificate Delete Dialog ([#9666](https://github.com/linode/manager/pull/9666))
- Add AGLB Certificate Create Drawer ([#9616](https://github.com/linode/manager/pull/9616))
- Add AGLB Configuration Delete Dialog ([#9675](https://github.com/linode/manager/pull/9675))
- Add DBaaS disk size and used size fields to Database Summary ([#9638](https://github.com/linode/manager/pull/9638))


## [2023-09-07] - v1.101.1


Expand Down
6 changes: 4 additions & 2 deletions packages/manager/cypress.config.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
/* eslint-disable no-console */
import { defineConfig } from 'cypress';
import { setupPlugins } from './cypress/support/plugins';
import { configureFileWatching } from './cypress/support/plugins/configure-file-watching';
import { configureTestSuite } from './cypress/support/plugins/configure-test-suite';
import { disableGoogleSafeBrowsing } from './cypress/support/plugins/disable-google-safe-browsing';
import { discardPassedTestRecordings } from './cypress/support/plugins/discard-passed-test-recordings';
import { loadEnvironmentConfig } from './cypress/support/plugins/load-env-config';
import { nodeVersionCheck } from './cypress/support/plugins/node-version-check';
import { regionOverrideCheck } from './cypress/support/plugins/region-override-check';
import { vitePreprocess } from './cypress/support/plugins/vite-preprocessor';
import { authenticateApi } from './cypress/support/plugins/authenticate-api';
import { configureApi } from './cypress/support/plugins/configure-api';
import { fetchLinodeRegions } from './cypress/support/plugins/fetch-linode-regions';
import { splitCypressRun } from './cypress/support/plugins/split-run';
import { enableJunitReport } from './cypress/support/plugins/junit-report';
Expand Down Expand Up @@ -51,7 +52,8 @@ export default defineConfig({
return setupPlugins(on, config, [
loadEnvironmentConfig,
nodeVersionCheck,
authenticateApi,
configureApi,
configureFileWatching,
configureTestSuite,
vitePreprocess,
disableGoogleSafeBrowsing,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { makeResourcePage } from '@src/mocks/serverHandlers';
import 'cypress-file-upload';
import { RecPartial } from 'factory.ts';
import { DateTime } from 'luxon';
import { authenticate } from 'support/api/authentication';
import { fbtClick, fbtVisible, getClick } from 'support/helpers';
import {
mockDeleteImage,
Expand Down Expand Up @@ -134,6 +135,7 @@ const uploadImage = (label: string) => {
cy.intercept('POST', apiMatcher('images/upload')).as('imageUpload');
};

authenticate();
describe('machine image', () => {
before(() => {
cleanUp('images');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import type { Image, Linode, Disk } from '@linode/api-v4/types';
import type { Linode, Disk } from '@linode/api-v4/types';
import { imageFactory } from 'src/factories/images';
import { authenticate } from 'support/api/authentication';
import { createLinode, deleteLinodeById } from 'support/api/linodes';
import {
mockCreateImage,
mockGetCustomImages,
} from 'support/intercepts/images';
import { mockGetLinodeDisks } from 'support/intercepts/linodes';
import { cleanUp } from 'support/util/cleanup';
import { randomLabel, randomNumber, randomPhrase } from 'support/util/random';

const diskLabel = 'Debian 10 Disk';
Expand All @@ -31,7 +33,12 @@ const mockDisks: Disk[] = [
},
];

authenticate();
describe('create image', () => {
before(() => {
cleanUp('linodes');
});

it('captures image from Linode and mocks create image', () => {
const imageLabel = randomLabel();
const imageDescription = randomPhrase();
Expand Down
Loading

0 comments on commit 575bd32

Please sign in to comment.