From 71d0a3695cea21d521af207898c87313ddbe34f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Bavelier?= <97530782+tbavelier@users.noreply.github.com> Date: Wed, 9 Apr 2025 16:18:40 +0200 Subject: [PATCH 1/3] [AGENT-13568] Explicitly convert matches instead of type casting (#856) * Explicitly convert matches instead of type casting * explicitly use 10 radix to avoid potential false radix detection --- manifests/init.pp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index f4fdf417..b402b30b 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -371,12 +371,12 @@ ) inherits datadog_agent::params { #In this regex, version '1:6.15.0~rc.1-1' would match as $1='1:', $2='6', $3='15', $4='0', $5='~rc.1', $6='1' if $agent_version != 'latest' and $agent_version =~ /([0-9]+:)?([0-9]+)\.([0-9]+)\.([0-9]+)((?:~|-)[^0-9\s-]+[^-\s]*)?(?:-([0-9]+))?/ { - $_agent_major_version = 0 + $2 # Cast to integer + $_agent_major_version = Integer($2, 10) if $agent_major_version != undef and $agent_major_version != $_agent_major_version { fail('Provided and deduced agent_major_version don\'t match') } - $_agent_minor_version = 0 + $3 - $_agent_patch_version = 0 + $4 + $_agent_minor_version = Integer($3, 10) + $_agent_patch_version = Integer($4, 10) } elsif $agent_major_version != undef { $_agent_major_version = $agent_major_version } else { From 237b1cdbb1de976bdf77ded56c044c71e5616d09 Mon Sep 17 00:00:00 2001 From: Spencer Gilbert Date: Thu, 10 Apr 2025 07:32:52 -0400 Subject: [PATCH 2/3] Remove agent-delivery from CODEOWNERS (#858) --- .github/CODEOWNERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 4ba5a126..aecb092e 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,4 +1,4 @@ -* @DataDog/container-ecosystems @DataDog/agent-delivery +* @DataDog/container-ecosystems # Docs -*README.md @DataDog/container-ecosystems @DataDog/agent-delivery @DataDog/documentation +*README.md @DataDog/container-ecosystems @DataDog/documentation From 29b68f08e3ee484d5100599b5ca6d8b4bfc545f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Bavelier?= <97530782+tbavelier@users.noreply.github.com> Date: Thu, 10 Apr 2025 14:19:16 +0200 Subject: [PATCH 3/3] [Release] 4.0.2 (#857) * update changelog and metadata --- CHANGELOG.md | 5 +++++ metadata.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 48248bd3..9208ec48 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ Changes +# 4.0.2 / 2025-04-10 + +* [CHORE] Explicitly convert matches in `agent_version` to integers instead of type casting ([#856]) to avoid warnings. + # 4.0.1 / 2025-04-03 * [BUGFIX] Bump uri from 1.0.2 to 1.0.3 ([#846]). @@ -989,6 +993,7 @@ Please read the [docs]() for more details. [#848]: https://github.com/DataDog/puppet-datadog-agent/issues/848 [#851]: https://github.com/DataDog/puppet-datadog-agent/issues/851 [#852]: https://github.com/DataDog/puppet-datadog-agent/issues/852 +[#856]: https://github.com/DataDog/puppet-datadog-agent/issues/856 [@Aramack]: https://github.com/Aramack [@BIAndrews]: https://github.com/BIAndrews [@ChannoneArif-nbcuni]: https://github.com/ChannoneArif-nbcuni diff --git a/metadata.json b/metadata.json index eaf35455..df6d85e1 100644 --- a/metadata.json +++ b/metadata.json @@ -1,6 +1,6 @@ { "name": "datadog-datadog_agent", - "version": "4.0.1", + "version": "4.0.2", "author": "James Turnbull , Rob Terhaar , Jaime Fullaondo , Albert Vaca ", "summary": "Install the Datadog monitoring agent and report Puppet runs to Datadog", "license": "Apache-2.0",