Skip to content

Add synthetics stepDetail.allowFailure and stepDetail.failure #2217

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-10-21 20:59:45.721712",
"spec_repo_commit": "9ac9609b"
"regenerated": "2024-10-23 10:08:15.499912",
"spec_repo_commit": "df3187ca"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-10-21 20:59:45.738901",
"spec_repo_commit": "9ac9609b"
"regenerated": "2024-10-23 10:08:15.519291",
"spec_repo_commit": "df3187ca"
}
}
}
5 changes: 5 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16168,6 +16168,9 @@ components:
SyntheticsStepDetail:
description: Object describing a step for a Synthetic test.
properties:
allowFailure:
description: Whether or not the step was allowed to fail.
type: boolean
browserErrors:
description: Array of errors collected for a browser test.
items:
Expand All @@ -16185,6 +16188,8 @@ components:
error:
description: Error returned by the test.
type: string
failure:
$ref: '#/components/schemas/SyntheticsBrowserTestResultFailure'
playingTab:
$ref: '#/components/schemas/SyntheticsPlayingTab'
screenshotBucketKey:
Expand Down
20 changes: 20 additions & 0 deletions src/datadog_api_client/v1/model/synthetics_step_detail.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
if TYPE_CHECKING:
from datadog_api_client.v1.model.synthetics_browser_error import SyntheticsBrowserError
from datadog_api_client.v1.model.synthetics_check_type import SyntheticsCheckType
from datadog_api_client.v1.model.synthetics_browser_test_result_failure import SyntheticsBrowserTestResultFailure
from datadog_api_client.v1.model.synthetics_playing_tab import SyntheticsPlayingTab
from datadog_api_client.v1.model.synthetics_step_type import SyntheticsStepType
from datadog_api_client.v1.model.synthetics_core_web_vitals import SyntheticsCoreWebVitals
Expand All @@ -31,17 +32,22 @@ class SyntheticsStepDetail(ModelNormal):
def openapi_types(_):
from datadog_api_client.v1.model.synthetics_browser_error import SyntheticsBrowserError
from datadog_api_client.v1.model.synthetics_check_type import SyntheticsCheckType
from datadog_api_client.v1.model.synthetics_browser_test_result_failure import (
SyntheticsBrowserTestResultFailure,
)
from datadog_api_client.v1.model.synthetics_playing_tab import SyntheticsPlayingTab
from datadog_api_client.v1.model.synthetics_step_type import SyntheticsStepType
from datadog_api_client.v1.model.synthetics_core_web_vitals import SyntheticsCoreWebVitals
from datadog_api_client.v1.model.synthetics_step_detail_warning import SyntheticsStepDetailWarning

return {
"allow_failure": (bool,),
"browser_errors": ([SyntheticsBrowserError],),
"check_type": (SyntheticsCheckType,),
"description": (str,),
"duration": (float,),
"error": (str,),
"failure": (SyntheticsBrowserTestResultFailure,),
"playing_tab": (SyntheticsPlayingTab,),
"screenshot_bucket_key": (bool,),
"skipped": (bool,),
Expand All @@ -68,11 +74,13 @@ def openapi_types(_):
}

attribute_map = {
"allow_failure": "allowFailure",
"browser_errors": "browserErrors",
"check_type": "checkType",
"description": "description",
"duration": "duration",
"error": "error",
"failure": "failure",
"playing_tab": "playingTab",
"screenshot_bucket_key": "screenshotBucketKey",
"skipped": "skipped",
Expand All @@ -89,11 +97,13 @@ def openapi_types(_):

def __init__(
self_,
allow_failure: Union[bool, UnsetType] = unset,
browser_errors: Union[List[SyntheticsBrowserError], UnsetType] = unset,
check_type: Union[SyntheticsCheckType, UnsetType] = unset,
description: Union[str, UnsetType] = unset,
duration: Union[float, UnsetType] = unset,
error: Union[str, UnsetType] = unset,
failure: Union[SyntheticsBrowserTestResultFailure, UnsetType] = unset,
playing_tab: Union[SyntheticsPlayingTab, UnsetType] = unset,
screenshot_bucket_key: Union[bool, UnsetType] = unset,
skipped: Union[bool, UnsetType] = unset,
Expand All @@ -111,6 +121,9 @@ def __init__(
"""
Object describing a step for a Synthetic test.

:param allow_failure: Whether or not the step was allowed to fail.
:type allow_failure: bool, optional

:param browser_errors: Array of errors collected for a browser test.
:type browser_errors: [SyntheticsBrowserError], optional

Expand All @@ -126,6 +139,9 @@ def __init__(
:param error: Error returned by the test.
:type error: str, optional

:param failure: The browser test failure details.
:type failure: SyntheticsBrowserTestResultFailure, optional

:param playing_tab: Navigate between different tabs for your browser test.
:type playing_tab: SyntheticsPlayingTab, optional

Expand Down Expand Up @@ -163,6 +179,8 @@ def __init__(
:param warnings: Warning collected that didn't failed the step.
:type warnings: [SyntheticsStepDetailWarning], optional
"""
if allow_failure is not unset:
kwargs["allow_failure"] = allow_failure
if browser_errors is not unset:
kwargs["browser_errors"] = browser_errors
if check_type is not unset:
Expand All @@ -173,6 +191,8 @@ def __init__(
kwargs["duration"] = duration
if error is not unset:
kwargs["error"] = error
if failure is not unset:
kwargs["failure"] = failure
if playing_tab is not unset:
kwargs["playing_tab"] = playing_tab
if screenshot_bucket_key is not unset:
Expand Down
Loading