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.