Msiexec tag array#661
Merged
mx-psi merged 3 commits intoDataDog:masterfrom Oct 15, 2020
Merged
Conversation
added 2 commits
October 14, 2020 17:30
…exec opens a gui error message and hangs the puppet run when the $tags array has more than one member.
mx-psi
suggested changes
Oct 15, 2020
Member
There was a problem hiding this comment.
Thanks for your PR, we definitely missed that! The logic looks good to me, but you will need the linters to pass in order for us to merge this. You can run them using bundle exec rake test as stated by this guide. In particular, it seems the syntax linter has two suggestions that you should address:
❯ bundle exec rake test
---> syntax:manifests
---> syntax:templates
---> syntax:hiera:yaml
manifests/windows.pp - WARNING: double quoted string containing no variables on line 14
manifests/windows.pp - WARNING: variable not enclosed in {} on line 15
Contributor
Author
|
Noted, apologies I should have linted before submitting, PR updated with required lint changes. |
mx-psi
approved these changes
Oct 15, 2020
Member
mx-psi
left a comment
There was a problem hiding this comment.
LGTM now 🚀, thanks for fixing the small issues :)
cegeka-jenkins
pushed a commit
to cegeka/puppet-datadog_agent
that referenced
this pull request
Feb 5, 2026
* Testing an inline transform to fix tag arrays using msiexec * Converting the array to a quoted string separated by commas, else msiexec opens a gui error message and hangs the puppet run when the $tags array has more than one member. * Puppet lint fixes Co-authored-by: Alex Berry <alexb@directferries.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
I spotted a bug with the windows manifest - When the package gets updated with an array of tags, the tags are passed literally on the command line and msiexec opens an interactive help window, hanging puppet.
Motivation
It broke our release (we have had an array of tags before, the issue only affected us when the agent got updated).
Additional Notes
Describe your test plan
I branched your module from github to our own repositories, then added it in to our r10k configuration and removed the "mod" declaration from our Puppetfile so that we no longer used the forge version.
I tested as-was, and saw the same error. The error was a result of the following msiexec being run:
Debug: Executing: 'msiexec.exe /qn /norestart /i C:\Windows\temp\datadog-agent-7-7.22.1.amd64.msi /norestart APIKEY=redacted HOSTNAME=websvr3-stag TAGS=["version:Monolith_uk.1.23.0", "env:stag"]'I updated my branch with the code in this PR and ran puppet again, puppet ran successfully and the resultant msiexec was:
Debug: Executing: 'msiexec.exe /qn /norestart /i C:\Windows\temp\datadog-agent-7-7.22.1.amd64.msi /norestart APIKEY=redacted HOSTNAME=websvr3-stag TAGS="version:Monolith_uk.1.23.0,env:stag"'Finally I updated my branch to remove the second tag, to ensure the functionality works properly with a single member, and the resultant msiexec was:
Debug: Executing: 'msiexec.exe /qn /norestart /i C:\Windows\temp\datadog-agent-7-7.22.1.amd64.msi /norestart APIKEY=redacted HOSTNAME=websvr3-stag TAGS="version:Monolith_uk.1.23.0"'Output from both step 3 (array of tags containing more than 1 member) and step 4 (array of tags containing a single member) conforms to datadog's own command-line installation documentation for windows.