Skip to content

Fix validation of Agent deps when using single check - #8461

Merged
florimondmanca merged 3 commits into
masterfrom
fm/agent-dep-val-single
Jan 26, 2021
Merged

Fix validation of Agent deps when using single check#8461
florimondmanca merged 3 commits into
masterfrom
fm/agent-dep-val-single

Conversation

@florimondmanca

@florimondmanca florimondmanca commented Jan 26, 2021

Copy link
Copy Markdown
Contributor

What does this PR do?

Fix behavior of ddev validate dep <check>

Motivation

Found during QA for #8297

Currently $ ddev validate dep nginx fails with a large list of errors:

$ ddev validate dep nginx
Stale dependency needs to be removed by syncing: adodbapi
Stale dependency needs to be removed by syncing: aerospike
Stale dependency needs to be removed by syncing: aws-requests-auth
[...]
Stale dependency needs to be removed by syncing: uptime
Stale dependency needs to be removed by syncing: vertica-python
Stale dependency needs to be removed by syncing: win-inet-pton

This is because when passing a <check>, we currently still validate check_dependencies (which only contains the deps for <check>, rather than the set of all deps for all checks) against agent_dependencies (which contains all dependencies shipped in the Agent).

Instead, I think we should just skip this verification when passing a <check>. If the dependencies for <check> does contain an out-of-sync dependency compared to Agent deps, then we'll notice during the "all checks" run of this job anyway.

With this PR, the validation passes.

Additional Notes

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • PR title must be written as a CHANGELOG entry (see why)
  • Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
  • PR must have changelog/ and integration/ labels attached

@mgarabed mgarabed left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍 Good update - minor formatting nit.

Comment thread datadog_checks_dev/datadog_checks/dev/tooling/commands/validate/dep.py Outdated
…e/dep.py

Co-authored-by: Mike Garabedian <mike.garabedian@datadoghq.com>
@florimondmanca

Copy link
Copy Markdown
Contributor Author

@mgarabed Sure. 👍

Comment thread datadog_checks_dev/datadog_checks/dev/tooling/commands/validate/dep.py Outdated
@florimondmanca
florimondmanca merged commit 18dbd34 into master Jan 26, 2021
@florimondmanca
florimondmanca deleted the fm/agent-dep-val-single branch January 26, 2021 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants