-
Notifications
You must be signed in to change notification settings - Fork 223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[windows] Fix idempotence when reinstalling same pinned version #269
Merged
Merged
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On Chef we use
agent status
for this: https://github.com/DataDog/chef-datadog/blob/483f88a43569b1efd00e7d5c0cb1e479eb09b1a2/libraries/recipe_helpers.rb#L92I'm not sure which approach is better, but I think we shouldn't have two.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Chef approach is slightly better because it would work with rc and beta builds.
However, contrary to this method, it does have a caveat: it only works if you know where the Agent binary is located at (Chef expects it to be
C:/Program Files/Datadog/Datadog Agent/bin/agent
).One thing to note is that we currently don't offer the possibility to choose the application directory for Windows install; we do have a
datadog_agent_binary_path_windows
parameter, but it's not advertised in the README (and thus I suppose it's an internal parameter) and only used for the integration command, so we could use this option here to useagent status
(that way people can still configure it for their use case if needed).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we have a variable for the Agent path, then I think using that to call the binary is reasonable (assuming we won't change the output of
agent status
).I'm not sure this is necessarily better than your approach, though. I would still sync with @kbogtob, who wrote the Chef code I linked before, to discuss pros and cons of both approaches.