Skip to content
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

[dd-agent][windows] Fix agent version pinning #400

Merged
merged 1 commit into from Feb 3, 2017

Conversation

Projects
None yet
3 participants
@olivielpeau
Copy link
Member

olivielpeau commented Feb 3, 2017

When the agent_version attribute is a string. Bug introduced in #368

Also added the test that would've caught the bug.

I'll release a bugfix version once this is merged.

[dd-agent][windows] Fix agent version pinning
When the `agent_version` attribute is a string.

Also added the test that would've caught the bug

@olivielpeau olivielpeau added the bug label Feb 3, 2017

@olivielpeau olivielpeau added this to the 2.8.1 milestone Feb 3, 2017

@olivielpeau olivielpeau requested a review from degemer Feb 3, 2017

@degemer

degemer approved these changes Feb 3, 2017

@olivielpeau olivielpeau merged commit 8878846 into master Feb 3, 2017

2 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@olivielpeau olivielpeau deleted the olivielpeau/fix-windows-agent-pinning branch Feb 3, 2017

@mlcooper

This comment has been minimized.

Copy link
Contributor

mlcooper commented Feb 6, 2017

Hi @olivielpeau I'm not sure I see what the fix was that you implemented, or what the bug was. Was there an error message produced? I do see a new spec test, but I do not see any code fixes in the cookbook. Perhaps I'm missing something?

@olivielpeau

This comment has been minimized.

Copy link
Member Author

olivielpeau commented Feb 6, 2017

Hi @mlcooper, the issue was the typo on the attribute key, fixed here: https://github.com/DataDog/chef-datadog/blob/v2.8.1/recipes/_install-windows.rb#L24

It made the cookbook miss the agent_version attribute when specified as a string on windows, and always install the latest version of the Agent instead of the pinned version.

@mlcooper

This comment has been minimized.

Copy link
Contributor

mlcooper commented Feb 6, 2017

I see it now, thanks. Sorry about that typo, thanks for catching it.

@olivielpeau

This comment has been minimized.

Copy link
Member Author

olivielpeau commented Feb 6, 2017

No problem! I think what really bit us here is that there had never been a test on the version pinning on Windows

@mlcooper

This comment has been minimized.

Copy link
Contributor

mlcooper commented Feb 6, 2017

@olivielpeau

This comment has been minimized.

Copy link
Member Author

olivielpeau commented Feb 6, 2017

No unfortunately this test only checks when the agent_version is provided as a hash, and there was no test checking the case when the agent_version is provided as a string on Windows (there was one on Linux).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.