-
Notifications
You must be signed in to change notification settings - Fork 262
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
[monitor] fix issues with directory creation on windows #678
Conversation
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.
LGTM, we can simplify the conditionals (there's one branch which cannot ever happen)
resources/monitor.rb
Outdated
group 'dd-agent' | ||
mode '755' | ||
if node['platform_family'] == 'windows' | ||
if Chef::Datadog.agent_major_version(node) > 5 |
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.
I think this check is not needed, we're already in the Chef::Datadog.agent_major_version(node) != 5
branch
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.
Yes, this is exactly what I was talking about, I hadn't even bother checking the logic, thanks.
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.
LGTM now, not sure if we want to do the metadata version bump on this particular PR, or if you prefer to make a release PR where you do that sort of thing. Up to you, obviously. 🙇
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.
LGTM! If you could just remove the metadata update, I'll take care of the releasing. We usually do it in a separate PR to update the changelog too.
There was a bit of copy/paste going on here, so I'm sure this can be fixed in a cleaner way. I'll let you guys take the PR over, but it should be fixed as this is currently broken on windows.