diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index afb32a4a89..53c190f674 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -3448,9 +3448,10 @@ components: $ref: '#/components/schemas/WidgetCustomLink' type: array requests: - description: 'Array of one request object to display in the widget. The - request must contain a `group-by` tag whose value is a country ISO code. - + description: 'Array of request objects to display in the widget. May include + an optional request for the region layer and/or an optional request for + the points layer. Region layer requests must contain a `group-by` tag + whose value is a country ISO code. See the [Request JSON schema documentation](https://docs.datadoghq.com/dashboards/graphing_json/request_json) @@ -3461,7 +3462,7 @@ components: query: {} items: $ref: '#/components/schemas/GeomapWidgetRequest' - maxItems: 1 + maxItems: 2 minItems: 1 type: array style: @@ -3519,8 +3520,9 @@ components: focus: WORLD properties: focus: - description: The 2-letter ISO code of a country to focus the map on. Or - `WORLD`. + description: The 2-letter ISO code of a country to focus the map on, or + `WORLD` for global view, or a region (`EMEA`, `APAC`, `LATAM`), or a continent + (`NORTH_AMERICA`, `SOUTH_AMERICA`, `EUROPE`, `AFRICA`, `ASIA`, `OCEANIA`). example: WORLD type: string required: @@ -3539,6 +3541,12 @@ components: items: $ref: '#/components/schemas/ListStreamColumn' type: array + conditional_formats: + description: Threshold (numeric) conditional formatting rules may be used + by a regions layer. + items: + $ref: '#/components/schemas/WidgetConditionalFormat' + type: array formulas: description: List of formulas that operate on queries. items: @@ -3564,6 +3572,23 @@ components: $ref: '#/components/schemas/LogQueryDefinition' sort: $ref: '#/components/schemas/WidgetSortBy' + style: + $ref: '#/components/schemas/GeomapWidgetRequestStyle' + text_formats: + description: Text formatting rules may be used by a points layer. + items: + $ref: '#/components/schemas/TableWidgetTextFormatRule' + type: array + type: object + GeomapWidgetRequestStyle: + description: The style to apply to the request for points layer. + example: + color_by: status + properties: + color_by: + description: The category to color the points by. + example: status + type: string type: object GraphSnapshot: description: Object representing a graph snapshot. diff --git a/docs/datadog_api_client.v1.model.rst b/docs/datadog_api_client.v1.model.rst index 6af64f9fa9..60a000a874 100644 --- a/docs/datadog_api_client.v1.model.rst +++ b/docs/datadog_api_client.v1.model.rst @@ -1096,6 +1096,13 @@ datadog\_api\_client.v1.model.geomap\_widget\_request module :members: :show-inheritance: +datadog\_api\_client.v1.model.geomap\_widget\_request\_style module +------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v1.model.geomap_widget_request_style + :members: + :show-inheritance: + datadog\_api\_client.v1.model.graph\_snapshot module ---------------------------------------------------- diff --git a/examples/v1/dashboards/CreateDashboard_9836563.py b/examples/v1/dashboards/CreateDashboard_9836563.py new file mode 100644 index 0000000000..9ee3073b2e --- /dev/null +++ b/examples/v1/dashboards/CreateDashboard_9836563.py @@ -0,0 +1,165 @@ +""" +Create a geomap widget with conditional formats and text formats +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v1.api.dashboards_api import DashboardsApi +from datadog_api_client.v1.model.dashboard import Dashboard +from datadog_api_client.v1.model.dashboard_layout_type import DashboardLayoutType +from datadog_api_client.v1.model.dashboard_reflow_type import DashboardReflowType +from datadog_api_client.v1.model.formula_and_function_event_aggregation import FormulaAndFunctionEventAggregation +from datadog_api_client.v1.model.formula_and_function_event_query_definition import ( + FormulaAndFunctionEventQueryDefinition, +) +from datadog_api_client.v1.model.formula_and_function_event_query_definition_compute import ( + FormulaAndFunctionEventQueryDefinitionCompute, +) +from datadog_api_client.v1.model.formula_and_function_event_query_definition_search import ( + FormulaAndFunctionEventQueryDefinitionSearch, +) +from datadog_api_client.v1.model.formula_and_function_events_data_source import FormulaAndFunctionEventsDataSource +from datadog_api_client.v1.model.formula_and_function_response_format import FormulaAndFunctionResponseFormat +from datadog_api_client.v1.model.formula_type import FormulaType +from datadog_api_client.v1.model.geomap_widget_definition import GeomapWidgetDefinition +from datadog_api_client.v1.model.geomap_widget_definition_style import GeomapWidgetDefinitionStyle +from datadog_api_client.v1.model.geomap_widget_definition_type import GeomapWidgetDefinitionType +from datadog_api_client.v1.model.geomap_widget_definition_view import GeomapWidgetDefinitionView +from datadog_api_client.v1.model.geomap_widget_request import GeomapWidgetRequest +from datadog_api_client.v1.model.geomap_widget_request_style import GeomapWidgetRequestStyle +from datadog_api_client.v1.model.list_stream_column import ListStreamColumn +from datadog_api_client.v1.model.list_stream_column_width import ListStreamColumnWidth +from datadog_api_client.v1.model.list_stream_query import ListStreamQuery +from datadog_api_client.v1.model.list_stream_source import ListStreamSource +from datadog_api_client.v1.model.table_widget_text_format_match import TableWidgetTextFormatMatch +from datadog_api_client.v1.model.table_widget_text_format_match_type import TableWidgetTextFormatMatchType +from datadog_api_client.v1.model.table_widget_text_format_palette import TableWidgetTextFormatPalette +from datadog_api_client.v1.model.table_widget_text_format_rule import TableWidgetTextFormatRule +from datadog_api_client.v1.model.widget import Widget +from datadog_api_client.v1.model.widget_comparator import WidgetComparator +from datadog_api_client.v1.model.widget_conditional_format import WidgetConditionalFormat +from datadog_api_client.v1.model.widget_formula import WidgetFormula +from datadog_api_client.v1.model.widget_formula_sort import WidgetFormulaSort +from datadog_api_client.v1.model.widget_layout import WidgetLayout +from datadog_api_client.v1.model.widget_palette import WidgetPalette +from datadog_api_client.v1.model.widget_sort import WidgetSort +from datadog_api_client.v1.model.widget_sort_by import WidgetSortBy + +body = Dashboard( + title="Example-Dashboard", + description="Example-Dashboard", + widgets=[ + Widget( + definition=GeomapWidgetDefinition( + title="Log Count by Service and Source", + type=GeomapWidgetDefinitionType.GEOMAP, + requests=[ + GeomapWidgetRequest( + response_format=FormulaAndFunctionResponseFormat.SCALAR, + queries=[ + FormulaAndFunctionEventQueryDefinition( + data_source=FormulaAndFunctionEventsDataSource.RUM, + name="query1", + search=FormulaAndFunctionEventQueryDefinitionSearch( + query="@type:session", + ), + indexes=[ + "*", + ], + compute=FormulaAndFunctionEventQueryDefinitionCompute( + aggregation=FormulaAndFunctionEventAggregation.COUNT, + ), + group_by=[], + ), + ], + conditional_formats=[ + WidgetConditionalFormat( + comparator=WidgetComparator.GREATER_THAN, + value=1000.0, + palette=WidgetPalette.WHITE_ON_GREEN, + ), + ], + formulas=[ + WidgetFormula( + formula="query1", + ), + ], + sort=WidgetSortBy( + count=250, + order_by=[ + WidgetFormulaSort( + type=FormulaType.FORMULA, + index=0, + order=WidgetSort.DESCENDING, + ), + ], + ), + ), + GeomapWidgetRequest( + response_format=FormulaAndFunctionResponseFormat.EVENT_LIST, + query=ListStreamQuery( + data_source=ListStreamSource.LOGS_STREAM, + query_string="", + indexes=[], + storage="hot", + ), + columns=[ + ListStreamColumn( + field="@network.client.geoip.location.latitude", + width=ListStreamColumnWidth.AUTO, + ), + ListStreamColumn( + field="@network.client.geoip.location.longitude", + width=ListStreamColumnWidth.AUTO, + ), + ListStreamColumn( + field="@network.client.geoip.country.iso_code", + width=ListStreamColumnWidth.AUTO, + ), + ListStreamColumn( + field="@network.client.geoip.subdivision.name", + width=ListStreamColumnWidth.AUTO, + ), + ], + style=GeomapWidgetRequestStyle( + color_by="status", + ), + text_formats=[ + TableWidgetTextFormatRule( + match=TableWidgetTextFormatMatch( + type=TableWidgetTextFormatMatchType.IS, + value="error", + ), + palette=TableWidgetTextFormatPalette.WHITE_ON_RED, + ), + ], + ), + ], + style=GeomapWidgetDefinitionStyle( + palette="hostmap_blues", + palette_flip=False, + ), + view=GeomapWidgetDefinitionView( + focus="NORTH_AMERICA", + ), + ), + layout=WidgetLayout( + x=0, + y=0, + width=12, + height=6, + ), + ), + ], + template_variables=[], + layout_type=DashboardLayoutType.ORDERED, + notify_list=[], + reflow_type=DashboardReflowType.FIXED, + tags=[], +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = DashboardsApi(api_client) + response = api_instance.create_dashboard(body=body) + + print(response) diff --git a/src/datadog_api_client/v1/model/geomap_widget_definition.py b/src/datadog_api_client/v1/model/geomap_widget_definition.py index 477308e98f..1395f0b523 100644 --- a/src/datadog_api_client/v1/model/geomap_widget_definition.py +++ b/src/datadog_api_client/v1/model/geomap_widget_definition.py @@ -29,7 +29,7 @@ class GeomapWidgetDefinition(ModelNormal): validations = { "requests": { - "max_items": 1, + "max_items": 2, "min_items": 1, }, } @@ -87,8 +87,7 @@ def __init__( :param custom_links: A list of custom links. :type custom_links: [WidgetCustomLink], optional - :param requests: Array of one request object to display in the widget. The request must contain a ``group-by`` tag whose value is a country ISO code. - + :param requests: Array of request objects to display in the widget. May include an optional request for the region layer and/or an optional request for the points layer. Region layer requests must contain a ``group-by`` tag whose value is a country ISO code. See the `Request JSON schema documentation `_ for information about building the ``REQUEST_SCHEMA``. :type requests: [GeomapWidgetRequest] diff --git a/src/datadog_api_client/v1/model/geomap_widget_definition_view.py b/src/datadog_api_client/v1/model/geomap_widget_definition_view.py index da0d9b6936..1695d65374 100644 --- a/src/datadog_api_client/v1/model/geomap_widget_definition_view.py +++ b/src/datadog_api_client/v1/model/geomap_widget_definition_view.py @@ -25,7 +25,7 @@ def __init__(self_, focus: str, **kwargs): """ The view of the world that the map should render. - :param focus: The 2-letter ISO code of a country to focus the map on. Or ``WORLD``. + :param focus: The 2-letter ISO code of a country to focus the map on, or ``WORLD`` for global view, or a region ( ``EMEA`` , ``APAC`` , ``LATAM`` ), or a continent ( ``NORTH_AMERICA`` , ``SOUTH_AMERICA`` , ``EUROPE`` , ``AFRICA`` , ``ASIA`` , ``OCEANIA`` ). :type focus: str """ super().__init__(kwargs) diff --git a/src/datadog_api_client/v1/model/geomap_widget_request.py b/src/datadog_api_client/v1/model/geomap_widget_request.py index f4f0b51386..2499d4f625 100644 --- a/src/datadog_api_client/v1/model/geomap_widget_request.py +++ b/src/datadog_api_client/v1/model/geomap_widget_request.py @@ -15,12 +15,15 @@ if TYPE_CHECKING: from datadog_api_client.v1.model.list_stream_column import ListStreamColumn + from datadog_api_client.v1.model.widget_conditional_format import WidgetConditionalFormat from datadog_api_client.v1.model.widget_formula import WidgetFormula from datadog_api_client.v1.model.log_query_definition import LogQueryDefinition from datadog_api_client.v1.model.formula_and_function_query_definition import FormulaAndFunctionQueryDefinition from datadog_api_client.v1.model.list_stream_query import ListStreamQuery from datadog_api_client.v1.model.formula_and_function_response_format import FormulaAndFunctionResponseFormat from datadog_api_client.v1.model.widget_sort_by import WidgetSortBy + from datadog_api_client.v1.model.geomap_widget_request_style import GeomapWidgetRequestStyle + from datadog_api_client.v1.model.table_widget_text_format_rule import TableWidgetTextFormatRule from datadog_api_client.v1.model.formula_and_function_metric_query_definition import ( FormulaAndFunctionMetricQueryDefinition, ) @@ -48,15 +51,19 @@ class GeomapWidgetRequest(ModelNormal): @cached_property def openapi_types(_): from datadog_api_client.v1.model.list_stream_column import ListStreamColumn + from datadog_api_client.v1.model.widget_conditional_format import WidgetConditionalFormat from datadog_api_client.v1.model.widget_formula import WidgetFormula from datadog_api_client.v1.model.log_query_definition import LogQueryDefinition from datadog_api_client.v1.model.formula_and_function_query_definition import FormulaAndFunctionQueryDefinition from datadog_api_client.v1.model.list_stream_query import ListStreamQuery from datadog_api_client.v1.model.formula_and_function_response_format import FormulaAndFunctionResponseFormat from datadog_api_client.v1.model.widget_sort_by import WidgetSortBy + from datadog_api_client.v1.model.geomap_widget_request_style import GeomapWidgetRequestStyle + from datadog_api_client.v1.model.table_widget_text_format_rule import TableWidgetTextFormatRule return { "columns": ([ListStreamColumn],), + "conditional_formats": ([WidgetConditionalFormat],), "formulas": ([WidgetFormula],), "log_query": (LogQueryDefinition,), "q": (str,), @@ -66,10 +73,13 @@ def openapi_types(_): "rum_query": (LogQueryDefinition,), "security_query": (LogQueryDefinition,), "sort": (WidgetSortBy,), + "style": (GeomapWidgetRequestStyle,), + "text_formats": ([TableWidgetTextFormatRule],), } attribute_map = { "columns": "columns", + "conditional_formats": "conditional_formats", "formulas": "formulas", "log_query": "log_query", "q": "q", @@ -79,11 +89,14 @@ def openapi_types(_): "rum_query": "rum_query", "security_query": "security_query", "sort": "sort", + "style": "style", + "text_formats": "text_formats", } def __init__( self_, columns: Union[List[ListStreamColumn], UnsetType] = unset, + conditional_formats: Union[List[WidgetConditionalFormat], UnsetType] = unset, formulas: Union[List[WidgetFormula], UnsetType] = unset, log_query: Union[LogQueryDefinition, UnsetType] = unset, q: Union[str, UnsetType] = unset, @@ -107,6 +120,8 @@ def __init__( rum_query: Union[LogQueryDefinition, UnsetType] = unset, security_query: Union[LogQueryDefinition, UnsetType] = unset, sort: Union[WidgetSortBy, UnsetType] = unset, + style: Union[GeomapWidgetRequestStyle, UnsetType] = unset, + text_formats: Union[List[TableWidgetTextFormatRule], UnsetType] = unset, **kwargs, ): """ @@ -115,6 +130,9 @@ def __init__( :param columns: Widget columns. :type columns: [ListStreamColumn], optional + :param conditional_formats: Threshold (numeric) conditional formatting rules may be used by a regions layer. + :type conditional_formats: [WidgetConditionalFormat], optional + :param formulas: List of formulas that operate on queries. :type formulas: [WidgetFormula], optional @@ -141,9 +159,17 @@ def __init__( :param sort: The controls for sorting the widget. :type sort: WidgetSortBy, optional + + :param style: The style to apply to the request for points layer. + :type style: GeomapWidgetRequestStyle, optional + + :param text_formats: Text formatting rules may be used by a points layer. + :type text_formats: [TableWidgetTextFormatRule], optional """ if columns is not unset: kwargs["columns"] = columns + if conditional_formats is not unset: + kwargs["conditional_formats"] = conditional_formats if formulas is not unset: kwargs["formulas"] = formulas if log_query is not unset: @@ -162,4 +188,8 @@ def __init__( kwargs["security_query"] = security_query if sort is not unset: kwargs["sort"] = sort + if style is not unset: + kwargs["style"] = style + if text_formats is not unset: + kwargs["text_formats"] = text_formats super().__init__(kwargs) diff --git a/src/datadog_api_client/v1/model/geomap_widget_request_style.py b/src/datadog_api_client/v1/model/geomap_widget_request_style.py new file mode 100644 index 0000000000..5d3587fd65 --- /dev/null +++ b/src/datadog_api_client/v1/model/geomap_widget_request_style.py @@ -0,0 +1,36 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class GeomapWidgetRequestStyle(ModelNormal): + @cached_property + def openapi_types(_): + return { + "color_by": (str,), + } + + attribute_map = { + "color_by": "color_by", + } + + def __init__(self_, color_by: Union[str, UnsetType] = unset, **kwargs): + """ + The style to apply to the request for points layer. + + :param color_by: The category to color the points by. + :type color_by: str, optional + """ + if color_by is not unset: + kwargs["color_by"] = color_by + super().__init__(kwargs) diff --git a/src/datadog_api_client/v1/models/__init__.py b/src/datadog_api_client/v1/models/__init__.py index a0eb1f4f6f..062b19bebe 100644 --- a/src/datadog_api_client/v1/models/__init__.py +++ b/src/datadog_api_client/v1/models/__init__.py @@ -188,6 +188,7 @@ from datadog_api_client.v1.model.geomap_widget_definition_type import GeomapWidgetDefinitionType from datadog_api_client.v1.model.geomap_widget_definition_view import GeomapWidgetDefinitionView from datadog_api_client.v1.model.geomap_widget_request import GeomapWidgetRequest +from datadog_api_client.v1.model.geomap_widget_request_style import GeomapWidgetRequestStyle from datadog_api_client.v1.model.graph_snapshot import GraphSnapshot from datadog_api_client.v1.model.group_type import GroupType from datadog_api_client.v1.model.group_widget_definition import GroupWidgetDefinition @@ -1278,6 +1279,7 @@ "GeomapWidgetDefinitionType", "GeomapWidgetDefinitionView", "GeomapWidgetRequest", + "GeomapWidgetRequestStyle", "GraphSnapshot", "GroupType", "GroupWidgetDefinition", diff --git a/tests/v1/cassettes/test_scenarios/test_create_a_geomap_widget_with_conditional_formats_and_text_formats.frozen b/tests/v1/cassettes/test_scenarios/test_create_a_geomap_widget_with_conditional_formats_and_text_formats.frozen new file mode 100644 index 0000000000..b42d25287e --- /dev/null +++ b/tests/v1/cassettes/test_scenarios/test_create_a_geomap_widget_with_conditional_formats_and_text_formats.frozen @@ -0,0 +1 @@ +2025-12-08T10:46:15.353Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_create_a_geomap_widget_with_conditional_formats_and_text_formats.yaml b/tests/v1/cassettes/test_scenarios/test_create_a_geomap_widget_with_conditional_formats_and_text_formats.yaml new file mode 100644 index 0000000000..7b8ee7899b --- /dev/null +++ b/tests/v1/cassettes/test_scenarios/test_create_a_geomap_widget_with_conditional_formats_and_text_formats.yaml @@ -0,0 +1,39 @@ +interactions: +- request: + body: '{"description":"Test-Create_a_geomap_widget_with_conditional_formats_and_text_formats-1765190775","layout_type":"ordered","notify_list":[],"reflow_type":"fixed","tags":[],"template_variables":[],"title":"Test-Create_a_geomap_widget_with_conditional_formats_and_text_formats-1765190775","widgets":[{"definition":{"requests":[{"conditional_formats":[{"comparator":">","palette":"white_on_green","value":1000}],"formulas":[{"formula":"query1"}],"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","group_by":[],"indexes":["*"],"name":"query1","search":{"query":"@type:session"}}],"response_format":"scalar","sort":{"count":250,"order_by":[{"index":0,"order":"desc","type":"formula"}]}},{"columns":[{"field":"@network.client.geoip.location.latitude","width":"auto"},{"field":"@network.client.geoip.location.longitude","width":"auto"},{"field":"@network.client.geoip.country.iso_code","width":"auto"},{"field":"@network.client.geoip.subdivision.name","width":"auto"}],"query":{"data_source":"logs_stream","indexes":[],"query_string":"","storage":"hot"},"response_format":"event_list","style":{"color_by":"status"},"text_formats":[{"match":{"type":"is","value":"error"},"palette":"white_on_red"}]}],"style":{"palette":"hostmap_blues","palette_flip":false},"title":"Log + Count by Service and Source","type":"geomap","view":{"focus":"NORTH_AMERICA"}},"layout":{"height":6,"width":12,"x":0,"y":0}}]}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v1/dashboard + response: + body: + string: '{"id":"n2i-h6d-x6a","title":"Test-Create_a_geomap_widget_with_conditional_formats_and_text_formats-1765190775","description":"Test-Create_a_geomap_widget_with_conditional_formats_and_text_formats-1765190775","author_handle":"shishi.liu@datadoghq.com","author_name":"Shishi + Liu","layout_type":"ordered","url":"/dashboard/n2i-h6d-x6a/test-createageomapwidgetwithconditionalformatsandtextformats-1765190775","template_variables":[],"widgets":[{"definition":{"requests":[{"conditional_formats":[{"comparator":">","palette":"white_on_green","value":1000}],"formulas":[{"formula":"query1"}],"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","group_by":[],"indexes":["*"],"name":"query1","search":{"query":"@type:session"}}],"response_format":"scalar","sort":{"count":250,"order_by":[{"index":0,"order":"desc","type":"formula"}]}},{"columns":[{"field":"@network.client.geoip.location.latitude","width":"auto"},{"field":"@network.client.geoip.location.longitude","width":"auto"},{"field":"@network.client.geoip.country.iso_code","width":"auto"},{"field":"@network.client.geoip.subdivision.name","width":"auto"}],"query":{"data_source":"logs_stream","indexes":[],"query_string":"","storage":"hot"},"response_format":"event_list","style":{"color_by":"status"},"text_formats":[{"match":{"type":"is","value":"error"},"palette":"white_on_red"}]}],"style":{"palette":"hostmap_blues","palette_flip":false},"title":"Log + Count by Service and Source","type":"geomap","view":{"focus":"NORTH_AMERICA"}},"layout":{"height":6,"width":12,"x":0,"y":0},"id":4916490421180340}],"notify_list":[],"created_at":"2025-12-08T10:46:15.791396+00:00","modified_at":"2025-12-08T10:46:15.791396+00:00","reflow_type":"fixed","tags":[],"restricted_roles":[]}' + headers: + content-type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + accept: + - application/json + method: DELETE + uri: https://api.datadoghq.com/api/v1/dashboard/n2i-h6d-x6a + response: + body: + string: '{"deleted_dashboard_id":"n2i-h6d-x6a"}' + headers: + content-type: + - application/json + status: + code: 200 + message: OK +version: 1 diff --git a/tests/v1/features/dashboards.feature b/tests/v1/features/dashboards.feature index 3eeebebdc2..588c609ced 100644 --- a/tests/v1/features/dashboards.feature +++ b/tests/v1/features/dashboards.feature @@ -72,6 +72,22 @@ Feature: Dashboards And the response "widgets[0].definition.requests[0].response_format" is equal to "event_list" And the response "widgets[0].definition.requests[0].query.data_source" is equal to "logs_stream" + @team:DataDog/dashboards-backend + Scenario: Create a geomap widget with conditional formats and text formats + Given new "CreateDashboard" request + And body with value {"title": "{{ unique }}","description": "{{ unique }}","widgets":[{"definition":{"title":"Log Count by Service and Source","type":"geomap","requests":[{"response_format":"scalar","queries":[{"data_source":"rum","name":"query1","search":{"query":"@type:session"},"indexes":["*"],"compute":{"aggregation":"count"},"group_by":[]}],"conditional_formats":[{"comparator":">","value":1000,"palette":"white_on_green"}],"formulas":[{"formula":"query1"}],"sort":{"count":250,"order_by":[{"type":"formula","index":0,"order":"desc"}]}},{"response_format":"event_list","query":{"data_source":"logs_stream","query_string":"","indexes":[],"storage":"hot"},"columns":[{"field":"@network.client.geoip.location.latitude","width":"auto"},{"field":"@network.client.geoip.location.longitude","width":"auto"},{"field":"@network.client.geoip.country.iso_code","width":"auto"},{"field":"@network.client.geoip.subdivision.name","width":"auto"}],"style":{"color_by":"status"},"text_formats":[{"match":{"type":"is","value":"error"},"palette":"white_on_red"}]}],"style":{"palette":"hostmap_blues","palette_flip":false},"view":{"focus":"NORTH_AMERICA"}},"layout":{"x":0,"y":0,"width":12,"height":6}}],"template_variables":[],"layout_type":"ordered","notify_list":[],"reflow_type":"fixed","tags":[]} + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "geomap" + And the response "widgets[0].definition.title" is equal to "Log Count by Service and Source" + And the response "widgets[0].definition.requests[0].conditional_formats[0].comparator" is equal to ">" + And the response "widgets[0].definition.requests[0].conditional_formats[0].palette" is equal to "white_on_green" + And the response "widgets[0].definition.requests[0].conditional_formats[0].value" is equal to 1000 + And the response "widgets[0].definition.requests[1].text_formats[0].match.type" is equal to "is" + And the response "widgets[0].definition.requests[1].text_formats[0].match.value" is equal to "error" + And the response "widgets[0].definition.requests[1].text_formats[0].palette" is equal to "white_on_red" + And the response "widgets[0].definition.view.focus" is equal to "NORTH_AMERICA" + @generated @skip @team:DataDog/dashboards-backend Scenario: Create a new dashboard returns "Bad Request" response Given new "CreateDashboard" request diff --git a/tests/v2/cassettes/test_scenarios/test_create_deployment_rule_returns_bad_request_response.frozen b/tests/v2/cassettes/test_scenarios/test_create_deployment_rule_returns_bad_request_response.frozen index 818d31b6df..f2f83420d7 100644 --- a/tests/v2/cassettes/test_scenarios/test_create_deployment_rule_returns_bad_request_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_create_deployment_rule_returns_bad_request_response.frozen @@ -1 +1 @@ -2025-12-02T17:11:57.622Z \ No newline at end of file +2025-12-10T09:23:49.955Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_create_deployment_rule_returns_bad_request_response.yaml b/tests/v2/cassettes/test_scenarios/test_create_deployment_rule_returns_bad_request_response.yaml index 3c8794009b..70f87d86b1 100644 --- a/tests/v2/cassettes/test_scenarios/test_create_deployment_rule_returns_bad_request_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_create_deployment_rule_returns_bad_request_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate","service":"my-service"},"type":"deployment_gate"}}' + body: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate-testcreatedeploymentrulereturnsbadrequestresponse1765358629","service":"my-service"},"type":"deployment_gate"}}' headers: accept: - application/json @@ -10,8 +10,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/deployment_gates response: body: - string: '{"data":{"id":"daadd697-95f4-4608-b6cc-8e6337d692ab","type":"deployment_gate","attributes":{"created_at":"2025-12-02T17:11:58.225449Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate","service":"my-service","updated_at":"2025-12-02T17:11:58.225449Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"39b27cfd-44c1-4ec0-900b-3b46ca2ab8c1","type":"deployment_gate","attributes":{"created_at":"2025-12-10T09:23:50.404151Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate-testcreatedeploymentrulereturnsbadrequestresponse1765358629","service":"my-service","updated_at":"2025-12-10T09:23:50.404151Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: content-type: @@ -27,7 +27,7 @@ interactions: content-type: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/deployment_gates/daadd697-95f4-4608-b6cc-8e6337d692ab/rules + uri: https://api.datadoghq.com/api/v2/deployment_gates/39b27cfd-44c1-4ec0-900b-3b46ca2ab8c1/rules response: body: string: '{"errors":[{"status":"400","title":"Bad Request","detail":"attribute @@ -44,7 +44,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/deployment_gates/daadd697-95f4-4608-b6cc-8e6337d692ab + uri: https://api.datadoghq.com/api/v2/deployment_gates/39b27cfd-44c1-4ec0-900b-3b46ca2ab8c1 response: body: string: '' diff --git a/tests/v2/cassettes/test_scenarios/test_create_deployment_rule_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_create_deployment_rule_returns_ok_response.frozen index f7669bb4b6..63e0f66692 100644 --- a/tests/v2/cassettes/test_scenarios/test_create_deployment_rule_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_create_deployment_rule_returns_ok_response.frozen @@ -1 +1 @@ -2025-12-02T17:11:58.561Z \ No newline at end of file +2025-12-10T09:23:50.780Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_create_deployment_rule_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_create_deployment_rule_returns_ok_response.yaml index fe8c474aee..5b4e8f9fd6 100644 --- a/tests/v2/cassettes/test_scenarios/test_create_deployment_rule_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_create_deployment_rule_returns_ok_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate","service":"my-service"},"type":"deployment_gate"}}' + body: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate-testcreatedeploymentrulereturnsokresponse1765358630","service":"my-service"},"type":"deployment_gate"}}' headers: accept: - application/json @@ -10,8 +10,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/deployment_gates response: body: - string: '{"data":{"id":"b998ebca-01ad-4db8-96e6-a2beb54f497a","type":"deployment_gate","attributes":{"created_at":"2025-12-02T17:11:58.67035Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate","service":"my-service","updated_at":"2025-12-02T17:11:58.67035Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"24d967fe-1dec-4957-bf77-7eda18a65d47","type":"deployment_gate","attributes":{"created_at":"2025-12-10T09:23:50.813397Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate-testcreatedeploymentrulereturnsokresponse1765358630","service":"my-service","updated_at":"2025-12-10T09:23:50.813397Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: content-type: @@ -27,12 +27,12 @@ interactions: content-type: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/deployment_gates/b998ebca-01ad-4db8-96e6-a2beb54f497a/rules + uri: https://api.datadoghq.com/api/v2/deployment_gates/24d967fe-1dec-4957-bf77-7eda18a65d47/rules response: body: - string: '{"data":{"id":"3feb569f-bb55-47cb-990f-7bc0c4c076f4","type":"deployment_rule","attributes":{"created_at":"2025-12-02T17:11:58.877828Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"gate_id":"b998ebca-01ad-4db8-96e6-a2beb54f497a","name":"My - deployment rule","options":{},"type":"faulty_deployment_detection","updated_at":"2025-12-02T17:11:58.877828Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"ebe85a93-a82d-49ec-8925-6d3d569012bb","type":"deployment_rule","attributes":{"created_at":"2025-12-10T09:23:50.871951Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"gate_id":"24d967fe-1dec-4957-bf77-7eda18a65d47","name":"My + deployment rule","options":{},"type":"faulty_deployment_detection","updated_at":"2025-12-10T09:23:50.871951Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: content-type: @@ -46,7 +46,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/deployment_gates/b998ebca-01ad-4db8-96e6-a2beb54f497a/rules/3feb569f-bb55-47cb-990f-7bc0c4c076f4 + uri: https://api.datadoghq.com/api/v2/deployment_gates/24d967fe-1dec-4957-bf77-7eda18a65d47/rules/ebe85a93-a82d-49ec-8925-6d3d569012bb response: body: string: '' @@ -60,7 +60,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/deployment_gates/b998ebca-01ad-4db8-96e6-a2beb54f497a + uri: https://api.datadoghq.com/api/v2/deployment_gates/24d967fe-1dec-4957-bf77-7eda18a65d47 response: body: string: '' diff --git a/tests/v2/cassettes/test_scenarios/test_delete_deployment_gate_returns_no_content_response.frozen b/tests/v2/cassettes/test_scenarios/test_delete_deployment_gate_returns_no_content_response.frozen index 6727b321fa..10aea5fda0 100644 --- a/tests/v2/cassettes/test_scenarios/test_delete_deployment_gate_returns_no_content_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_delete_deployment_gate_returns_no_content_response.frozen @@ -1 +1 @@ -2025-12-02T17:11:59.228Z \ No newline at end of file +2025-12-10T09:23:51.011Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_delete_deployment_gate_returns_no_content_response.yaml b/tests/v2/cassettes/test_scenarios/test_delete_deployment_gate_returns_no_content_response.yaml index 2b8d5b7d90..607073ac33 100644 --- a/tests/v2/cassettes/test_scenarios/test_delete_deployment_gate_returns_no_content_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_delete_deployment_gate_returns_no_content_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate","service":"my-service"},"type":"deployment_gate"}}' + body: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate-testdeletedeploymentgatereturnsnocontentresponse1765358631","service":"my-service"},"type":"deployment_gate"}}' headers: accept: - application/json @@ -10,8 +10,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/deployment_gates response: body: - string: '{"data":{"id":"0d6b54a5-70ad-4e9a-9ee4-f7d99f25a3d5","type":"deployment_gate","attributes":{"created_at":"2025-12-02T17:11:59.349857Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate","service":"my-service","updated_at":"2025-12-02T17:11:59.349857Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"03a2ecd3-87ad-45aa-9dbb-fda1215a4087","type":"deployment_gate","attributes":{"created_at":"2025-12-10T09:23:51.052668Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate-testdeletedeploymentgatereturnsnocontentresponse1765358631","service":"my-service","updated_at":"2025-12-10T09:23:51.052668Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: content-type: @@ -25,7 +25,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/deployment_gates/0d6b54a5-70ad-4e9a-9ee4-f7d99f25a3d5 + uri: https://api.datadoghq.com/api/v2/deployment_gates/03a2ecd3-87ad-45aa-9dbb-fda1215a4087 response: body: string: '' @@ -39,7 +39,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/deployment_gates/0d6b54a5-70ad-4e9a-9ee4-f7d99f25a3d5 + uri: https://api.datadoghq.com/api/v2/deployment_gates/03a2ecd3-87ad-45aa-9dbb-fda1215a4087 response: body: string: '{"errors":[{"status":"404","title":"Not Found","detail":"Gate does diff --git a/tests/v2/cassettes/test_scenarios/test_delete_deployment_rule_returns_no_content_response.frozen b/tests/v2/cassettes/test_scenarios/test_delete_deployment_rule_returns_no_content_response.frozen index 5d67a9ba4b..63b9423dd7 100644 --- a/tests/v2/cassettes/test_scenarios/test_delete_deployment_rule_returns_no_content_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_delete_deployment_rule_returns_no_content_response.frozen @@ -1 +1 @@ -2025-12-02T17:11:59.690Z \ No newline at end of file +2025-12-10T09:23:51.205Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_delete_deployment_rule_returns_no_content_response.yaml b/tests/v2/cassettes/test_scenarios/test_delete_deployment_rule_returns_no_content_response.yaml index 75e5d8d689..a99c9d7679 100644 --- a/tests/v2/cassettes/test_scenarios/test_delete_deployment_rule_returns_no_content_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_delete_deployment_rule_returns_no_content_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate","service":"my-service"},"type":"deployment_gate"}}' + body: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate-testdeletedeploymentrulereturnsnocontentresponse1765358631","service":"my-service"},"type":"deployment_gate"}}' headers: accept: - application/json @@ -10,8 +10,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/deployment_gates response: body: - string: '{"data":{"id":"051490b0-1383-4dd4-b719-fb17ab089898","type":"deployment_gate","attributes":{"created_at":"2025-12-02T17:11:59.799293Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate","service":"my-service","updated_at":"2025-12-02T17:11:59.799293Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"b30401bf-4220-4d42-82ef-68d1a7916f21","type":"deployment_gate","attributes":{"created_at":"2025-12-10T09:23:51.250082Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate-testdeletedeploymentrulereturnsnocontentresponse1765358631","service":"my-service","updated_at":"2025-12-10T09:23:51.250082Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: content-type: @@ -27,12 +27,12 @@ interactions: content-type: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/deployment_gates/051490b0-1383-4dd4-b719-fb17ab089898/rules + uri: https://api.datadoghq.com/api/v2/deployment_gates/b30401bf-4220-4d42-82ef-68d1a7916f21/rules response: body: - string: '{"data":{"id":"29fb1e0d-d3f4-4f3a-a4de-1bd65cf57c16","type":"deployment_rule","attributes":{"created_at":"2025-12-02T17:11:59.98839Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"gate_id":"051490b0-1383-4dd4-b719-fb17ab089898","name":"My - deployment rule","options":{},"type":"faulty_deployment_detection","updated_at":"2025-12-02T17:11:59.98839Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"3e9bb31e-27be-43d0-9ef8-571a7f221f59","type":"deployment_rule","attributes":{"created_at":"2025-12-10T09:23:51.336139Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"gate_id":"b30401bf-4220-4d42-82ef-68d1a7916f21","name":"My + deployment rule","options":{},"type":"faulty_deployment_detection","updated_at":"2025-12-10T09:23:51.336139Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: content-type: @@ -46,7 +46,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/deployment_gates/051490b0-1383-4dd4-b719-fb17ab089898/rules/29fb1e0d-d3f4-4f3a-a4de-1bd65cf57c16 + uri: https://api.datadoghq.com/api/v2/deployment_gates/b30401bf-4220-4d42-82ef-68d1a7916f21/rules/3e9bb31e-27be-43d0-9ef8-571a7f221f59 response: body: string: '' @@ -60,7 +60,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/deployment_gates/051490b0-1383-4dd4-b719-fb17ab089898/rules/29fb1e0d-d3f4-4f3a-a4de-1bd65cf57c16 + uri: https://api.datadoghq.com/api/v2/deployment_gates/b30401bf-4220-4d42-82ef-68d1a7916f21/rules/3e9bb31e-27be-43d0-9ef8-571a7f221f59 response: body: string: '{"errors":[{"status":"404","title":"Not Found","detail":"Rule does @@ -77,7 +77,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/deployment_gates/051490b0-1383-4dd4-b719-fb17ab089898 + uri: https://api.datadoghq.com/api/v2/deployment_gates/b30401bf-4220-4d42-82ef-68d1a7916f21 response: body: string: '' diff --git a/tests/v2/cassettes/test_scenarios/test_get_deployment_gate_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_get_deployment_gate_returns_ok_response.frozen index a00e4ba26a..7171264e85 100644 --- a/tests/v2/cassettes/test_scenarios/test_get_deployment_gate_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_get_deployment_gate_returns_ok_response.frozen @@ -1 +1 @@ -2025-12-02T17:12:00.422Z \ No newline at end of file +2025-12-10T09:23:51.545Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_get_deployment_gate_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_get_deployment_gate_returns_ok_response.yaml index 6ef4b071d1..97f1ab5df2 100644 --- a/tests/v2/cassettes/test_scenarios/test_get_deployment_gate_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_get_deployment_gate_returns_ok_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate","service":"my-service"},"type":"deployment_gate"}}' + body: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate-testgetdeploymentgatereturnsokresponse1765358631","service":"my-service"},"type":"deployment_gate"}}' headers: accept: - application/json @@ -10,8 +10,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/deployment_gates response: body: - string: '{"data":{"id":"a71a41f7-e7b9-4c51-8af0-397c8e99aaf9","type":"deployment_gate","attributes":{"created_at":"2025-12-02T17:12:00.52354Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate","service":"my-service","updated_at":"2025-12-02T17:12:00.52354Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"da8c8c14-6bb2-4fc6-8dac-4027468738e4","type":"deployment_gate","attributes":{"created_at":"2025-12-10T09:23:51.581308Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate-testgetdeploymentgatereturnsokresponse1765358631","service":"my-service","updated_at":"2025-12-10T09:23:51.581308Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: content-type: @@ -25,11 +25,11 @@ interactions: accept: - application/json method: GET - uri: https://api.datadoghq.com/api/v2/deployment_gates/a71a41f7-e7b9-4c51-8af0-397c8e99aaf9 + uri: https://api.datadoghq.com/api/v2/deployment_gates/da8c8c14-6bb2-4fc6-8dac-4027468738e4 response: body: - string: '{"data":{"id":"a71a41f7-e7b9-4c51-8af0-397c8e99aaf9","type":"deployment_gate","attributes":{"created_at":"2025-12-02T17:12:00.52354Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate","service":"my-service","updated_at":"2025-12-02T17:12:00.52354Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"da8c8c14-6bb2-4fc6-8dac-4027468738e4","type":"deployment_gate","attributes":{"created_at":"2025-12-10T09:23:51.581308Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate-testgetdeploymentgatereturnsokresponse1765358631","service":"my-service","updated_at":"2025-12-10T09:23:51.581308Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: content-type: @@ -43,7 +43,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/deployment_gates/a71a41f7-e7b9-4c51-8af0-397c8e99aaf9 + uri: https://api.datadoghq.com/api/v2/deployment_gates/da8c8c14-6bb2-4fc6-8dac-4027468738e4 response: body: string: '' diff --git a/tests/v2/cassettes/test_scenarios/test_get_deployment_rule_returns_bad_request_response.frozen b/tests/v2/cassettes/test_scenarios/test_get_deployment_rule_returns_bad_request_response.frozen index e00dc1eb2f..80aa87053a 100644 --- a/tests/v2/cassettes/test_scenarios/test_get_deployment_rule_returns_bad_request_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_get_deployment_rule_returns_bad_request_response.frozen @@ -1 +1 @@ -2025-12-02T17:12:00.864Z \ No newline at end of file +2025-12-10T09:23:51.725Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_get_deployment_rule_returns_bad_request_response.yaml b/tests/v2/cassettes/test_scenarios/test_get_deployment_rule_returns_bad_request_response.yaml index 5eb5eb65d2..8a378500db 100644 --- a/tests/v2/cassettes/test_scenarios/test_get_deployment_rule_returns_bad_request_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_get_deployment_rule_returns_bad_request_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate","service":"my-service"},"type":"deployment_gate"}}' + body: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate-testgetdeploymentrulereturnsbadrequestresponse1765358631","service":"my-service"},"type":"deployment_gate"}}' headers: accept: - application/json @@ -10,8 +10,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/deployment_gates response: body: - string: '{"data":{"id":"241e9292-911a-4eea-90e0-83b5f27a468c","type":"deployment_gate","attributes":{"created_at":"2025-12-02T17:12:00.969748Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate","service":"my-service","updated_at":"2025-12-02T17:12:00.969748Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"5815296a-7bd8-4a27-86c1-9bb266c19078","type":"deployment_gate","attributes":{"created_at":"2025-12-10T09:23:51.766765Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate-testgetdeploymentrulereturnsbadrequestresponse1765358631","service":"my-service","updated_at":"2025-12-10T09:23:51.766765Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: content-type: @@ -27,12 +27,12 @@ interactions: content-type: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/deployment_gates/241e9292-911a-4eea-90e0-83b5f27a468c/rules + uri: https://api.datadoghq.com/api/v2/deployment_gates/5815296a-7bd8-4a27-86c1-9bb266c19078/rules response: body: - string: '{"data":{"id":"48d335e3-7744-4aef-af75-7c6d0bb9e24e","type":"deployment_rule","attributes":{"created_at":"2025-12-02T17:12:01.161979Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"gate_id":"241e9292-911a-4eea-90e0-83b5f27a468c","name":"My - deployment rule","options":{},"type":"faulty_deployment_detection","updated_at":"2025-12-02T17:12:01.161979Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"1b2fb3ea-a7aa-4d17-92ac-53e625de862e","type":"deployment_rule","attributes":{"created_at":"2025-12-10T09:23:51.829441Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"gate_id":"5815296a-7bd8-4a27-86c1-9bb266c19078","name":"My + deployment rule","options":{},"type":"faulty_deployment_detection","updated_at":"2025-12-10T09:23:51.829441Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: content-type: @@ -63,7 +63,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/deployment_gates/241e9292-911a-4eea-90e0-83b5f27a468c/rules/48d335e3-7744-4aef-af75-7c6d0bb9e24e + uri: https://api.datadoghq.com/api/v2/deployment_gates/5815296a-7bd8-4a27-86c1-9bb266c19078/rules/1b2fb3ea-a7aa-4d17-92ac-53e625de862e response: body: string: '' @@ -77,7 +77,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/deployment_gates/241e9292-911a-4eea-90e0-83b5f27a468c + uri: https://api.datadoghq.com/api/v2/deployment_gates/5815296a-7bd8-4a27-86c1-9bb266c19078 response: body: string: '' diff --git a/tests/v2/cassettes/test_scenarios/test_get_deployment_rule_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_get_deployment_rule_returns_ok_response.frozen index d03936e1d0..3a24fa1404 100644 --- a/tests/v2/cassettes/test_scenarios/test_get_deployment_rule_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_get_deployment_rule_returns_ok_response.frozen @@ -1 +1 @@ -2025-12-02T17:12:01.624Z \ No newline at end of file +2025-12-10T09:23:51.998Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_get_deployment_rule_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_get_deployment_rule_returns_ok_response.yaml index d6794581ff..0b5c6caf5c 100644 --- a/tests/v2/cassettes/test_scenarios/test_get_deployment_rule_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_get_deployment_rule_returns_ok_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate","service":"my-service"},"type":"deployment_gate"}}' + body: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate-testgetdeploymentrulereturnsokresponse1765358631","service":"my-service"},"type":"deployment_gate"}}' headers: accept: - application/json @@ -10,8 +10,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/deployment_gates response: body: - string: '{"data":{"id":"defa04e5-9bb2-4a40-b854-1c2378ffcc58","type":"deployment_gate","attributes":{"created_at":"2025-12-02T17:12:01.70723Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate","service":"my-service","updated_at":"2025-12-02T17:12:01.70723Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"6177e46c-44dc-453d-8af8-8af86aa93c29","type":"deployment_gate","attributes":{"created_at":"2025-12-10T09:23:52.029575Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate-testgetdeploymentrulereturnsokresponse1765358631","service":"my-service","updated_at":"2025-12-10T09:23:52.029575Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: content-type: @@ -27,12 +27,12 @@ interactions: content-type: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/deployment_gates/defa04e5-9bb2-4a40-b854-1c2378ffcc58/rules + uri: https://api.datadoghq.com/api/v2/deployment_gates/6177e46c-44dc-453d-8af8-8af86aa93c29/rules response: body: - string: '{"data":{"id":"c1009845-b7a4-4701-846b-df160891ab3d","type":"deployment_rule","attributes":{"created_at":"2025-12-02T17:12:01.871247Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"gate_id":"defa04e5-9bb2-4a40-b854-1c2378ffcc58","name":"My - deployment rule","options":{},"type":"faulty_deployment_detection","updated_at":"2025-12-02T17:12:01.871247Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"38e32cd3-d245-49c1-85c5-b039ef868a18","type":"deployment_rule","attributes":{"created_at":"2025-12-10T09:23:52.079318Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"gate_id":"6177e46c-44dc-453d-8af8-8af86aa93c29","name":"My + deployment rule","options":{},"type":"faulty_deployment_detection","updated_at":"2025-12-10T09:23:52.079318Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: content-type: @@ -46,12 +46,12 @@ interactions: accept: - application/json method: GET - uri: https://api.datadoghq.com/api/v2/deployment_gates/defa04e5-9bb2-4a40-b854-1c2378ffcc58/rules/c1009845-b7a4-4701-846b-df160891ab3d + uri: https://api.datadoghq.com/api/v2/deployment_gates/6177e46c-44dc-453d-8af8-8af86aa93c29/rules/38e32cd3-d245-49c1-85c5-b039ef868a18 response: body: - string: '{"data":{"id":"c1009845-b7a4-4701-846b-df160891ab3d","type":"deployment_rule","attributes":{"created_at":"2025-12-02T17:12:01.871247Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"gate_id":"defa04e5-9bb2-4a40-b854-1c2378ffcc58","name":"My - deployment rule","options":{},"type":"faulty_deployment_detection","updated_at":"2025-12-02T17:12:01.871247Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"38e32cd3-d245-49c1-85c5-b039ef868a18","type":"deployment_rule","attributes":{"created_at":"2025-12-10T09:23:52.079318Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"gate_id":"6177e46c-44dc-453d-8af8-8af86aa93c29","name":"My + deployment rule","options":{},"type":"faulty_deployment_detection","updated_at":"2025-12-10T09:23:52.079318Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: content-type: @@ -65,7 +65,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/deployment_gates/defa04e5-9bb2-4a40-b854-1c2378ffcc58/rules/c1009845-b7a4-4701-846b-df160891ab3d + uri: https://api.datadoghq.com/api/v2/deployment_gates/6177e46c-44dc-453d-8af8-8af86aa93c29/rules/38e32cd3-d245-49c1-85c5-b039ef868a18 response: body: string: '' @@ -79,7 +79,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/deployment_gates/defa04e5-9bb2-4a40-b854-1c2378ffcc58 + uri: https://api.datadoghq.com/api/v2/deployment_gates/6177e46c-44dc-453d-8af8-8af86aa93c29 response: body: string: '' diff --git a/tests/v2/cassettes/test_scenarios/test_update_deployment_gate_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_update_deployment_gate_returns_ok_response.frozen index 363a2cef56..9f4cffa663 100644 --- a/tests/v2/cassettes/test_scenarios/test_update_deployment_gate_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_update_deployment_gate_returns_ok_response.frozen @@ -1 +1 @@ -2025-12-02T17:12:02.280Z \ No newline at end of file +2025-12-10T09:23:52.262Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_update_deployment_gate_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_update_deployment_gate_returns_ok_response.yaml index ff21a98674..d9a84422d2 100644 --- a/tests/v2/cassettes/test_scenarios/test_update_deployment_gate_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_update_deployment_gate_returns_ok_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate","service":"my-service"},"type":"deployment_gate"}}' + body: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate-testupdatedeploymentgatereturnsokresponse1765358632","service":"my-service"},"type":"deployment_gate"}}' headers: accept: - application/json @@ -10,8 +10,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/deployment_gates response: body: - string: '{"data":{"id":"010e234b-b358-463e-a44d-6fbe29ec3f6b","type":"deployment_gate","attributes":{"created_at":"2025-12-02T17:12:02.374479Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate","service":"my-service","updated_at":"2025-12-02T17:12:02.374479Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"c718bd5b-86d4-43a5-9aff-b4e7757074ba","type":"deployment_gate","attributes":{"created_at":"2025-12-10T09:23:52.299803Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate-testupdatedeploymentgatereturnsokresponse1765358632","service":"my-service","updated_at":"2025-12-10T09:23:52.299803Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: content-type: @@ -27,11 +27,11 @@ interactions: content-type: - application/json method: PUT - uri: https://api.datadoghq.com/api/v2/deployment_gates/010e234b-b358-463e-a44d-6fbe29ec3f6b + uri: https://api.datadoghq.com/api/v2/deployment_gates/c718bd5b-86d4-43a5-9aff-b4e7757074ba response: body: - string: '{"data":{"id":"010e234b-b358-463e-a44d-6fbe29ec3f6b","type":"deployment_gate","attributes":{"created_at":"2025-12-02T17:12:02.374479Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate","service":"my-service","updated_at":"2025-12-02T17:12:02.534024Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"c718bd5b-86d4-43a5-9aff-b4e7757074ba","type":"deployment_gate","attributes":{"created_at":"2025-12-10T09:23:52.299803Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate-testupdatedeploymentgatereturnsokresponse1765358632","service":"my-service","updated_at":"2025-12-10T09:23:52.363356Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: content-type: @@ -45,7 +45,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/deployment_gates/010e234b-b358-463e-a44d-6fbe29ec3f6b + uri: https://api.datadoghq.com/api/v2/deployment_gates/c718bd5b-86d4-43a5-9aff-b4e7757074ba response: body: string: '' diff --git a/tests/v2/cassettes/test_scenarios/test_update_deployment_rule_returns_bad_request_response.frozen b/tests/v2/cassettes/test_scenarios/test_update_deployment_rule_returns_bad_request_response.frozen index 742e9ca604..2f1e7eeb81 100644 --- a/tests/v2/cassettes/test_scenarios/test_update_deployment_rule_returns_bad_request_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_update_deployment_rule_returns_bad_request_response.frozen @@ -1 +1 @@ -2025-12-02T17:12:02.719Z \ No newline at end of file +2025-12-10T09:23:52.426Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_update_deployment_rule_returns_bad_request_response.yaml b/tests/v2/cassettes/test_scenarios/test_update_deployment_rule_returns_bad_request_response.yaml index 7d27cdd462..cc9e2cf594 100644 --- a/tests/v2/cassettes/test_scenarios/test_update_deployment_rule_returns_bad_request_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_update_deployment_rule_returns_bad_request_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate","service":"my-service"},"type":"deployment_gate"}}' + body: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate-testupdatedeploymentrulereturnsbadrequestresponse1765358632","service":"my-service"},"type":"deployment_gate"}}' headers: accept: - application/json @@ -10,8 +10,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/deployment_gates response: body: - string: '{"data":{"id":"ef2fa0b3-0f6a-49a4-9043-1d8130cb7361","type":"deployment_gate","attributes":{"created_at":"2025-12-02T17:12:02.81563Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate","service":"my-service","updated_at":"2025-12-02T17:12:02.81563Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"edb4daf3-86d3-43d0-9a18-0390d53c4a52","type":"deployment_gate","attributes":{"created_at":"2025-12-10T09:23:52.462721Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate-testupdatedeploymentrulereturnsbadrequestresponse1765358632","service":"my-service","updated_at":"2025-12-10T09:23:52.462721Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: content-type: @@ -27,12 +27,12 @@ interactions: content-type: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/deployment_gates/ef2fa0b3-0f6a-49a4-9043-1d8130cb7361/rules + uri: https://api.datadoghq.com/api/v2/deployment_gates/edb4daf3-86d3-43d0-9a18-0390d53c4a52/rules response: body: - string: '{"data":{"id":"c89bf1d3-5e6a-43b1-9009-cfaaaddf8518","type":"deployment_rule","attributes":{"created_at":"2025-12-02T17:12:02.99992Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"gate_id":"ef2fa0b3-0f6a-49a4-9043-1d8130cb7361","name":"My - deployment rule","options":{},"type":"faulty_deployment_detection","updated_at":"2025-12-02T17:12:02.99992Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"f66b2121-b794-4926-8d65-c1f2dcb7870b","type":"deployment_rule","attributes":{"created_at":"2025-12-10T09:23:52.5225Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"gate_id":"edb4daf3-86d3-43d0-9a18-0390d53c4a52","name":"My + deployment rule","options":{},"type":"faulty_deployment_detection","updated_at":"2025-12-10T09:23:52.5225Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: content-type: @@ -65,7 +65,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/deployment_gates/ef2fa0b3-0f6a-49a4-9043-1d8130cb7361/rules/c89bf1d3-5e6a-43b1-9009-cfaaaddf8518 + uri: https://api.datadoghq.com/api/v2/deployment_gates/edb4daf3-86d3-43d0-9a18-0390d53c4a52/rules/f66b2121-b794-4926-8d65-c1f2dcb7870b response: body: string: '' @@ -79,7 +79,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/deployment_gates/ef2fa0b3-0f6a-49a4-9043-1d8130cb7361 + uri: https://api.datadoghq.com/api/v2/deployment_gates/edb4daf3-86d3-43d0-9a18-0390d53c4a52 response: body: string: '' diff --git a/tests/v2/cassettes/test_scenarios/test_update_deployment_rule_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_update_deployment_rule_returns_ok_response.frozen index e8ff3a3f0e..aceddb95a6 100644 --- a/tests/v2/cassettes/test_scenarios/test_update_deployment_rule_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_update_deployment_rule_returns_ok_response.frozen @@ -1 +1 @@ -2025-12-02T17:12:03.436Z \ No newline at end of file +2025-12-10T09:23:52.700Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_update_deployment_rule_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_update_deployment_rule_returns_ok_response.yaml index 59983d4c8d..6e79da9d12 100644 --- a/tests/v2/cassettes/test_scenarios/test_update_deployment_rule_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_update_deployment_rule_returns_ok_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate","service":"my-service"},"type":"deployment_gate"}}' + body: '{"data":{"attributes":{"dry_run":false,"env":"production","identifier":"my-gate-testupdatedeploymentrulereturnsokresponse1765358632","service":"my-service"},"type":"deployment_gate"}}' headers: accept: - application/json @@ -10,8 +10,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/deployment_gates response: body: - string: '{"data":{"id":"bfdae182-ee23-493c-a90b-05441a76ad73","type":"deployment_gate","attributes":{"created_at":"2025-12-02T17:12:03.529101Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate","service":"my-service","updated_at":"2025-12-02T17:12:03.529101Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"3acb9ac2-abba-4579-8697-79493b221d41","type":"deployment_gate","attributes":{"created_at":"2025-12-10T09:23:52.735765Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"env":"production","identifier":"my-gate-testupdatedeploymentrulereturnsokresponse1765358632","service":"my-service","updated_at":"2025-12-10T09:23:52.735765Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: content-type: @@ -27,12 +27,12 @@ interactions: content-type: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/deployment_gates/bfdae182-ee23-493c-a90b-05441a76ad73/rules + uri: https://api.datadoghq.com/api/v2/deployment_gates/3acb9ac2-abba-4579-8697-79493b221d41/rules response: body: - string: '{"data":{"id":"93ed5e98-aeb8-4096-a035-0907f327019e","type":"deployment_rule","attributes":{"created_at":"2025-12-02T17:12:03.68857Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"gate_id":"bfdae182-ee23-493c-a90b-05441a76ad73","name":"My - deployment rule","options":{},"type":"faulty_deployment_detection","updated_at":"2025-12-02T17:12:03.68857Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"ee04f24f-a980-4a28-a839-29911a632978","type":"deployment_rule","attributes":{"created_at":"2025-12-10T09:23:52.782282Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"gate_id":"3acb9ac2-abba-4579-8697-79493b221d41","name":"My + deployment rule","options":{},"type":"faulty_deployment_detection","updated_at":"2025-12-10T09:23:52.782282Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: content-type: @@ -48,12 +48,12 @@ interactions: content-type: - application/json method: PUT - uri: https://api.datadoghq.com/api/v2/deployment_gates/bfdae182-ee23-493c-a90b-05441a76ad73/rules/93ed5e98-aeb8-4096-a035-0907f327019e + uri: https://api.datadoghq.com/api/v2/deployment_gates/3acb9ac2-abba-4579-8697-79493b221d41/rules/ee04f24f-a980-4a28-a839-29911a632978 response: body: - string: '{"data":{"id":"93ed5e98-aeb8-4096-a035-0907f327019e","type":"deployment_rule","attributes":{"created_at":"2025-12-02T17:12:03.68857Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"gate_id":"bfdae182-ee23-493c-a90b-05441a76ad73","name":"Updated - deployment rule","options":{},"type":"faulty_deployment_detection","updated_at":"2025-12-02T17:12:03.882016Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + string: '{"data":{"id":"ee04f24f-a980-4a28-a839-29911a632978","type":"deployment_rule","attributes":{"created_at":"2025-12-10T09:23:52.782282Z","created_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"dry_run":false,"gate_id":"3acb9ac2-abba-4579-8697-79493b221d41","name":"Updated + deployment rule","options":{},"type":"faulty_deployment_detection","updated_at":"2025-12-10T09:23:52.843771Z","updated_by":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}' headers: content-type: @@ -67,7 +67,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/deployment_gates/bfdae182-ee23-493c-a90b-05441a76ad73/rules/93ed5e98-aeb8-4096-a035-0907f327019e + uri: https://api.datadoghq.com/api/v2/deployment_gates/3acb9ac2-abba-4579-8697-79493b221d41/rules/ee04f24f-a980-4a28-a839-29911a632978 response: body: string: '' @@ -81,7 +81,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/deployment_gates/bfdae182-ee23-493c-a90b-05441a76ad73 + uri: https://api.datadoghq.com/api/v2/deployment_gates/3acb9ac2-abba-4579-8697-79493b221d41 response: body: string: '' diff --git a/tests/v2/features/given.json b/tests/v2/features/given.json index ad563ffc78..a6a148f264 100644 --- a/tests/v2/features/given.json +++ b/tests/v2/features/given.json @@ -350,7 +350,7 @@ "parameters": [ { "name": "body", - "value": "{\n \"data\": {\n \"type\": \"deployment_gate\",\n \"attributes\": {\n \"service\": \"my-service\",\n \"env\": \"production\",\n \"identifier\": \"my-gate\",\n \"dry_run\": false\n }\n }\n}" + "value": "{\n \"data\": {\n \"type\": \"deployment_gate\",\n \"attributes\": {\n \"service\": \"my-service\",\n \"env\": \"production\",\n \"identifier\": \"my-gate-{{ unique_lower_alnum }}\",\n \"dry_run\": false\n }\n }\n}" } ], "step": "there is a valid \"deployment_gate\" in the system",