Skip to content

Commit 271627a

Browse files
authored
Merge pull request #11720 from linode/staging
Release v1.137.0 - staging → master
2 parents 2be1170 + 9be9b65 commit 271627a

File tree

716 files changed

+13406
-7657
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

716 files changed

+13406
-7657
lines changed

docker-compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
version: '3.4'
32

43
# Environment variables that will be exposed to every Cypress runner.
54
x-e2e-env:

docs/GETTING_STARTED.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
1. Fork this repository.
44
2. Clone your fork to your local machine.
55
3. Go to [cloud.linode.com/profile/clients](https://cloud.linode.com/profile/clients) and click "Add an OAuth App".
6-
4. Enter a label and set the callback URL to `http://localhost:3000/oauth/callback`.
6+
4. Enter a label, set the callback URL to `http://localhost:3000/oauth/callback`, and check the "Public" checkbox.
77
5. After your OAuth App has been created, copy the ID (not the secret).
88
6. In `packages/manager`, copy the contents of `.env.example` and paste them into a new file called `.env`.
99
7. In `.env` set `REACT_APP_CLIENT_ID` to the ID from step 5.

packages/api-v4/CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
## [2025-02-25] - v0.135.0
2+
3+
### Changed:
4+
5+
- Update LKE Tiered Version endpoints ([#11703](https://github.com/linode/manager/pull/11703))
6+
7+
### Upcoming Features:
8+
9+
- Add `DateTimeWithPreset` type in CloudPulse types ([#11573](https://github.com/linode/manager/pull/11573))
10+
- Add `update_firewall` RoleType for IAM ([#11588](https://github.com/linode/manager/pull/11588))
11+
- Change attribute names in NotificationChannel and MetricCriteria types to reflect the latest API specification ([#11610](https://github.com/linode/manager/pull/11610))
12+
- Change type of the alertId in `editAlertDefinition` and `getAlertDefinitionByServiceTypeAndId` endpoints in CloudPulse alerts to string ([#11613](https://github.com/linode/manager/pull/11613))
13+
- Add new `class` type in alerts object ([#11642](https://github.com/linode/manager/pull/11642))
14+
115
## [2025-02-11] - v0.134.0
216

317

packages/api-v4/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@linode/api-v4",
3-
"version": "0.134.0",
3+
"version": "0.135.0",
44
"homepage": "https://github.com/linode/manager/tree/develop/packages/api-v4",
55
"bugs": {
66
"url": "https://github.com/linode/manager/issues"

packages/api-v4/src/account/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export const linodeInterfaceAccountSettings = [
9999
'legacy_config_default_but_linode_allowed',
100100
'linode_default_but_legacy_config_allowed',
101101
'linode_only',
102-
];
102+
] as const;
103103

104104
export type LinodeInterfaceAccountSetting = typeof linodeInterfaceAccountSettings[number];
105105

packages/api-v4/src/cloudpulse/alerts.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export const getAlertDefinitions = (params?: Params, filters?: Filter) =>
4040

4141
export const getAlertDefinitionByServiceTypeAndId = (
4242
serviceType: string,
43-
alertId: number
43+
alertId: string
4444
) =>
4545
Request<Alert>(
4646
setURL(
@@ -54,7 +54,7 @@ export const getAlertDefinitionByServiceTypeAndId = (
5454
export const editAlertDefinition = (
5555
data: EditAlertDefinitionPayload,
5656
serviceType: string,
57-
alertId: number
57+
alertId: string
5858
) =>
5959
Request<Alert>(
6060
setURL(

packages/api-v4/src/cloudpulse/services.ts

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,33 @@
11
import { BETA_API_ROOT as API_ROOT } from 'src/constants';
2-
import Request, { setData, setMethod, setURL } from '../request';
2+
import Request, {
3+
setData,
4+
setMethod,
5+
setParams,
6+
setURL,
7+
setXFilter,
8+
} from '../request';
39
import {
410
JWEToken,
511
JWETokenPayLoad,
612
MetricDefinition,
713
ServiceTypesList,
814
} from './types';
9-
import { ResourcePage } from 'src/types';
15+
import { Filter, Params, ResourcePage } from 'src/types';
1016

11-
export const getMetricDefinitionsByServiceType = (serviceType: string) => {
17+
export const getMetricDefinitionsByServiceType = (
18+
serviceType: string,
19+
params?: Params,
20+
filters?: Filter
21+
) => {
1222
return Request<ResourcePage<MetricDefinition>>(
1323
setURL(
1424
`${API_ROOT}/monitor/services/${encodeURIComponent(
1525
serviceType
1626
)}/metric-definitions`
1727
),
18-
setMethod('GET')
28+
setMethod('GET'),
29+
setParams(params),
30+
setXFilter(filters)
1931
);
2032
};
2133

packages/api-v4/src/cloudpulse/types.ts

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ export type AlertSeverityType = 0 | 1 | 2 | 3;
22
export type MetricAggregationType = 'avg' | 'sum' | 'min' | 'max' | 'count';
33
export type MetricOperatorType = 'eq' | 'gt' | 'lt' | 'gte' | 'lte';
44
export type AlertServiceType = 'linode' | 'dbaas';
5+
export type AlertClass = 'dedicated' | 'shared';
56
export type DimensionFilterOperatorType =
67
| 'eq'
78
| 'neq'
@@ -48,6 +49,12 @@ export interface TimeDuration {
4849
value: number;
4950
}
5051

52+
export interface DateTimeWithPreset {
53+
end: string;
54+
start: string;
55+
preset?: string;
56+
}
57+
5158
export interface Widgets {
5259
label: string;
5360
metric: string;
@@ -80,6 +87,7 @@ export type FilterValue =
8087
| string[]
8188
| number[]
8289
| WidgetFilterValue
90+
| DateTimeWithPreset
8391
| undefined;
8492

8593
type WidgetFilterValue = { [key: string]: AclpWidget };
@@ -104,6 +112,7 @@ export interface MetricDefinition {
104112
scrape_interval: string;
105113
available_aggregate_functions: string[];
106114
dimensions: Dimension[];
115+
is_alertable: boolean;
107116
}
108117

109118
export interface Dimension {
@@ -125,7 +134,8 @@ export interface CloudPulseMetricsRequest {
125134
filters?: Filters[];
126135
aggregate_function: string;
127136
group_by: string;
128-
relative_time_duration: TimeDuration;
137+
relative_time_duration: TimeDuration | undefined;
138+
absolute_time_duration: DateTimeWithPreset | undefined;
129139
time_granularity: TimeGranularity | undefined;
130140
entity_ids: number[];
131141
}
@@ -170,9 +180,10 @@ export interface CreateAlertDefinitionPayload {
170180
trigger_conditions: TriggerCondition;
171181
channel_ids: number[];
172182
}
183+
173184
export interface MetricCriteria {
174185
metric: string;
175-
aggregation_type: MetricAggregationType;
186+
aggregate_function: MetricAggregationType;
176187
operator: MetricOperatorType;
177188
threshold: number;
178189
dimension_filters?: DimensionFilter[];
@@ -204,6 +215,7 @@ export interface Alert {
204215
label: string;
205216
tags: string[];
206217
description: string;
218+
class?: AlertClass;
207219
has_more_resources: boolean;
208220
status: AlertStatusType;
209221
type: AlertDefinitionType;
@@ -214,11 +226,11 @@ export interface Alert {
214226
rules: AlertDefinitionMetricCriteria[];
215227
};
216228
trigger_conditions: TriggerCondition;
217-
channels: {
218-
id: string;
229+
alert_channels: {
230+
id: number;
219231
label: string;
220232
url: string;
221-
type: 'channel';
233+
type: 'alert-channel';
222234
}[];
223235
created_by: string;
224236
updated_by: string;
@@ -296,5 +308,14 @@ export type NotificationChannel =
296308
| NotificationChannelPagerDuty;
297309

298310
export interface EditAlertDefinitionPayload {
299-
entity_ids: string[];
311+
entity_ids?: string[];
312+
status?: AlertStatusType;
300313
}
314+
315+
export interface EditAlertPayloadWithService
316+
extends EditAlertDefinitionPayload {
317+
serviceType: string;
318+
alertId: string;
319+
}
320+
321+
export type AlertStatusUpdateType = 'Enable' | 'Disable';

packages/api-v4/src/iam/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export type RoleType =
2323
| 'linode_viewer'
2424
| 'firewall_admin'
2525
| 'linode_creator'
26+
| 'update_firewall'
2627
| 'firewall_creator';
2728

2829
export interface IamUserPermissions {

packages/api-v4/src/kubernetes/kubernetes.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ export const getKubernetesTieredVersionsBeta = (
184184
setMethod('GET'),
185185
setXFilter(filters),
186186
setParams(params),
187-
setURL(`${BETA_API_ROOT}/lke/versions/${encodeURIComponent(tier)}`)
187+
setURL(`${BETA_API_ROOT}/lke/tiers/${encodeURIComponent(tier)}/versions`)
188188
);
189189

190190
/** getKubernetesVersion
@@ -212,9 +212,9 @@ export const getKubernetesTieredVersionBeta = (
212212
Request<KubernetesTieredVersion>(
213213
setMethod('GET'),
214214
setURL(
215-
`${BETA_API_ROOT}/lke/versions/${encodeURIComponent(
215+
`${BETA_API_ROOT}/lke/tiers/${encodeURIComponent(
216216
tier
217-
)}/${encodeURIComponent(versionID)}`
217+
)}/versions/${encodeURIComponent(versionID)}`
218218
)
219219
);
220220

0 commit comments

Comments
 (0)