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 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/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 { 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",