From 65b8ea12bef94f80807131c12031231593fac335 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Wed, 10 Dec 2025 10:56:34 +0000 Subject: [PATCH] Regenerate client from commit 497f78f of spec repo --- .generator/schemas/v1/openapi.yaml | 37 +++- .../v1_dashboards_CreateDashboard_9836563.rs | 166 ++++++++++++++++++ src/datadogV1/model/mod.rs | 38 ++-- .../model/model_geomap_widget_definition.rs | 3 +- .../model_geomap_widget_definition_view.rs | 2 +- .../model/model_geomap_widget_request.rs | 63 +++++++ .../model_geomap_widget_request_style.rs | 105 +++++++++++ ...onditional-formats-and-text-formats.frozen | 1 + ...-conditional-formats-and-text-formats.json | 67 +++++++ ...t-rule-returns-Bad-Request-response.frozen | 2 +- ...ent-rule-returns-Bad-Request-response.json | 14 +- ...deployment-rule-returns-OK-response.frozen | 2 +- ...e-deployment-rule-returns-OK-response.json | 20 +-- ...nt-gate-returns-No-Content-response.frozen | 2 +- ...ment-gate-returns-No-Content-response.json | 14 +- ...nt-rule-returns-No-Content-response.frozen | 2 +- ...ment-rule-returns-No-Content-response.json | 24 +-- ...deployment-gate-returns-OK-response.frozen | 2 +- ...t-deployment-gate-returns-OK-response.json | 16 +- ...t-rule-returns-Bad-Request-response.frozen | 2 +- ...ent-rule-returns-Bad-Request-response.json | 22 +-- ...deployment-rule-returns-OK-response.frozen | 2 +- ...t-deployment-rule-returns-OK-response.json | 26 +-- ...deployment-gate-returns-OK-response.frozen | 2 +- ...e-deployment-gate-returns-OK-response.json | 16 +- ...t-rule-returns-Bad-Request-response.frozen | 2 +- ...ent-rule-returns-Bad-Request-response.json | 22 +-- ...deployment-rule-returns-OK-response.frozen | 2 +- ...e-deployment-rule-returns-OK-response.json | 26 +-- .../scenarios/features/v1/dashboards.feature | 16 ++ tests/scenarios/features/v2/given.json | 2 +- 31 files changed, 582 insertions(+), 138 deletions(-) create mode 100644 examples/v1_dashboards_CreateDashboard_9836563.rs create mode 100644 src/datadogV1/model/model_geomap_widget_request_style.rs create mode 100644 tests/scenarios/cassettes/v1/dashboards/Create-a-geomap-widget-with-conditional-formats-and-text-formats.frozen create mode 100644 tests/scenarios/cassettes/v1/dashboards/Create-a-geomap-widget-with-conditional-formats-and-text-formats.json diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index afb32a4a8..53c190f67 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/examples/v1_dashboards_CreateDashboard_9836563.rs b/examples/v1_dashboards_CreateDashboard_9836563.rs new file mode 100644 index 000000000..1d3168d21 --- /dev/null +++ b/examples/v1_dashboards_CreateDashboard_9836563.rs @@ -0,0 +1,166 @@ +// Create a geomap widget with conditional formats and text formats +use datadog_api_client::datadog; +use datadog_api_client::datadogV1::api_dashboards::DashboardsAPI; +use datadog_api_client::datadogV1::model::Dashboard; +use datadog_api_client::datadogV1::model::DashboardLayoutType; +use datadog_api_client::datadogV1::model::DashboardReflowType; +use datadog_api_client::datadogV1::model::FormulaAndFunctionEventAggregation; +use datadog_api_client::datadogV1::model::FormulaAndFunctionEventQueryDefinition; +use datadog_api_client::datadogV1::model::FormulaAndFunctionEventQueryDefinitionCompute; +use datadog_api_client::datadogV1::model::FormulaAndFunctionEventQueryDefinitionSearch; +use datadog_api_client::datadogV1::model::FormulaAndFunctionEventsDataSource; +use datadog_api_client::datadogV1::model::FormulaAndFunctionQueryDefinition; +use datadog_api_client::datadogV1::model::FormulaAndFunctionResponseFormat; +use datadog_api_client::datadogV1::model::FormulaType; +use datadog_api_client::datadogV1::model::GeomapWidgetDefinition; +use datadog_api_client::datadogV1::model::GeomapWidgetDefinitionStyle; +use datadog_api_client::datadogV1::model::GeomapWidgetDefinitionType; +use datadog_api_client::datadogV1::model::GeomapWidgetDefinitionView; +use datadog_api_client::datadogV1::model::GeomapWidgetRequest; +use datadog_api_client::datadogV1::model::GeomapWidgetRequestStyle; +use datadog_api_client::datadogV1::model::ListStreamColumn; +use datadog_api_client::datadogV1::model::ListStreamColumnWidth; +use datadog_api_client::datadogV1::model::ListStreamQuery; +use datadog_api_client::datadogV1::model::ListStreamSource; +use datadog_api_client::datadogV1::model::TableWidgetTextFormatMatch; +use datadog_api_client::datadogV1::model::TableWidgetTextFormatMatchType; +use datadog_api_client::datadogV1::model::TableWidgetTextFormatPalette; +use datadog_api_client::datadogV1::model::TableWidgetTextFormatRule; +use datadog_api_client::datadogV1::model::Widget; +use datadog_api_client::datadogV1::model::WidgetComparator; +use datadog_api_client::datadogV1::model::WidgetConditionalFormat; +use datadog_api_client::datadogV1::model::WidgetDefinition; +use datadog_api_client::datadogV1::model::WidgetFormula; +use datadog_api_client::datadogV1::model::WidgetFormulaSort; +use datadog_api_client::datadogV1::model::WidgetLayout; +use datadog_api_client::datadogV1::model::WidgetPalette; +use datadog_api_client::datadogV1::model::WidgetSort; +use datadog_api_client::datadogV1::model::WidgetSortBy; +use datadog_api_client::datadogV1::model::WidgetSortOrderBy; + +#[tokio::main] +async fn main() { + let body = + Dashboard::new( + DashboardLayoutType::ORDERED, + "Example-Dashboard".to_string(), + vec![ + Widget::new( + WidgetDefinition::GeomapWidgetDefinition( + Box::new( + GeomapWidgetDefinition::new( + vec![ + GeomapWidgetRequest::new() + .conditional_formats( + vec![ + WidgetConditionalFormat::new( + WidgetComparator::GREATER_THAN, + WidgetPalette::WHITE_ON_GREEN, + 1000.0, + ) + ], + ) + .formulas(vec![WidgetFormula::new("query1".to_string())]) + .queries( + vec![ + FormulaAndFunctionQueryDefinition + ::FormulaAndFunctionEventQueryDefinition( + Box::new( + FormulaAndFunctionEventQueryDefinition::new( + FormulaAndFunctionEventQueryDefinitionCompute::new( + FormulaAndFunctionEventAggregation::COUNT, + ), + FormulaAndFunctionEventsDataSource::RUM, + "query1".to_string(), + ) + .group_by(vec![]) + .indexes(vec!["*".to_string()]) + .search( + FormulaAndFunctionEventQueryDefinitionSearch::new( + "@type:session".to_string(), + ), + ), + ), + ) + ], + ) + .response_format(FormulaAndFunctionResponseFormat::SCALAR) + .sort( + WidgetSortBy::new() + .count(250) + .order_by( + vec![ + WidgetSortOrderBy::WidgetFormulaSort( + Box::new( + WidgetFormulaSort::new( + 0, + WidgetSort::DESCENDING, + FormulaType::FORMULA, + ), + ), + ) + ], + ), + ), + GeomapWidgetRequest::new() + .columns( + vec![ + ListStreamColumn::new( + "@network.client.geoip.location.latitude".to_string(), + ListStreamColumnWidth::AUTO, + ), + ListStreamColumn::new( + "@network.client.geoip.location.longitude".to_string(), + ListStreamColumnWidth::AUTO, + ), + ListStreamColumn::new( + "@network.client.geoip.country.iso_code".to_string(), + ListStreamColumnWidth::AUTO, + ), + ListStreamColumn::new( + "@network.client.geoip.subdivision.name".to_string(), + ListStreamColumnWidth::AUTO, + ) + ], + ) + .query( + ListStreamQuery::new(ListStreamSource::LOGS_STREAM, "".to_string()) + .indexes(vec![]) + .storage("hot".to_string()), + ) + .response_format(FormulaAndFunctionResponseFormat::EVENT_LIST) + .style(GeomapWidgetRequestStyle::new().color_by("status".to_string())) + .text_formats( + vec![ + TableWidgetTextFormatRule::new( + TableWidgetTextFormatMatch::new( + TableWidgetTextFormatMatchType::IS, + "error".to_string(), + ), + ).palette(TableWidgetTextFormatPalette::WHITE_ON_RED) + ], + ) + ], + GeomapWidgetDefinitionStyle::new("hostmap_blues".to_string(), false), + GeomapWidgetDefinitionType::GEOMAP, + GeomapWidgetDefinitionView::new("NORTH_AMERICA".to_string()), + ).title("Log Count by Service and Source".to_string()), + ), + ), + ).layout(WidgetLayout::new(6, 12, 0, 0)) + ], + ) + .description(Some("Example-Dashboard".to_string())) + .notify_list(Some(vec![])) + .reflow_type(DashboardReflowType::FIXED) + .tags(Some(vec![])) + .template_variables(Some(vec![])); + let configuration = datadog::Configuration::new(); + let api = DashboardsAPI::with_config(configuration); + let resp = api.create_dashboard(body).await; + if let Ok(value) = resp { + println!("{:#?}", value); + } else { + println!("{:#?}", resp.unwrap_err()); + } +} diff --git a/src/datadogV1/model/mod.rs b/src/datadogV1/model/mod.rs index 10dc3359a..8fd073565 100644 --- a/src/datadogV1/model/mod.rs +++ b/src/datadogV1/model/mod.rs @@ -338,6 +338,26 @@ pub mod model_group_type; pub use self::model_group_type::GroupType; pub mod model_widget_sort_order_by; pub use self::model_widget_sort_order_by::WidgetSortOrderBy; +pub mod model_geomap_widget_request_style; +pub use self::model_geomap_widget_request_style::GeomapWidgetRequestStyle; +pub mod model_table_widget_text_format_rule; +pub use self::model_table_widget_text_format_rule::TableWidgetTextFormatRule; +pub mod model_table_widget_text_format_match; +pub use self::model_table_widget_text_format_match::TableWidgetTextFormatMatch; +pub mod model_table_widget_text_format_match_type; +pub use self::model_table_widget_text_format_match_type::TableWidgetTextFormatMatchType; +pub mod model_table_widget_text_format_palette; +pub use self::model_table_widget_text_format_palette::TableWidgetTextFormatPalette; +pub mod model_table_widget_text_format_replace_all; +pub use self::model_table_widget_text_format_replace_all::TableWidgetTextFormatReplaceAll; +pub mod model_table_widget_text_format_replace_all_type; +pub use self::model_table_widget_text_format_replace_all_type::TableWidgetTextFormatReplaceAllType; +pub mod model_table_widget_text_format_replace_substring; +pub use self::model_table_widget_text_format_replace_substring::TableWidgetTextFormatReplaceSubstring; +pub mod model_table_widget_text_format_replace_substring_type; +pub use self::model_table_widget_text_format_replace_substring_type::TableWidgetTextFormatReplaceSubstringType; +pub mod model_table_widget_text_format_replace; +pub use self::model_table_widget_text_format_replace::TableWidgetTextFormatReplace; pub mod model_geomap_widget_definition_style; pub use self::model_geomap_widget_definition_style::GeomapWidgetDefinitionStyle; pub mod model_geomap_widget_definition_type; @@ -518,24 +538,6 @@ pub mod model_table_widget_has_search_bar; pub use self::model_table_widget_has_search_bar::TableWidgetHasSearchBar; pub mod model_table_widget_request; pub use self::model_table_widget_request::TableWidgetRequest; -pub mod model_table_widget_text_format_rule; -pub use self::model_table_widget_text_format_rule::TableWidgetTextFormatRule; -pub mod model_table_widget_text_format_match; -pub use self::model_table_widget_text_format_match::TableWidgetTextFormatMatch; -pub mod model_table_widget_text_format_match_type; -pub use self::model_table_widget_text_format_match_type::TableWidgetTextFormatMatchType; -pub mod model_table_widget_text_format_palette; -pub use self::model_table_widget_text_format_palette::TableWidgetTextFormatPalette; -pub mod model_table_widget_text_format_replace_all; -pub use self::model_table_widget_text_format_replace_all::TableWidgetTextFormatReplaceAll; -pub mod model_table_widget_text_format_replace_all_type; -pub use self::model_table_widget_text_format_replace_all_type::TableWidgetTextFormatReplaceAllType; -pub mod model_table_widget_text_format_replace_substring; -pub use self::model_table_widget_text_format_replace_substring::TableWidgetTextFormatReplaceSubstring; -pub mod model_table_widget_text_format_replace_substring_type; -pub use self::model_table_widget_text_format_replace_substring_type::TableWidgetTextFormatReplaceSubstringType; -pub mod model_table_widget_text_format_replace; -pub use self::model_table_widget_text_format_replace::TableWidgetTextFormatReplace; pub mod model_table_widget_definition_type; pub use self::model_table_widget_definition_type::TableWidgetDefinitionType; pub mod model_timeseries_widget_definition; diff --git a/src/datadogV1/model/model_geomap_widget_definition.rs b/src/datadogV1/model/model_geomap_widget_definition.rs index aca407687..b40ac8ae2 100644 --- a/src/datadogV1/model/model_geomap_widget_definition.rs +++ b/src/datadogV1/model/model_geomap_widget_definition.rs @@ -14,8 +14,7 @@ pub struct GeomapWidgetDefinition { /// A list of custom links. #[serde(rename = "custom_links")] pub custom_links: Option>, - /// 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. - /// + /// 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`. #[serde(rename = "requests")] diff --git a/src/datadogV1/model/model_geomap_widget_definition_view.rs b/src/datadogV1/model/model_geomap_widget_definition_view.rs index 97408312c..c49a7ef34 100644 --- a/src/datadogV1/model/model_geomap_widget_definition_view.rs +++ b/src/datadogV1/model/model_geomap_widget_definition_view.rs @@ -11,7 +11,7 @@ use std::fmt::{self, Formatter}; #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] pub struct GeomapWidgetDefinitionView { - /// The 2-letter ISO code of a country to focus the map on. Or `WORLD`. + /// 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`). #[serde(rename = "focus")] pub focus: String, #[serde(flatten)] diff --git a/src/datadogV1/model/model_geomap_widget_request.rs b/src/datadogV1/model/model_geomap_widget_request.rs index 4cd70589a..a75ffb5a1 100644 --- a/src/datadogV1/model/model_geomap_widget_request.rs +++ b/src/datadogV1/model/model_geomap_widget_request.rs @@ -14,6 +14,9 @@ pub struct GeomapWidgetRequest { /// Widget columns. #[serde(rename = "columns")] pub columns: Option>, + /// Threshold (numeric) conditional formatting rules may be used by a regions layer. + #[serde(rename = "conditional_formats")] + pub conditional_formats: Option>, /// List of formulas that operate on queries. #[serde(rename = "formulas")] pub formulas: Option>, @@ -41,6 +44,12 @@ pub struct GeomapWidgetRequest { /// The controls for sorting the widget. #[serde(rename = "sort")] pub sort: Option, + /// The style to apply to the request for points layer. + #[serde(rename = "style")] + pub style: Option, + /// Text formatting rules may be used by a points layer. + #[serde(rename = "text_formats")] + pub text_formats: Option>, #[serde(flatten)] pub additional_properties: std::collections::BTreeMap, #[serde(skip)] @@ -52,6 +61,7 @@ impl GeomapWidgetRequest { pub fn new() -> GeomapWidgetRequest { GeomapWidgetRequest { columns: None, + conditional_formats: None, formulas: None, log_query: None, q: None, @@ -61,6 +71,8 @@ impl GeomapWidgetRequest { rum_query: None, security_query: None, sort: None, + style: None, + text_formats: None, additional_properties: std::collections::BTreeMap::new(), _unparsed: false, } @@ -71,6 +83,14 @@ impl GeomapWidgetRequest { self } + pub fn conditional_formats( + mut self, + value: Vec, + ) -> Self { + self.conditional_formats = Some(value); + self + } + pub fn formulas(mut self, value: Vec) -> Self { self.formulas = Some(value); self @@ -122,6 +142,19 @@ impl GeomapWidgetRequest { self } + pub fn style(mut self, value: crate::datadogV1::model::GeomapWidgetRequestStyle) -> Self { + self.style = Some(value); + self + } + + pub fn text_formats( + mut self, + value: Vec, + ) -> Self { + self.text_formats = Some(value); + self + } + pub fn additional_properties( mut self, value: std::collections::BTreeMap, @@ -155,6 +188,9 @@ impl<'de> Deserialize<'de> for GeomapWidgetRequest { M: MapAccess<'a>, { let mut columns: Option> = None; + let mut conditional_formats: Option< + Vec, + > = None; let mut formulas: Option> = None; let mut log_query: Option = None; let mut q: Option = None; @@ -168,6 +204,10 @@ impl<'de> Deserialize<'de> for GeomapWidgetRequest { let mut rum_query: Option = None; let mut security_query: Option = None; let mut sort: Option = None; + let mut style: Option = None; + let mut text_formats: Option< + Vec, + > = None; let mut additional_properties: std::collections::BTreeMap< String, serde_json::Value, @@ -182,6 +222,13 @@ impl<'de> Deserialize<'de> for GeomapWidgetRequest { } columns = Some(serde_json::from_value(v).map_err(M::Error::custom)?); } + "conditional_formats" => { + if v.is_null() { + continue; + } + conditional_formats = + Some(serde_json::from_value(v).map_err(M::Error::custom)?); + } "formulas" => { if v.is_null() { continue; @@ -246,6 +293,19 @@ impl<'de> Deserialize<'de> for GeomapWidgetRequest { } sort = Some(serde_json::from_value(v).map_err(M::Error::custom)?); } + "style" => { + if v.is_null() { + continue; + } + style = Some(serde_json::from_value(v).map_err(M::Error::custom)?); + } + "text_formats" => { + if v.is_null() { + continue; + } + text_formats = + Some(serde_json::from_value(v).map_err(M::Error::custom)?); + } &_ => { if let Ok(value) = serde_json::from_value(v.clone()) { additional_properties.insert(k, value); @@ -256,6 +316,7 @@ impl<'de> Deserialize<'de> for GeomapWidgetRequest { let content = GeomapWidgetRequest { columns, + conditional_formats, formulas, log_query, q, @@ -265,6 +326,8 @@ impl<'de> Deserialize<'de> for GeomapWidgetRequest { rum_query, security_query, sort, + style, + text_formats, additional_properties, _unparsed, }; diff --git a/src/datadogV1/model/model_geomap_widget_request_style.rs b/src/datadogV1/model/model_geomap_widget_request_style.rs new file mode 100644 index 000000000..a5440f989 --- /dev/null +++ b/src/datadogV1/model/model_geomap_widget_request_style.rs @@ -0,0 +1,105 @@ +// 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. +use serde::de::{Error, MapAccess, Visitor}; +use serde::{Deserialize, Deserializer, Serialize}; +use serde_with::skip_serializing_none; +use std::fmt::{self, Formatter}; + +/// The style to apply to the request for points layer. +#[non_exhaustive] +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize)] +pub struct GeomapWidgetRequestStyle { + /// The category to color the points by. + #[serde(rename = "color_by")] + pub color_by: Option, + #[serde(flatten)] + pub additional_properties: std::collections::BTreeMap, + #[serde(skip)] + #[serde(default)] + pub(crate) _unparsed: bool, +} + +impl GeomapWidgetRequestStyle { + pub fn new() -> GeomapWidgetRequestStyle { + GeomapWidgetRequestStyle { + color_by: None, + additional_properties: std::collections::BTreeMap::new(), + _unparsed: false, + } + } + + pub fn color_by(mut self, value: String) -> Self { + self.color_by = Some(value); + self + } + + pub fn additional_properties( + mut self, + value: std::collections::BTreeMap, + ) -> Self { + self.additional_properties = value; + self + } +} + +impl Default for GeomapWidgetRequestStyle { + fn default() -> Self { + Self::new() + } +} + +impl<'de> Deserialize<'de> for GeomapWidgetRequestStyle { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + struct GeomapWidgetRequestStyleVisitor; + impl<'a> Visitor<'a> for GeomapWidgetRequestStyleVisitor { + type Value = GeomapWidgetRequestStyle; + + fn expecting(&self, f: &mut Formatter<'_>) -> fmt::Result { + f.write_str("a mapping") + } + + fn visit_map(self, mut map: M) -> Result + where + M: MapAccess<'a>, + { + let mut color_by: Option = None; + let mut additional_properties: std::collections::BTreeMap< + String, + serde_json::Value, + > = std::collections::BTreeMap::new(); + let mut _unparsed = false; + + while let Some((k, v)) = map.next_entry::()? { + match k.as_str() { + "color_by" => { + if v.is_null() { + continue; + } + color_by = Some(serde_json::from_value(v).map_err(M::Error::custom)?); + } + &_ => { + if let Ok(value) = serde_json::from_value(v.clone()) { + additional_properties.insert(k, value); + } + } + } + } + + let content = GeomapWidgetRequestStyle { + color_by, + additional_properties, + _unparsed, + }; + + Ok(content) + } + } + + deserializer.deserialize_any(GeomapWidgetRequestStyleVisitor) + } +} diff --git a/tests/scenarios/cassettes/v1/dashboards/Create-a-geomap-widget-with-conditional-formats-and-text-formats.frozen b/tests/scenarios/cassettes/v1/dashboards/Create-a-geomap-widget-with-conditional-formats-and-text-formats.frozen new file mode 100644 index 000000000..b42d25287 --- /dev/null +++ b/tests/scenarios/cassettes/v1/dashboards/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/scenarios/cassettes/v1/dashboards/Create-a-geomap-widget-with-conditional-formats-and-text-formats.json b/tests/scenarios/cassettes/v1/dashboards/Create-a-geomap-widget-with-conditional-formats-and-text-formats.json new file mode 100644 index 000000000..2f3a1b743 --- /dev/null +++ b/tests/scenarios/cassettes/v1/dashboards/Create-a-geomap-widget-with-conditional-formats-and-text-formats.json @@ -0,0 +1,67 @@ +{ + "http_interactions": [ + { + "request": { + "body": { + "string": "{\"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}}]}", + "encoding": null + }, + "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\":[]}", + "encoding": null + }, + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "status": { + "code": 200, + "message": "OK" + } + }, + "recorded_at": "Mon, 08 Dec 2025 10:46:15 GMT" + }, + { + "request": { + "body": "", + "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\"}", + "encoding": null + }, + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "status": { + "code": 200, + "message": "OK" + } + }, + "recorded_at": "Mon, 08 Dec 2025 10:46:15 GMT" + } + ], + "recorded_with": "VCR 6.0.0" +} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/deployment_gates/Create-deployment-rule-returns-Bad-Request-response.frozen b/tests/scenarios/cassettes/v2/deployment_gates/Create-deployment-rule-returns-Bad-Request-response.frozen index 818d31b6d..f2f83420d 100644 --- a/tests/scenarios/cassettes/v2/deployment_gates/Create-deployment-rule-returns-Bad-Request-response.frozen +++ b/tests/scenarios/cassettes/v2/deployment_gates/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/scenarios/cassettes/v2/deployment_gates/Create-deployment-rule-returns-Bad-Request-response.json b/tests/scenarios/cassettes/v2/deployment_gates/Create-deployment-rule-returns-Bad-Request-response.json index 2b69a2f7f..e744a4f83 100644 --- a/tests/scenarios/cassettes/v2/deployment_gates/Create-deployment-rule-returns-Bad-Request-response.json +++ b/tests/scenarios/cassettes/v2/deployment_gates/Create-deployment-rule-returns-Bad-Request-response.json @@ -3,7 +3,7 @@ { "request": { "body": { - "string": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}", + "string": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate-testcreatedeploymentrulereturnsbadrequestresponse1765358629\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}", "encoding": null }, "headers": { @@ -19,7 +19,7 @@ }, "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 Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "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\"}}}}", "encoding": null }, "headers": { @@ -32,7 +32,7 @@ "message": "OK" } }, - "recorded_at": "Tue, 02 Dec 2025 17:11:57 GMT" + "recorded_at": "Wed, 10 Dec 2025 09:23:49 GMT" }, { "request": { @@ -49,7 +49,7 @@ ] }, "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": { @@ -66,7 +66,7 @@ "message": "Bad Request" } }, - "recorded_at": "Tue, 02 Dec 2025 17:11:57 GMT" + "recorded_at": "Wed, 10 Dec 2025 09:23:49 GMT" }, { "request": { @@ -77,7 +77,7 @@ ] }, "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": { @@ -90,7 +90,7 @@ "message": "No Content" } }, - "recorded_at": "Tue, 02 Dec 2025 17:11:57 GMT" + "recorded_at": "Wed, 10 Dec 2025 09:23:49 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/deployment_gates/Create-deployment-rule-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/deployment_gates/Create-deployment-rule-returns-OK-response.frozen index f7669bb4b..63e0f6669 100644 --- a/tests/scenarios/cassettes/v2/deployment_gates/Create-deployment-rule-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v2/deployment_gates/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/scenarios/cassettes/v2/deployment_gates/Create-deployment-rule-returns-OK-response.json b/tests/scenarios/cassettes/v2/deployment_gates/Create-deployment-rule-returns-OK-response.json index 262d09da8..86a3f56e8 100644 --- a/tests/scenarios/cassettes/v2/deployment_gates/Create-deployment-rule-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/deployment_gates/Create-deployment-rule-returns-OK-response.json @@ -3,7 +3,7 @@ { "request": { "body": { - "string": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}", + "string": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate-testcreatedeploymentrulereturnsokresponse1765358630\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}", "encoding": null }, "headers": { @@ -19,7 +19,7 @@ }, "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 Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "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\"}}}}", "encoding": null }, "headers": { @@ -32,7 +32,7 @@ "message": "OK" } }, - "recorded_at": "Tue, 02 Dec 2025 17:11:58 GMT" + "recorded_at": "Wed, 10 Dec 2025 09:23:50 GMT" }, { "request": { @@ -49,11 +49,11 @@ ] }, "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 Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "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\"}}}}", "encoding": null }, "headers": { @@ -66,7 +66,7 @@ "message": "OK" } }, - "recorded_at": "Tue, 02 Dec 2025 17:11:58 GMT" + "recorded_at": "Wed, 10 Dec 2025 09:23:50 GMT" }, { "request": { @@ -77,7 +77,7 @@ ] }, "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": { @@ -90,7 +90,7 @@ "message": "No Content" } }, - "recorded_at": "Tue, 02 Dec 2025 17:11:58 GMT" + "recorded_at": "Wed, 10 Dec 2025 09:23:50 GMT" }, { "request": { @@ -101,7 +101,7 @@ ] }, "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": { @@ -114,7 +114,7 @@ "message": "No Content" } }, - "recorded_at": "Tue, 02 Dec 2025 17:11:58 GMT" + "recorded_at": "Wed, 10 Dec 2025 09:23:50 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/deployment_gates/Delete-deployment-gate-returns-No-Content-response.frozen b/tests/scenarios/cassettes/v2/deployment_gates/Delete-deployment-gate-returns-No-Content-response.frozen index 6727b321f..10aea5fda 100644 --- a/tests/scenarios/cassettes/v2/deployment_gates/Delete-deployment-gate-returns-No-Content-response.frozen +++ b/tests/scenarios/cassettes/v2/deployment_gates/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/scenarios/cassettes/v2/deployment_gates/Delete-deployment-gate-returns-No-Content-response.json b/tests/scenarios/cassettes/v2/deployment_gates/Delete-deployment-gate-returns-No-Content-response.json index d37f4601c..86cddd094 100644 --- a/tests/scenarios/cassettes/v2/deployment_gates/Delete-deployment-gate-returns-No-Content-response.json +++ b/tests/scenarios/cassettes/v2/deployment_gates/Delete-deployment-gate-returns-No-Content-response.json @@ -3,7 +3,7 @@ { "request": { "body": { - "string": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}", + "string": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate-testdeletedeploymentgatereturnsnocontentresponse1765358631\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}", "encoding": null }, "headers": { @@ -19,7 +19,7 @@ }, "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 Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "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\"}}}}", "encoding": null }, "headers": { @@ -32,7 +32,7 @@ "message": "OK" } }, - "recorded_at": "Tue, 02 Dec 2025 17:11:59 GMT" + "recorded_at": "Wed, 10 Dec 2025 09:23:51 GMT" }, { "request": { @@ -43,7 +43,7 @@ ] }, "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": { @@ -56,7 +56,7 @@ "message": "No Content" } }, - "recorded_at": "Tue, 02 Dec 2025 17:11:59 GMT" + "recorded_at": "Wed, 10 Dec 2025 09:23:51 GMT" }, { "request": { @@ -67,7 +67,7 @@ ] }, "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": { @@ -84,7 +84,7 @@ "message": "Not Found" } }, - "recorded_at": "Tue, 02 Dec 2025 17:11:59 GMT" + "recorded_at": "Wed, 10 Dec 2025 09:23:51 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/deployment_gates/Delete-deployment-rule-returns-No-Content-response.frozen b/tests/scenarios/cassettes/v2/deployment_gates/Delete-deployment-rule-returns-No-Content-response.frozen index 5d67a9ba4..63b9423dd 100644 --- a/tests/scenarios/cassettes/v2/deployment_gates/Delete-deployment-rule-returns-No-Content-response.frozen +++ b/tests/scenarios/cassettes/v2/deployment_gates/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/scenarios/cassettes/v2/deployment_gates/Delete-deployment-rule-returns-No-Content-response.json b/tests/scenarios/cassettes/v2/deployment_gates/Delete-deployment-rule-returns-No-Content-response.json index f0e3a0bc2..388958620 100644 --- a/tests/scenarios/cassettes/v2/deployment_gates/Delete-deployment-rule-returns-No-Content-response.json +++ b/tests/scenarios/cassettes/v2/deployment_gates/Delete-deployment-rule-returns-No-Content-response.json @@ -3,7 +3,7 @@ { "request": { "body": { - "string": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}", + "string": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate-testdeletedeploymentrulereturnsnocontentresponse1765358631\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}", "encoding": null }, "headers": { @@ -19,7 +19,7 @@ }, "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 Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "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\"}}}}", "encoding": null }, "headers": { @@ -32,7 +32,7 @@ "message": "OK" } }, - "recorded_at": "Tue, 02 Dec 2025 17:11:59 GMT" + "recorded_at": "Wed, 10 Dec 2025 09:23:51 GMT" }, { "request": { @@ -49,11 +49,11 @@ ] }, "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 Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "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\"}}}}", "encoding": null }, "headers": { @@ -66,7 +66,7 @@ "message": "OK" } }, - "recorded_at": "Tue, 02 Dec 2025 17:11:59 GMT" + "recorded_at": "Wed, 10 Dec 2025 09:23:51 GMT" }, { "request": { @@ -77,7 +77,7 @@ ] }, "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": { @@ -90,7 +90,7 @@ "message": "No Content" } }, - "recorded_at": "Tue, 02 Dec 2025 17:11:59 GMT" + "recorded_at": "Wed, 10 Dec 2025 09:23:51 GMT" }, { "request": { @@ -101,7 +101,7 @@ ] }, "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": { @@ -118,7 +118,7 @@ "message": "Not Found" } }, - "recorded_at": "Tue, 02 Dec 2025 17:11:59 GMT" + "recorded_at": "Wed, 10 Dec 2025 09:23:51 GMT" }, { "request": { @@ -129,7 +129,7 @@ ] }, "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": { @@ -142,7 +142,7 @@ "message": "No Content" } }, - "recorded_at": "Tue, 02 Dec 2025 17:11:59 GMT" + "recorded_at": "Wed, 10 Dec 2025 09:23:51 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/deployment_gates/Get-deployment-gate-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/deployment_gates/Get-deployment-gate-returns-OK-response.frozen index a00e4ba26..7171264e8 100644 --- a/tests/scenarios/cassettes/v2/deployment_gates/Get-deployment-gate-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v2/deployment_gates/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/scenarios/cassettes/v2/deployment_gates/Get-deployment-gate-returns-OK-response.json b/tests/scenarios/cassettes/v2/deployment_gates/Get-deployment-gate-returns-OK-response.json index d7b97ac4a..6aa1e4776 100644 --- a/tests/scenarios/cassettes/v2/deployment_gates/Get-deployment-gate-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/deployment_gates/Get-deployment-gate-returns-OK-response.json @@ -3,7 +3,7 @@ { "request": { "body": { - "string": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}", + "string": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate-testgetdeploymentgatereturnsokresponse1765358631\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}", "encoding": null }, "headers": { @@ -19,7 +19,7 @@ }, "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 Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "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\"}}}}", "encoding": null }, "headers": { @@ -32,7 +32,7 @@ "message": "OK" } }, - "recorded_at": "Tue, 02 Dec 2025 17:12:00 GMT" + "recorded_at": "Wed, 10 Dec 2025 09:23:51 GMT" }, { "request": { @@ -43,11 +43,11 @@ ] }, "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 Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "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\"}}}}", "encoding": null }, "headers": { @@ -60,7 +60,7 @@ "message": "OK" } }, - "recorded_at": "Tue, 02 Dec 2025 17:12:00 GMT" + "recorded_at": "Wed, 10 Dec 2025 09:23:51 GMT" }, { "request": { @@ -71,7 +71,7 @@ ] }, "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": { @@ -84,7 +84,7 @@ "message": "No Content" } }, - "recorded_at": "Tue, 02 Dec 2025 17:12:00 GMT" + "recorded_at": "Wed, 10 Dec 2025 09:23:51 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/deployment_gates/Get-deployment-rule-returns-Bad-Request-response.frozen b/tests/scenarios/cassettes/v2/deployment_gates/Get-deployment-rule-returns-Bad-Request-response.frozen index e00dc1eb2..80aa87053 100644 --- a/tests/scenarios/cassettes/v2/deployment_gates/Get-deployment-rule-returns-Bad-Request-response.frozen +++ b/tests/scenarios/cassettes/v2/deployment_gates/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/scenarios/cassettes/v2/deployment_gates/Get-deployment-rule-returns-Bad-Request-response.json b/tests/scenarios/cassettes/v2/deployment_gates/Get-deployment-rule-returns-Bad-Request-response.json index 72afe25f6..7dc3b6c3f 100644 --- a/tests/scenarios/cassettes/v2/deployment_gates/Get-deployment-rule-returns-Bad-Request-response.json +++ b/tests/scenarios/cassettes/v2/deployment_gates/Get-deployment-rule-returns-Bad-Request-response.json @@ -3,7 +3,7 @@ { "request": { "body": { - "string": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}", + "string": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate-testgetdeploymentrulereturnsbadrequestresponse1765358631\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}", "encoding": null }, "headers": { @@ -19,7 +19,7 @@ }, "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 Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "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\"}}}}", "encoding": null }, "headers": { @@ -32,7 +32,7 @@ "message": "OK" } }, - "recorded_at": "Tue, 02 Dec 2025 17:12:00 GMT" + "recorded_at": "Wed, 10 Dec 2025 09:23:51 GMT" }, { "request": { @@ -49,11 +49,11 @@ ] }, "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 Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "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\"}}}}", "encoding": null }, "headers": { @@ -66,7 +66,7 @@ "message": "OK" } }, - "recorded_at": "Tue, 02 Dec 2025 17:12:00 GMT" + "recorded_at": "Wed, 10 Dec 2025 09:23:51 GMT" }, { "request": { @@ -94,7 +94,7 @@ "message": "Bad Request" } }, - "recorded_at": "Tue, 02 Dec 2025 17:12:00 GMT" + "recorded_at": "Wed, 10 Dec 2025 09:23:51 GMT" }, { "request": { @@ -105,7 +105,7 @@ ] }, "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": { @@ -118,7 +118,7 @@ "message": "No Content" } }, - "recorded_at": "Tue, 02 Dec 2025 17:12:00 GMT" + "recorded_at": "Wed, 10 Dec 2025 09:23:51 GMT" }, { "request": { @@ -129,7 +129,7 @@ ] }, "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": { @@ -142,7 +142,7 @@ "message": "No Content" } }, - "recorded_at": "Tue, 02 Dec 2025 17:12:00 GMT" + "recorded_at": "Wed, 10 Dec 2025 09:23:51 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/deployment_gates/Get-deployment-rule-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/deployment_gates/Get-deployment-rule-returns-OK-response.frozen index d03936e1d..3a24fa140 100644 --- a/tests/scenarios/cassettes/v2/deployment_gates/Get-deployment-rule-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v2/deployment_gates/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/scenarios/cassettes/v2/deployment_gates/Get-deployment-rule-returns-OK-response.json b/tests/scenarios/cassettes/v2/deployment_gates/Get-deployment-rule-returns-OK-response.json index dcf07b295..1b438e43d 100644 --- a/tests/scenarios/cassettes/v2/deployment_gates/Get-deployment-rule-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/deployment_gates/Get-deployment-rule-returns-OK-response.json @@ -3,7 +3,7 @@ { "request": { "body": { - "string": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}", + "string": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate-testgetdeploymentrulereturnsokresponse1765358631\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}", "encoding": null }, "headers": { @@ -19,7 +19,7 @@ }, "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 Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "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\"}}}}", "encoding": null }, "headers": { @@ -32,7 +32,7 @@ "message": "OK" } }, - "recorded_at": "Tue, 02 Dec 2025 17:12:01 GMT" + "recorded_at": "Wed, 10 Dec 2025 09:23:51 GMT" }, { "request": { @@ -49,11 +49,11 @@ ] }, "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 Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "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\"}}}}", "encoding": null }, "headers": { @@ -66,7 +66,7 @@ "message": "OK" } }, - "recorded_at": "Tue, 02 Dec 2025 17:12:01 GMT" + "recorded_at": "Wed, 10 Dec 2025 09:23:51 GMT" }, { "request": { @@ -77,11 +77,11 @@ ] }, "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 Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "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\"}}}}", "encoding": null }, "headers": { @@ -94,7 +94,7 @@ "message": "OK" } }, - "recorded_at": "Tue, 02 Dec 2025 17:12:01 GMT" + "recorded_at": "Wed, 10 Dec 2025 09:23:51 GMT" }, { "request": { @@ -105,7 +105,7 @@ ] }, "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": { @@ -118,7 +118,7 @@ "message": "No Content" } }, - "recorded_at": "Tue, 02 Dec 2025 17:12:01 GMT" + "recorded_at": "Wed, 10 Dec 2025 09:23:51 GMT" }, { "request": { @@ -129,7 +129,7 @@ ] }, "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": { @@ -142,7 +142,7 @@ "message": "No Content" } }, - "recorded_at": "Tue, 02 Dec 2025 17:12:01 GMT" + "recorded_at": "Wed, 10 Dec 2025 09:23:51 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/deployment_gates/Update-deployment-gate-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/deployment_gates/Update-deployment-gate-returns-OK-response.frozen index 363a2cef5..9f4cffa66 100644 --- a/tests/scenarios/cassettes/v2/deployment_gates/Update-deployment-gate-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v2/deployment_gates/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/scenarios/cassettes/v2/deployment_gates/Update-deployment-gate-returns-OK-response.json b/tests/scenarios/cassettes/v2/deployment_gates/Update-deployment-gate-returns-OK-response.json index 27bdc2e5e..b00c6cd07 100644 --- a/tests/scenarios/cassettes/v2/deployment_gates/Update-deployment-gate-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/deployment_gates/Update-deployment-gate-returns-OK-response.json @@ -3,7 +3,7 @@ { "request": { "body": { - "string": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}", + "string": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate-testupdatedeploymentgatereturnsokresponse1765358632\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}", "encoding": null }, "headers": { @@ -19,7 +19,7 @@ }, "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 Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "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\"}}}}", "encoding": null }, "headers": { @@ -32,7 +32,7 @@ "message": "OK" } }, - "recorded_at": "Tue, 02 Dec 2025 17:12:02 GMT" + "recorded_at": "Wed, 10 Dec 2025 09:23:52 GMT" }, { "request": { @@ -49,11 +49,11 @@ ] }, "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 Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "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\"}}}}", "encoding": null }, "headers": { @@ -66,7 +66,7 @@ "message": "OK" } }, - "recorded_at": "Tue, 02 Dec 2025 17:12:02 GMT" + "recorded_at": "Wed, 10 Dec 2025 09:23:52 GMT" }, { "request": { @@ -77,7 +77,7 @@ ] }, "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": { @@ -90,7 +90,7 @@ "message": "No Content" } }, - "recorded_at": "Tue, 02 Dec 2025 17:12:02 GMT" + "recorded_at": "Wed, 10 Dec 2025 09:23:52 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/deployment_gates/Update-deployment-rule-returns-Bad-Request-response.frozen b/tests/scenarios/cassettes/v2/deployment_gates/Update-deployment-rule-returns-Bad-Request-response.frozen index 742e9ca60..2f1e7eeb8 100644 --- a/tests/scenarios/cassettes/v2/deployment_gates/Update-deployment-rule-returns-Bad-Request-response.frozen +++ b/tests/scenarios/cassettes/v2/deployment_gates/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/scenarios/cassettes/v2/deployment_gates/Update-deployment-rule-returns-Bad-Request-response.json b/tests/scenarios/cassettes/v2/deployment_gates/Update-deployment-rule-returns-Bad-Request-response.json index 026af610a..294c2fea8 100644 --- a/tests/scenarios/cassettes/v2/deployment_gates/Update-deployment-rule-returns-Bad-Request-response.json +++ b/tests/scenarios/cassettes/v2/deployment_gates/Update-deployment-rule-returns-Bad-Request-response.json @@ -3,7 +3,7 @@ { "request": { "body": { - "string": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}", + "string": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate-testupdatedeploymentrulereturnsbadrequestresponse1765358632\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}", "encoding": null }, "headers": { @@ -19,7 +19,7 @@ }, "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 Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "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\"}}}}", "encoding": null }, "headers": { @@ -32,7 +32,7 @@ "message": "OK" } }, - "recorded_at": "Tue, 02 Dec 2025 17:12:02 GMT" + "recorded_at": "Wed, 10 Dec 2025 09:23:52 GMT" }, { "request": { @@ -49,11 +49,11 @@ ] }, "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 Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "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\"}}}}", "encoding": null }, "headers": { @@ -66,7 +66,7 @@ "message": "OK" } }, - "recorded_at": "Tue, 02 Dec 2025 17:12:02 GMT" + "recorded_at": "Wed, 10 Dec 2025 09:23:52 GMT" }, { "request": { @@ -100,7 +100,7 @@ "message": "Bad Request" } }, - "recorded_at": "Tue, 02 Dec 2025 17:12:02 GMT" + "recorded_at": "Wed, 10 Dec 2025 09:23:52 GMT" }, { "request": { @@ -111,7 +111,7 @@ ] }, "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": { @@ -124,7 +124,7 @@ "message": "No Content" } }, - "recorded_at": "Tue, 02 Dec 2025 17:12:02 GMT" + "recorded_at": "Wed, 10 Dec 2025 09:23:52 GMT" }, { "request": { @@ -135,7 +135,7 @@ ] }, "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": { @@ -148,7 +148,7 @@ "message": "No Content" } }, - "recorded_at": "Tue, 02 Dec 2025 17:12:02 GMT" + "recorded_at": "Wed, 10 Dec 2025 09:23:52 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/deployment_gates/Update-deployment-rule-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/deployment_gates/Update-deployment-rule-returns-OK-response.frozen index e8ff3a3f0..aceddb95a 100644 --- a/tests/scenarios/cassettes/v2/deployment_gates/Update-deployment-rule-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v2/deployment_gates/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/scenarios/cassettes/v2/deployment_gates/Update-deployment-rule-returns-OK-response.json b/tests/scenarios/cassettes/v2/deployment_gates/Update-deployment-rule-returns-OK-response.json index 1a37997ff..248887f5b 100644 --- a/tests/scenarios/cassettes/v2/deployment_gates/Update-deployment-rule-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/deployment_gates/Update-deployment-rule-returns-OK-response.json @@ -3,7 +3,7 @@ { "request": { "body": { - "string": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}", + "string": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate-testupdatedeploymentrulereturnsokresponse1765358632\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}", "encoding": null }, "headers": { @@ -19,7 +19,7 @@ }, "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 Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "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\"}}}}", "encoding": null }, "headers": { @@ -32,7 +32,7 @@ "message": "OK" } }, - "recorded_at": "Tue, 02 Dec 2025 17:12:03 GMT" + "recorded_at": "Wed, 10 Dec 2025 09:23:52 GMT" }, { "request": { @@ -49,11 +49,11 @@ ] }, "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 Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "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\"}}}}", "encoding": null }, "headers": { @@ -66,7 +66,7 @@ "message": "OK" } }, - "recorded_at": "Tue, 02 Dec 2025 17:12:03 GMT" + "recorded_at": "Wed, 10 Dec 2025 09:23:52 GMT" }, { "request": { @@ -83,11 +83,11 @@ ] }, "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 Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "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\"}}}}", "encoding": null }, "headers": { @@ -100,7 +100,7 @@ "message": "OK" } }, - "recorded_at": "Tue, 02 Dec 2025 17:12:03 GMT" + "recorded_at": "Wed, 10 Dec 2025 09:23:52 GMT" }, { "request": { @@ -111,7 +111,7 @@ ] }, "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": { @@ -124,7 +124,7 @@ "message": "No Content" } }, - "recorded_at": "Tue, 02 Dec 2025 17:12:03 GMT" + "recorded_at": "Wed, 10 Dec 2025 09:23:52 GMT" }, { "request": { @@ -135,7 +135,7 @@ ] }, "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": { @@ -148,7 +148,7 @@ "message": "No Content" } }, - "recorded_at": "Tue, 02 Dec 2025 17:12:03 GMT" + "recorded_at": "Wed, 10 Dec 2025 09:23:52 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/features/v1/dashboards.feature b/tests/scenarios/features/v1/dashboards.feature index 3eeebebdc..588c609ce 100644 --- a/tests/scenarios/features/v1/dashboards.feature +++ b/tests/scenarios/features/v1/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/scenarios/features/v2/given.json b/tests/scenarios/features/v2/given.json index ad563ffc7..a6a148f26 100644 --- a/tests/scenarios/features/v2/given.json +++ b/tests/scenarios/features/v2/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",