Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/e2e_schedule_and_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ env:
USER_4: ${{ secrets.USER_4 }}
CLIENT_ID: ${{ secrets.REACT_APP_CLIENT_ID }}
CY_TEST_FAIL_ON_MANAGED: 1
CY_TEST_RESET_PREFERENCES: 1
on:
schedule:
- cron: "0 13 * * 1-5"
Expand Down
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ x-e2e-env:
CY_TEST_FEATURE_FLAGS: ${CY_TEST_FEATURE_FLAGS}
CY_TEST_TAGS: ${CY_TEST_TAGS}
CY_TEST_DISABLE_RETRIES: ${CY_TEST_DISABLE_RETRIES}
CY_TEST_RESET_PREFERENCES: ${CY_TEST_RESET_PREFERENCES}

# Cypress environment variables for alternative parallelization.
CY_TEST_SPLIT_RUN: ${CY_TEST_SPLIT_RUN}
Expand Down
9 changes: 5 additions & 4 deletions docs/development-guide/08-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,6 @@ Environment variables related to Cypress logging and reporting, as well as repor
| `CY_TEST_DISABLE_RETRIES` | Disable test retries on failure in CI | `1` | Unset; disabled by default |
| `CY_TEST_FAIL_ON_MANAGED` | Fail affected tests when Managed is enabled | `1` | Unset; disabled by default |
| `CY_TEST_GENWEIGHTS` | Generate and output test weights to the given path | `./weights.json` | Unset; disabled by default |
| `CY_TEST_RESET_PREFERENCES` | Reset user preferences when test run begins | `1` | Unset; disabled by default |

###### Performance

Expand Down Expand Up @@ -282,15 +281,17 @@ Environment variables that can be used to improve test performance in some scena
cy.wait('@getProfilePreferences');
cy.wait('@getAccountSettings');

cy.get(`tr[data-qa-linode="${label}"]`).should('be.visible').within(() => {
/* `getVisible` defined in /cypress/support/helpers.ts
plus a few other commonly used commands shortened as methods */
getVisible(`tr[data-qa-linode="${label}"]`).within(() => {
// use `within` to search inside/use data from/assert on a specific page element
cy.get(`[data-qa-ip-main]`)
// `realHover` and more real event methods from cypress real events plugin
.realHover()
.then(() => {
cy.get(`[aria-label="Copy ${ip} to clipboard"]`).should('be.visible');
getVisible(`[aria-label="Copy ${ip} to clipboard"]`);
});
cy.get(`[aria-label="Action menu for Linode ${label}"]`).should('be.visible');
getVisible(`[aria-label="Action menu for Linode ${label}"]`);
});
// `findByText` and others from cypress testing library plugin
cy.findByText('Oh Snap!', { timeout: 1000 }).should('not.exist');
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"license": "Apache-2.0",
"devDependencies": {
"husky": "^9.1.6",
"typescript": "^5.7.3",
"typescript": "^5.5.4",
"vitest": "^2.1.1"
},
"scripts": {
Expand Down Expand Up @@ -52,8 +52,7 @@
"node-fetch": "^2.6.7",
"yaml": "^2.3.0",
"semver": "^7.5.2",
"cookie": "^0.7.0",
"nanoid": "^3.3.8"
"cookie": "^0.7.0"
},
"workspaces": {
"packages": [
Expand Down
17 changes: 0 additions & 17 deletions packages/api-v4/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,3 @@
## [2025-01-28] - v0.133.0

### Changed:

- Allow `cipher_suite` to be `none` in `NodeBalancerConfig` and `CreateNodeBalancerConfig` ([#11515](https://github.com/linode/manager/pull/11515))

### Tech Stories:

- Update `tsconfig.json` to use `bundler` moduleResolution ([#11487](https://github.com/linode/manager/pull/11487))

### Upcoming Features:

- Update types for IAM and resources API ([#11429](https://github.com/linode/manager/pull/11429))
- Add types for Quotas endpoints ([#11493](https://github.com/linode/manager/pull/11493))
- Add Notification Channel related types to cloudpulse/alerts.ts ([#11511](https://github.com/linode/manager/pull/11511))


## [2025-01-14] - v0.132.0

### Added:
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.133.0",
"version": "0.132.0",
"homepage": "https://github.com/linode/manager/tree/develop/packages/api-v4",
"bugs": {
"url": "https://github.com/linode/manager/issues"
Expand Down
82 changes: 3 additions & 79 deletions packages/api-v4/src/cloudpulse/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,6 @@ export type MetricUnitType =
| 'KB'
| 'MB'
| 'GB';
export type NotificationStatus = 'Enabled' | 'Disabled';
export type ChannelType = 'email' | 'slack' | 'pagerduty' | 'webhook';
export type AlertNotificationType = 'default' | 'custom';
type AlertNotificationEmail = 'email';
type AlertNotificationSlack = 'slack';
type AlertNotificationPagerDuty = 'pagerduty';
type AlertNotificationWebHook = 'webhook';
export interface Dashboard {
id: number;
label: string;
Expand Down Expand Up @@ -62,7 +55,7 @@ export interface Widgets {
filters: Filters[];
serviceType: string;
service_type: string;
entity_ids: string[];
resource_id: string[];
time_granularity: TimeGranularity;
time_duration: TimeDuration;
unit: string;
Expand Down Expand Up @@ -113,7 +106,7 @@ export interface Dimension {
}

export interface JWETokenPayLoad {
entity_ids: number[];
resource_ids: number[];
}

export interface JWEToken {
Expand All @@ -127,7 +120,7 @@ export interface CloudPulseMetricsRequest {
group_by: string;
relative_time_duration: TimeDuration;
time_granularity: TimeGranularity | undefined;
entity_ids: number[];
resource_ids: number[];
}

export interface CloudPulseMetricsResponse {
Expand Down Expand Up @@ -225,72 +218,3 @@ export interface Alert {
created: string;
updated: string;
}

interface NotificationChannelAlerts {
id: number;
label: string;
url: string;
type: 'alerts-definitions';
}
interface NotificationChannelBase {
id: number;
label: string;
channel_type: ChannelType;
type: AlertNotificationType;
status: NotificationStatus;
alerts: NotificationChannelAlerts[];
created_by: string;
updated_by: string;
created_at: string;
updated_at: string;
}

interface NotificationChannelEmail extends NotificationChannelBase {
channel_type: AlertNotificationEmail;
content: {
email: {
email_addresses: string[];
subject: string;
message: string;
};
};
}

interface NotificationChannelSlack extends NotificationChannelBase {
channel_type: AlertNotificationSlack;
content: {
slack: {
slack_webhook_url: string;
slack_channel: string;
message: string;
};
};
}

interface NotificationChannelPagerDuty extends NotificationChannelBase {
channel_type: AlertNotificationPagerDuty;
content: {
pagerduty: {
service_api_key: string;
attributes: string[];
description: string;
};
};
}
interface NotificationChannelWebHook extends NotificationChannelBase {
channel_type: AlertNotificationWebHook;
content: {
webhook: {
webhook_url: string;
http_headers: {
header_key: string;
header_value: string;
}[];
};
};
}
export type NotificationChannel =
| NotificationChannelEmail
| NotificationChannelSlack
| NotificationChannelWebHook
| NotificationChannelPagerDuty;
2 changes: 0 additions & 2 deletions packages/api-v4/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ export * from './placement-groups';

export * from './profile';

export * from './quotas';

export * from './regions';

export * from './stackscripts';
Expand Down
7 changes: 2 additions & 5 deletions packages/api-v4/src/nodebalancers/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,7 @@ export interface NodeBalancerConfig {
stickiness: Stickiness;
algorithm: Algorithm;
ssl_fingerprint: string;
/**
* Is `none` when protocol is UDP
*/
cipher_suite: 'recommended' | 'legacy' | 'none';
cipher_suite: 'recommended' | 'legacy';
nodes: NodeBalancerConfigNode[];
}

Expand Down Expand Up @@ -163,7 +160,7 @@ export interface CreateNodeBalancerConfig {
* @default 80
*/
udp_check_port?: number;
cipher_suite?: 'recommended' | 'legacy' | 'none';
cipher_suite?: 'recommended' | 'legacy';
ssl_cert?: string;
ssl_key?: string;
}
Expand Down
3 changes: 0 additions & 3 deletions packages/api-v4/src/quotas/index.ts

This file was deleted.

36 changes: 0 additions & 36 deletions packages/api-v4/src/quotas/quotas.ts

This file was deleted.

70 changes: 0 additions & 70 deletions packages/api-v4/src/quotas/types.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/api-v4/src/request.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { beforeEach, describe, vi, expect, it } from 'vitest';
import adapter from 'axios-mock-adapter';
import { object, string } from 'yup';
import request, {
Expand Down
6 changes: 3 additions & 3 deletions packages/api-v4/src/resources/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export type ResourceType =
type ResourceType =
| 'linode'
| 'firewall'
| 'nodebalancer'
Expand All @@ -10,10 +10,10 @@ export type ResourceType =
| 'database'
| 'vpc';

export interface IamAccountResource {
export type IamAccountResource = {
resource_type: ResourceType;
resources: Resource[];
}
}[];

export interface Resource {
name: string;
Expand Down
9 changes: 7 additions & 2 deletions packages/api-v4/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"types": ["vitest/globals"],
"module": "umd",
"emitDeclarationOnly": true,
"declaration": true,
"outDir": "./lib",
"esModuleInterop": true,
"moduleResolution": "bundler",
"moduleResolution": "node",
"skipLibCheck": true,
"strict": true,
"baseUrl": ".",
Expand All @@ -16,5 +17,9 @@
},
"include": [
"src"
],
"exclude": [
"node_modules/**/*",
"**/__tests__/*"
]
}
Loading
Loading