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

Add Agent 7 support #40

Merged
merged 3 commits into from
Nov 15, 2019
Merged

Add Agent 7 support #40

merged 3 commits into from
Nov 15, 2019

Conversation

KSerrania
Copy link
Contributor

What does this PR do?

Changes the formula to support the Agent v7 distribution channels (apt & yum repositories).
latest will now point to the latest package in the 7 channel.
Updates documentation to include v7.

Motivation

Add support for the upcoming Agent v7.

@@ -38,7 +38,7 @@ datadog_{{ check_name }}_yaml_installed:
- context:
check_name: {{ check_name }}

{%- if latest_agent_version or parsed_version[1] == '6' %}
{%- if latest_agent_version or parsed_version[1] != '5' %}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this fine, or would it be safer to only explicitly include Agent 6 and 7, like this:

{%- if latest_agent_version or parsed_version[1] == '6' or parsed_version[1] == '7' %}

in case someone tries to install Agent v4 (which is highly unlikely)?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For chef I did .to_i > 5, because in ruby that's short and it handles nil gracefully (casts to 0). But I wouldn't worry about Agent 4.

Copy link
Contributor

@albertvaka albertvaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't tested it but LGTM. We should QA the final version before a release.

@@ -38,7 +38,7 @@ datadog_{{ check_name }}_yaml_installed:
- context:
check_name: {{ check_name }}

{%- if latest_agent_version or parsed_version[1] == '6' %}
{%- if latest_agent_version or parsed_version[1] != '5' %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For chef I did .to_i > 5, because in ruby that's short and it handles nil gracefully (casts to 0). But I wouldn't worry about Agent 4.

README.rst Outdated Show resolved Hide resolved
@KSerrania KSerrania marked this pull request as ready for review November 8, 2019 09:34
Co-Authored-By: Albert Vaca <albert.vaca@datadoghq.com>
README.rst Outdated Show resolved Hide resolved
Co-Authored-By: Olivier Vielpeau <olivielpeau@users.noreply.github.com>
@KSerrania KSerrania merged commit a00ffd3 into 3.x Nov 15, 2019
@KSerrania KSerrania deleted the kserrania/agent-7-support branch November 15, 2019 08:56
@KSerrania KSerrania mentioned this pull request Nov 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants