Skip to content

Commit

Permalink
Merge pull request #11623 from linode/release-v1.136.0
Browse files Browse the repository at this point in the history
Release v1.136.0 - release → staging
  • Loading branch information
abailly-akamai authored Feb 6, 2025
2 parents b3bb140 + a2c1bfc commit 15b219b
Show file tree
Hide file tree
Showing 410 changed files with 16,718 additions and 6,464 deletions.
4 changes: 2 additions & 2 deletions docs/tooling/analytics.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ Pendo is configured in [`usePendo.js`](https://github.com/linode/manager/blob/de

Important notes:

- Pendo is only loaded if a valid `PENDO_API_KEY` is configured as an environment variable. In our development, staging, and production environments, `PENDO_API_KEY` is available at build time. See **Locally Testing Page Views & Custom Events and/or Troubleshooting Pendo** for set up with local environments.
- Pendo is only loaded if the user has enabled Performance Cookies via OneTrust *and* if a valid `PENDO_API_KEY` is configured as an environment variable. In our development, staging, and production environments, `PENDO_API_KEY` is available at build time. See **Locally Testing Page Views & Custom Events and/or Troubleshooting Pendo** for set up with local environments.
- We load the Pendo agent from the CDN, rather than [self-hosting](https://support.pendo.io/hc/en-us/articles/360038969692-Self-hosting-the-Pendo-agent), and we have configured a [CNAME](https://support.pendo.io/hc/en-us/articles/360043539891-CNAME-for-Pendo).
- We are hashing account and visitor IDs in a way that is consistent with Akamai's standards.
- At initialization, we do string transformation on select URL patterns to **remove sensitive data**. When new URL patterns are added to Cloud Manager, verify that existing transforms remove sensitive data; if not, update the transforms.
- Pendo is currently not using any client-side (cookies or local) storage.
- Pendo will respect OneTrust cookie preferences in development, staging, and production environments and does not check cookie preferences in the local environment.
- Pendo makes use of the existing `data-testid` properties, used in our automated testing, for tagging elements. They are more persistent and reliable than CSS properties, which are liable to change.

### Locally Testing Page Views & Custom Events and/or Troubleshooting Pendo
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"devDependencies": {
"husky": "^9.1.6",
"typescript": "^5.7.3",
"vitest": "^2.1.1"
"vitest": "^3.0.5"
},
"scripts": {
"lint": "yarn run eslint . --quiet --ext .js,.ts,.tsx",
Expand Down
29 changes: 29 additions & 0 deletions packages/api-v4/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
## [2025-02-11] - v0.134.0


### Added:

- Labels and Taints types and params ([#11528](https://github.com/linode/manager/pull/11528))
- API endpoints for NotificationChannels ([#11547](https://github.com/linode/manager/pull/11547))
- `service-transfer` related endpoints ([#11562](https://github.com/linode/manager/pull/11562))
- `billing_agreement` to Agreements interface ([#11563](https://github.com/linode/manager/pull/11563))
- `Enhanced Interfaces` to a Region's `Capabilities` ([#11584](https://github.com/linode/manager/pull/11584))
- New database statuses for database_migration event ([#11590](https://github.com/linode/manager/pull/11590))

### Changed:

- Quotas API spec to make region field optional ([#11551](https://github.com/linode/manager/pull/11551))
- Update Taint value to allow undefined ([#11553](https://github.com/linode/manager/pull/11553))
- Mark `entity-transfers` related endpoints as deprecated ([#11562](https://github.com/linode/manager/pull/11562))

### Upcoming Features:

- Update `PermissionType` types for IAM ([#11423](https://github.com/linode/manager/pull/11423))
- Add new API types and endpoints for Linode Interfaces project: `/v4/linodes/instances` ([#11527](https://github.com/linode/manager/pull/11527))
- Update `AccountAccessType` and `RoleType` types for IAM ([#11533](https://github.com/linode/manager/pull/11533))
- Add and update `/v4/networking` endpoints and types for Linode Interfaces ([#11559](https://github.com/linode/manager/pull/11559))
- Update `/v4/account` and `/v4/vpcs` endpoints and types for upcoming Linode Interfaces project ([#11562](https://github.com/linode/manager/pull/11562))
- Update existing `v4/linodes/instances` endpoints and types for Linode Interfaces project ([#11566](https://github.com/linode/manager/pull/11566))
- Add new `editAlertDefinition` endpoint to edit the resources associated with CloudPulse alerts ([#11583](https://github.com/linode/manager/pull/11583))
- Add support for quotas usage endpoint ([#11597](https://github.com/linode/manager/pull/11597))

## [2025-01-28] - v0.133.0

### Changed:
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.134.0",
"homepage": "https://github.com/linode/manager/tree/develop/packages/api-v4",
"bugs": {
"url": "https://github.com/linode/manager/issues"
Expand Down
15 changes: 15 additions & 0 deletions packages/api-v4/src/account/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,22 @@ export interface AccountAvailability {
unavailable: Capabilities[];
}

export const linodeInterfaceAccountSettings = [
'legacy_config_only',
'legacy_config_default_but_linode_allowed',
'linode_default_but_legacy_config_allowed',
'linode_only',
];

export type LinodeInterfaceAccountSetting = typeof linodeInterfaceAccountSettings[number];

export interface AccountSettings {
managed: boolean;
longview_subscription: string | null;
network_helper: boolean;
backups_enabled: boolean;
object_storage: 'active' | 'disabled' | 'suspended';
interfaces_for_new_linodes: LinodeInterfaceAccountSetting;
}

export interface ActivePromotion {
Expand Down Expand Up @@ -254,6 +264,7 @@ export type AgreementType = 'eu_model' | 'privacy_policy';
export interface Agreements {
eu_model: boolean;
privacy_policy: boolean;
billing_agreement: boolean;
}

export type NotificationType =
Expand Down Expand Up @@ -320,6 +331,7 @@ export const EventActionKeys = [
'database_scale',
'database_update_failed',
'database_update',
'database_migrate',
'database_upgrade',
'disk_create',
'disk_delete',
Expand Down Expand Up @@ -358,6 +370,9 @@ export const EventActionKeys = [
'image_delete',
'image_update',
'image_upload',
'interface_create',
'interface_delete',
'interface_update',
'ipaddress_update',
'ipv6pool_add',
'ipv6pool_delete',
Expand Down
30 changes: 29 additions & 1 deletion packages/api-v4/src/cloudpulse/alerts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@ import Request, {
setParams,
setXFilter,
} from '../request';
import { Alert, AlertServiceType, CreateAlertDefinitionPayload } from './types';
import {
Alert,
AlertServiceType,
CreateAlertDefinitionPayload,
EditAlertDefinitionPayload,
NotificationChannel,
} from './types';
import { BETA_API_ROOT as API_ROOT } from '../constants';
import { Params, Filter, ResourcePage } from '../types';

Expand Down Expand Up @@ -44,3 +50,25 @@ export const getAlertDefinitionByServiceTypeAndId = (
),
setMethod('GET')
);

export const editAlertDefinition = (
data: EditAlertDefinitionPayload,
serviceType: string,
alertId: number
) =>
Request<Alert>(
setURL(
`${API_ROOT}/monitor/services/${encodeURIComponent(
serviceType
)}/alert-definitions/${encodeURIComponent(alertId)}`
),
setMethod('PUT'),
setData(data)
);
export const getNotificationChannels = (params?: Params, filters?: Filter) =>
Request<ResourcePage<NotificationChannel>>(
setURL(`${API_ROOT}/monitor/alert-channels`),
setMethod('GET'),
setParams(params),
setXFilter(filters)
);
4 changes: 4 additions & 0 deletions packages/api-v4/src/cloudpulse/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,3 +294,7 @@ export type NotificationChannel =
| NotificationChannelSlack
| NotificationChannelWebHook
| NotificationChannelPagerDuty;

export interface EditAlertDefinitionPayload {
entity_ids: string[];
}
2 changes: 2 additions & 0 deletions packages/api-v4/src/databases/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ export type DatabaseStatus =
| 'active'
| 'degraded'
| 'failed'
| 'migrating'
| 'migrated'
| 'provisioning'
| 'resizing'
| 'restoring'
Expand Down
5 changes: 5 additions & 0 deletions packages/api-v4/src/entity-transfers/transfers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { Filter, Params, ResourcePage as Page } from '../types';
import { CreateTransferPayload, EntityTransfer } from './types';

/**
* @deprecated
* getEntityTransfers
*
* Returns a paginated list of all Entity Transfers which this customer has created or accepted.
Expand All @@ -24,6 +25,7 @@ export const getEntityTransfers = (params?: Params, filter?: Filter) =>
);

/**
* @deprecated
* getEntityTransfer
*
* Get a single Entity Transfer by its token (uuid). A Pending transfer
Expand All @@ -39,6 +41,7 @@ export const getEntityTransfer = (token: string) =>
);

/**
* @deprecated
* createEntityTransfer
*
* Creates a pending Entity Transfer for one or more entities on
Expand All @@ -52,6 +55,7 @@ export const createEntityTransfer = (data: CreateTransferPayload) =>
);

/**
* @deprecated
* acceptEntityTransfer
*
* Accepts a transfer that has been created by a user on a different account.
Expand All @@ -67,6 +71,7 @@ export const acceptEntityTransfer = (token: string) =>
);

/**
* @deprecated
* cancelTransfer
*
* Cancels a pending transfer. Only unrestricted users on the account
Expand Down
36 changes: 33 additions & 3 deletions packages/api-v4/src/firewalls/firewalls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,20 @@ import {
CreateFirewallSchema,
FirewallDeviceSchema,
UpdateFirewallSchema,
UpdateFirewallSettingsSchema,
} from '@linode/validation/lib/firewalls.schema';
import {
CreateFirewallPayload,
Firewall,
FirewallDevice,
FirewallDevicePayload,
FirewallRules,
FirewallSettings,
FirewallTemplate,
FirewallTemplateSlug,
UpdateFirewallPayload,
UpdateFirewallRules,
UpdateFirewallSettings,
} from './types';

/**
Expand Down Expand Up @@ -150,7 +155,10 @@ export const getFirewallRules = (
* Updates the inbound and outbound Rules for a Firewall. Using this endpoint will
* replace all of a Firewall's ruleset with the Rules specified in your request.
*/
export const updateFirewallRules = (firewallID: number, data: FirewallRules) =>
export const updateFirewallRules = (
firewallID: number,
data: UpdateFirewallRules
) =>
Request<FirewallRules>(
setMethod('PUT'),
setData(data), // Validation is too complicated for these; leave it to the API.
Expand Down Expand Up @@ -245,6 +253,29 @@ export const deleteFirewallDevice = (firewallID: number, deviceID: number) =>
)
);

/**
* getFirewallSettings
*
* Returns current interface default firewall settings
*/
export const getFirewallSettings = () =>
Request<FirewallSettings>(
setMethod('GET'),
setURL(`${BETA_API_ROOT}/networking/firewalls/settings`)
);

/**
* updateFirewallSettings
*
* Update which firewalls should be the interface default firewalls
*/
export const updateFirewallSettings = (data: UpdateFirewallSettings) =>
Request<FirewallSettings>(
setMethod('PUT'),
setURL(`${BETA_API_ROOT}/networking/firewalls/settings`),
setData(data, UpdateFirewallSettingsSchema)
);

// #region Templates

/**
Expand All @@ -262,9 +293,8 @@ export const getTemplates = () =>
* getTemplate
*
* Get a specific firewall template by its slug.
*
*/
export const getTemplate = (templateSlug: string) =>
export const getTemplate = (templateSlug: FirewallTemplateSlug) =>
Request<FirewallTemplate>(
setMethod('GET'),
setURL(
Expand Down
42 changes: 32 additions & 10 deletions packages/api-v4/src/firewalls/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export type FirewallStatus = 'enabled' | 'disabled' | 'deleted';

export type FirewallRuleProtocol = 'ALL' | 'TCP' | 'UDP' | 'ICMP' | 'IPENCAP';

export type FirewallDeviceEntityType = 'linode' | 'nodebalancer';
export type FirewallDeviceEntityType = 'linode' | 'nodebalancer' | 'interface';

export type FirewallPolicyType = 'ACCEPT' | 'DROP';

Expand All @@ -14,21 +14,25 @@ export interface Firewall {
rules: FirewallRules;
created: string;
updated: string;
entities: {
id: number;
type: FirewallDeviceEntityType;
label: string;
url: string;
}[];
entities: FirewallDeviceEntity[];
}

export interface FirewallRules {
fingerprint: string;
inbound?: FirewallRuleType[] | null;
outbound?: FirewallRuleType[] | null;
inbound_policy: FirewallPolicyType;
outbound_policy: FirewallPolicyType;
version: number;
}

export type UpdateFirewallRules = Omit<
FirewallRules,
'fingerprint' | 'version'
>;

export type FirewallTemplateRules = UpdateFirewallRules;

export interface FirewallRuleType {
label?: string | null;
description?: string | null;
Expand All @@ -55,18 +59,21 @@ export interface FirewallDevice {
entity: FirewallDeviceEntity;
}

export type FirewallTemplateSlug = 'akamai-non-prod' | 'vpc' | 'public';

export interface FirewallTemplate {
slug: string;
rules: FirewallRules;
slug: FirewallTemplateSlug;
rules: FirewallTemplateRules;
}

export interface CreateFirewallPayload {
label?: string;
tags?: string[];
rules: FirewallRules;
rules: UpdateFirewallRules;
devices?: {
linodes?: number[];
nodebalancers?: number[];
interfaces?: number[];
};
}

Expand All @@ -80,3 +87,18 @@ export interface FirewallDevicePayload {
id: number;
type: FirewallDeviceEntityType;
}

export interface DefaultFirewallIDs {
public_interface: number;
vpc_interface: number;
linode: number;
nodebalancer: number;
}

export interface FirewallSettings {
default_firewall_ids: DefaultFirewallIDs;
}

export interface UpdateFirewallSettings {
default_firewall_ids: Partial<DefaultFirewallIDs>;
}
Loading

0 comments on commit 15b219b

Please sign in to comment.