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

Fix validation of Agent deps when using single check #8461

Merged
merged 3 commits into from
Jan 26, 2021

Conversation

florimondmanca
Copy link
Contributor

@florimondmanca florimondmanca commented Jan 26, 2021

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

Copy link
Member

@mgarabed mgarabed left a comment

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.

…e/dep.py

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

@mgarabed Sure. 👍

@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