Skip to content

Remove mobile device ids and make all device ids simple string #1914

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
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
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2024-11-19 21:12:10.276537",
"spec_repo_commit": "2e48953d"
"regenerated": "2024-11-20 20:14:26.200446",
"spec_repo_commit": "ebf27b5e"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-11-19 21:12:10.295215",
"spec_repo_commit": "2e48953d"
"regenerated": "2024-11-20 20:14:26.219169",
"spec_repo_commit": "ebf27b5e"
}
}
}
34 changes: 2 additions & 32 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15178,34 +15178,8 @@ components:
type: object
SyntheticsDeviceID:
description: The device ID.
enum:
- laptop_large
- tablet
- mobile_small
- chrome.laptop_large
- chrome.tablet
- chrome.mobile_small
- firefox.laptop_large
- firefox.tablet
- firefox.mobile_small
- edge.laptop_large
- edge.tablet
- edge.mobile_small
example: chrome.laptop_large
type: string
x-enum-varnames:
- LAPTOP_LARGE
- TABLET
- MOBILE_SMALL
- CHROME_LAPTOP_LARGE
- CHROME_TABLET
- CHROME_MOBILE_SMALL
- FIREFOX_LAPTOP_LARGE
- FIREFOX_TABLET
- FIREFOX_MOBILE_SMALL
- EDGE_LAPTOP_LARGE
- EDGE_TABLET
- EDGE_MOBILE_SMALL
SyntheticsFetchUptimesPayload:
description: Object containing IDs of Synthetic tests and a timeframe.
properties:
Expand Down Expand Up @@ -15508,10 +15482,6 @@ components:
$ref: '#/components/schemas/SyntheticsLocation'
type: array
type: object
SyntheticsMobileDeviceID:
description: The device ID.
example: synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16
type: string
SyntheticsMobileStep:
description: The steps used in a Synthetic mobile test.
properties:
Expand Down Expand Up @@ -15787,7 +15757,7 @@ components:
device_ids:
description: Array with the different device IDs used to run the test.
items:
$ref: '#/components/schemas/SyntheticsMobileDeviceID'
$ref: '#/components/schemas/SyntheticsDeviceID'
type: array
message:
description: Notification message associated with the test.
Expand Down Expand Up @@ -15876,7 +15846,7 @@ components:
example:
- synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16
items:
$ref: '#/components/schemas/SyntheticsMobileDeviceID'
$ref: '#/components/schemas/SyntheticsDeviceID'
type: array
disableAutoAcceptAlert:
description: A boolean to disable auto accepting alerts.
Expand Down
8 changes: 4 additions & 4 deletions features/v1/synthetics.feature
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ Feature: Synthetics
@generated @skip @team:DataDog/synthetics-ct
Scenario: Create a mobile test returns "- JSON format is wrong" response
Given new "CreateSyntheticsMobileTest" request
And body with value {"config": {"variables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}]}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "message": "Notification message", "name": "Example test name", "options": {"bindings": [{"principals": [], "relation": "editor"}], "ci": {"executionRule": "blocking"}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "mobileApplication": {"applicationId": "00000000-0000-0000-0000-aaaaaaaaaaaa", "referenceId": "00000000-0000-0000-0000-aaaaaaaaaaab", "referenceType": "latest"}, "monitor_options": {"notification_preset_name": "show_all"}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "scheduling": {"timeframes": [{"day": 1, "from": "07:00", "to": "16:00"}, {"day": 3, "from": "07:00", "to": "16:00"}], "timezone": "America/New_York"}, "tick_every": 300}, "status": "live", "steps": [{"name": "", "params": {"check": "equals", "direction": "up", "element": {"contextType": "native", "relativePosition": {}, "userLocator": {"values": [{"type": "accessibility-id"}]}}, "positions": [{}], "variable": {"example": "", "name": "VAR_NAME"}}, "publicId": "pub-lic-id0", "type": "assertElementContent"}], "tags": ["env:production"], "type": "mobile"}
And body with value {"config": {"variables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}]}, "device_ids": ["chrome.laptop_large"], "message": "Notification message", "name": "Example test name", "options": {"bindings": [{"principals": [], "relation": "editor"}], "ci": {"executionRule": "blocking"}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "mobileApplication": {"applicationId": "00000000-0000-0000-0000-aaaaaaaaaaaa", "referenceId": "00000000-0000-0000-0000-aaaaaaaaaaab", "referenceType": "latest"}, "monitor_options": {"notification_preset_name": "show_all"}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "scheduling": {"timeframes": [{"day": 1, "from": "07:00", "to": "16:00"}, {"day": 3, "from": "07:00", "to": "16:00"}], "timezone": "America/New_York"}, "tick_every": 300}, "status": "live", "steps": [{"name": "", "params": {"check": "equals", "direction": "up", "element": {"contextType": "native", "relativePosition": {}, "userLocator": {"values": [{"type": "accessibility-id"}]}}, "positions": [{}], "variable": {"example": "", "name": "VAR_NAME"}}, "publicId": "pub-lic-id0", "type": "assertElementContent"}], "tags": ["env:production"], "type": "mobile"}
When the request is sent
Then the response status is 400 - JSON format is wrong

Expand All @@ -147,7 +147,7 @@ Feature: Synthetics
@generated @skip @team:DataDog/synthetics-ct
Scenario: Create a mobile test returns "Test quota is reached" response
Given new "CreateSyntheticsMobileTest" request
And body with value {"config": {"variables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}]}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "message": "Notification message", "name": "Example test name", "options": {"bindings": [{"principals": [], "relation": "editor"}], "ci": {"executionRule": "blocking"}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "mobileApplication": {"applicationId": "00000000-0000-0000-0000-aaaaaaaaaaaa", "referenceId": "00000000-0000-0000-0000-aaaaaaaaaaab", "referenceType": "latest"}, "monitor_options": {"notification_preset_name": "show_all"}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "scheduling": {"timeframes": [{"day": 1, "from": "07:00", "to": "16:00"}, {"day": 3, "from": "07:00", "to": "16:00"}], "timezone": "America/New_York"}, "tick_every": 300}, "status": "live", "steps": [{"name": "", "params": {"check": "equals", "direction": "up", "element": {"contextType": "native", "relativePosition": {}, "userLocator": {"values": [{"type": "accessibility-id"}]}}, "positions": [{}], "variable": {"example": "", "name": "VAR_NAME"}}, "publicId": "pub-lic-id0", "type": "assertElementContent"}], "tags": ["env:production"], "type": "mobile"}
And body with value {"config": {"variables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}]}, "device_ids": ["chrome.laptop_large"], "message": "Notification message", "name": "Example test name", "options": {"bindings": [{"principals": [], "relation": "editor"}], "ci": {"executionRule": "blocking"}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "mobileApplication": {"applicationId": "00000000-0000-0000-0000-aaaaaaaaaaaa", "referenceId": "00000000-0000-0000-0000-aaaaaaaaaaab", "referenceType": "latest"}, "monitor_options": {"notification_preset_name": "show_all"}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "scheduling": {"timeframes": [{"day": 1, "from": "07:00", "to": "16:00"}, {"day": 3, "from": "07:00", "to": "16:00"}], "timezone": "America/New_York"}, "tick_every": 300}, "status": "live", "steps": [{"name": "", "params": {"check": "equals", "direction": "up", "element": {"contextType": "native", "relativePosition": {}, "userLocator": {"values": [{"type": "accessibility-id"}]}}, "positions": [{}], "variable": {"example": "", "name": "VAR_NAME"}}, "publicId": "pub-lic-id0", "type": "assertElementContent"}], "tags": ["env:production"], "type": "mobile"}
When the request is sent
Then the response status is 402 Test quota is reached

Expand Down Expand Up @@ -361,15 +361,15 @@ Feature: Synthetics
Scenario: Edit a Mobile test returns "- JSON format is wrong" response
Given new "UpdateMobileTest" request
And request contains "public_id" parameter from "REPLACE.ME"
And body with value {"config": {"variables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}]}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "message": "Notification message", "name": "Example test name", "options": {"bindings": [{"principals": [], "relation": "editor"}], "ci": {"executionRule": "blocking"}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "mobileApplication": {"applicationId": "00000000-0000-0000-0000-aaaaaaaaaaaa", "referenceId": "00000000-0000-0000-0000-aaaaaaaaaaab", "referenceType": "latest"}, "monitor_options": {"notification_preset_name": "show_all"}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "scheduling": {"timeframes": [{"day": 1, "from": "07:00", "to": "16:00"}, {"day": 3, "from": "07:00", "to": "16:00"}], "timezone": "America/New_York"}, "tick_every": 300}, "status": "live", "steps": [{"name": "", "params": {"check": "equals", "direction": "up", "element": {"contextType": "native", "relativePosition": {}, "userLocator": {"values": [{"type": "accessibility-id"}]}}, "positions": [{}], "variable": {"example": "", "name": "VAR_NAME"}}, "publicId": "pub-lic-id0", "type": "assertElementContent"}], "tags": ["env:production"], "type": "mobile"}
And body with value {"config": {"variables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}]}, "device_ids": ["chrome.laptop_large"], "message": "Notification message", "name": "Example test name", "options": {"bindings": [{"principals": [], "relation": "editor"}], "ci": {"executionRule": "blocking"}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "mobileApplication": {"applicationId": "00000000-0000-0000-0000-aaaaaaaaaaaa", "referenceId": "00000000-0000-0000-0000-aaaaaaaaaaab", "referenceType": "latest"}, "monitor_options": {"notification_preset_name": "show_all"}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "scheduling": {"timeframes": [{"day": 1, "from": "07:00", "to": "16:00"}, {"day": 3, "from": "07:00", "to": "16:00"}], "timezone": "America/New_York"}, "tick_every": 300}, "status": "live", "steps": [{"name": "", "params": {"check": "equals", "direction": "up", "element": {"contextType": "native", "relativePosition": {}, "userLocator": {"values": [{"type": "accessibility-id"}]}}, "positions": [{}], "variable": {"example": "", "name": "VAR_NAME"}}, "publicId": "pub-lic-id0", "type": "assertElementContent"}], "tags": ["env:production"], "type": "mobile"}
When the request is sent
Then the response status is 400 - JSON format is wrong

@generated @skip @team:DataDog/synthetics-ct
Scenario: Edit a Mobile test returns "- Synthetic Monitoring is not activated for the user" response
Given new "UpdateMobileTest" request
And request contains "public_id" parameter from "REPLACE.ME"
And body with value {"config": {"variables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}]}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "message": "Notification message", "name": "Example test name", "options": {"bindings": [{"principals": [], "relation": "editor"}], "ci": {"executionRule": "blocking"}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "mobileApplication": {"applicationId": "00000000-0000-0000-0000-aaaaaaaaaaaa", "referenceId": "00000000-0000-0000-0000-aaaaaaaaaaab", "referenceType": "latest"}, "monitor_options": {"notification_preset_name": "show_all"}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "scheduling": {"timeframes": [{"day": 1, "from": "07:00", "to": "16:00"}, {"day": 3, "from": "07:00", "to": "16:00"}], "timezone": "America/New_York"}, "tick_every": 300}, "status": "live", "steps": [{"name": "", "params": {"check": "equals", "direction": "up", "element": {"contextType": "native", "relativePosition": {}, "userLocator": {"values": [{"type": "accessibility-id"}]}}, "positions": [{}], "variable": {"example": "", "name": "VAR_NAME"}}, "publicId": "pub-lic-id0", "type": "assertElementContent"}], "tags": ["env:production"], "type": "mobile"}
And body with value {"config": {"variables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}]}, "device_ids": ["chrome.laptop_large"], "message": "Notification message", "name": "Example test name", "options": {"bindings": [{"principals": [], "relation": "editor"}], "ci": {"executionRule": "blocking"}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "mobileApplication": {"applicationId": "00000000-0000-0000-0000-aaaaaaaaaaaa", "referenceId": "00000000-0000-0000-0000-aaaaaaaaaaab", "referenceType": "latest"}, "monitor_options": {"notification_preset_name": "show_all"}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "scheduling": {"timeframes": [{"day": 1, "from": "07:00", "to": "16:00"}, {"day": 3, "from": "07:00", "to": "16:00"}], "timezone": "America/New_York"}, "tick_every": 300}, "status": "live", "steps": [{"name": "", "params": {"check": "equals", "direction": "up", "element": {"contextType": "native", "relativePosition": {}, "userLocator": {"values": [{"type": "accessibility-id"}]}}, "positions": [{}], "variable": {"example": "", "name": "VAR_NAME"}}, "publicId": "pub-lic-id0", "type": "assertElementContent"}], "tags": ["env:production"], "type": "mobile"}
When the request is sent
Then the response status is 404 - Synthetic Monitoring is not activated for the user

Expand Down
1 change: 0 additions & 1 deletion packages/datadog-api-client-v1/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -940,7 +940,6 @@ export { SyntheticsDeletedTest } from "./models/SyntheticsDeletedTest";
export { SyntheticsDeleteTestsPayload } from "./models/SyntheticsDeleteTestsPayload";
export { SyntheticsDeleteTestsResponse } from "./models/SyntheticsDeleteTestsResponse";
export { SyntheticsDevice } from "./models/SyntheticsDevice";
export { SyntheticsDeviceID } from "./models/SyntheticsDeviceID";
export { SyntheticsFetchUptimesPayload } from "./models/SyntheticsFetchUptimesPayload";
export { SyntheticsGetAPITestLatestResultsResponse } from "./models/SyntheticsGetAPITestLatestResultsResponse";
export { SyntheticsGetBrowserTestLatestResultsResponse } from "./models/SyntheticsGetBrowserTestLatestResultsResponse";
Expand Down
14 changes: 0 additions & 14 deletions packages/datadog-api-client-v1/models/ObjectSerializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1347,20 +1347,6 @@ const enumsMap: { [key: string]: any[] } = {
"notIsEmpty",
],
SyntheticsConfigVariableType: ["global", "text", "email"],
SyntheticsDeviceID: [
"laptop_large",
"tablet",
"mobile_small",
"chrome.laptop_large",
"chrome.tablet",
"chrome.mobile_small",
"firefox.laptop_large",
"firefox.tablet",
"firefox.mobile_small",
"edge.laptop_large",
"edge.tablet",
"edge.mobile_small",
],
SyntheticsGlobalVariableParseTestOptionsType: [
"http_body",
"http_header",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* Copyright 2020-Present Datadog, Inc.
*/
import { SyntheticsBatchStatus } from "./SyntheticsBatchStatus";
import { SyntheticsDeviceID } from "./SyntheticsDeviceID";
import { SyntheticsTestDetailsType } from "./SyntheticsTestDetailsType";
import { SyntheticsTestExecutionRule } from "./SyntheticsTestExecutionRule";

Expand All @@ -17,7 +16,7 @@ export class SyntheticsBatchResult {
/**
* The device ID.
*/
"device"?: SyntheticsDeviceID;
"device"?: string;
/**
* Total duration in millisecond of the test.
*/
Expand Down Expand Up @@ -73,7 +72,7 @@ export class SyntheticsBatchResult {
static readonly attributeTypeMap: AttributeTypeMap = {
device: {
baseName: "device",
type: "SyntheticsDeviceID",
type: "string",
},
duration: {
baseName: "duration",
Expand Down
5 changes: 2 additions & 3 deletions packages/datadog-api-client-v1/models/SyntheticsCITest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*/
import { SyntheticsBasicAuth } from "./SyntheticsBasicAuth";
import { SyntheticsCIBatchMetadata } from "./SyntheticsCIBatchMetadata";
import { SyntheticsDeviceID } from "./SyntheticsDeviceID";
import { SyntheticsTestOptionsRetry } from "./SyntheticsTestOptionsRetry";

import { AttributeTypeMap } from "../../datadog-api-client-common/util";
Expand Down Expand Up @@ -37,7 +36,7 @@ export class SyntheticsCITest {
/**
* For browser test, array with the different device IDs used to run the test.
*/
"deviceIds"?: Array<SyntheticsDeviceID>;
"deviceIds"?: Array<string>;
/**
* For API HTTP test, whether or not the test should follow redirects.
*/
Expand Down Expand Up @@ -109,7 +108,7 @@ export class SyntheticsCITest {
},
deviceIds: {
baseName: "deviceIds",
type: "Array<SyntheticsDeviceID>",
type: "Array<string>",
},
followRedirects: {
baseName: "followRedirects",
Expand Down
5 changes: 2 additions & 3 deletions packages/datadog-api-client-v1/models/SyntheticsDevice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* This product includes software developed at Datadog (https://www.datadoghq.com/).
* Copyright 2020-Present Datadog, Inc.
*/
import { SyntheticsDeviceID } from "./SyntheticsDeviceID";

import { AttributeTypeMap } from "../../datadog-api-client-common/util";

Expand All @@ -18,7 +17,7 @@ export class SyntheticsDevice {
/**
* The device ID.
*/
"id": SyntheticsDeviceID;
"id": string;
/**
* Whether or not the device is a mobile.
*/
Expand Down Expand Up @@ -56,7 +55,7 @@ export class SyntheticsDevice {
},
id: {
baseName: "id",
type: "SyntheticsDeviceID",
type: "string",
required: true,
},
isMobile: {
Expand Down
38 changes: 0 additions & 38 deletions packages/datadog-api-client-v1/models/SyntheticsDeviceID.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* Copyright 2020-Present Datadog, Inc.
*/
import { SyntheticsBrowserTestRumSettings } from "./SyntheticsBrowserTestRumSettings";
import { SyntheticsDeviceID } from "./SyntheticsDeviceID";
import { SyntheticsTestCiOptions } from "./SyntheticsTestCiOptions";
import { SyntheticsTestOptionsHTTPVersion } from "./SyntheticsTestOptionsHTTPVersion";
import { SyntheticsTestOptionsMonitorOptions } from "./SyntheticsTestOptionsMonitorOptions";
Expand Down Expand Up @@ -37,7 +36,7 @@ export class SyntheticsTestOptions {
/**
* For browser test, array with the different device IDs used to run the test.
*/
"deviceIds"?: Array<SyntheticsDeviceID>;
"deviceIds"?: Array<string>;
/**
* Whether or not to disable CORS mechanism.
*/
Expand Down Expand Up @@ -161,7 +160,7 @@ export class SyntheticsTestOptions {
},
deviceIds: {
baseName: "device_ids",
type: "Array<SyntheticsDeviceID>",
type: "Array<string>",
},
disableCors: {
baseName: "disableCors",
Expand Down
Loading
Loading