-
Notifications
You must be signed in to change notification settings - Fork 260
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
Remove source file and datadog-signing-keys package when removing the Agent #865
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.
Hey 👋 this mostly looks good, but I left some minor comments to address. Thanks!
libraries/recipe_helpers.rb
Outdated
@@ -7,6 +7,11 @@ class << self | |||
datadog-iot-agent | |||
].freeze | |||
|
|||
# This method stores a variable that is used across recipes so we needed a place to define it |
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.
Another potential place to store a variable like this might be https://github.com/DataDog/chef-datadog/blob/main/attributes/default.rb, but that would also mean users could change it, which we don't want, so I think it's ok to have it defined here. Perhaps you could expand this comment to note the reason why this is not in default.rb
?
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.
Right, that'd be clearer ! Fixed in 399a428.
recipes/remove-dd-agent.rb
Outdated
|
||
# Then remove the installation files (depending on the OS: sources_list file, datadog-signing-keys package...) | ||
case node['platform_family'] | ||
when 'amazon', 'rhel' # 'rhel' includes redhat, centos, rocky, scientific and almalinux |
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 you're missing fedora
here, this should match https://github.com/DataDog/chef-datadog/blob/main/recipes/repository.rb#L165
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.
Forgot to put it back, mb ! Fixed in 5c87ee8.
This PR fixes #847 .
This PR also adds some tests to check that once deleting the Agent, the source file and the
datadog-signing-keys
package are also removed from the host.