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 typo detection for config field aliases #12468

Merged

Conversation

FlorentClarret
Copy link
Member

@FlorentClarret FlorentClarret commented Jul 7, 2022

What does this PR do?

  • Take the aliases when looking for typos in the config options
  • Update the test case to check the return value
  • Update the test case to also verify aliases are taken into account

Motivation

https://datadoghq.atlassian.net/browse/AI-2362

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

@codecov
Copy link

codecov bot commented Jul 7, 2022

Codecov Report

Merging #12468 (719c418) into master (8e68b0f) will increase coverage by 0.04%.
The diff coverage is 100.00%.

Flag Coverage Δ
arangodb 98.21% <ø> (ø)
avi_vantage 91.92% <ø> (ø)
azure_iot_edge 82.00% <ø> (ø)
cilium 75.34% <ø> (+0.93%) ⬆️
citrix_hypervisor 87.50% <ø> (ø)
linux_proc_extras 96.22% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@FlorentClarret FlorentClarret force-pushed the florentclarret/AI-2362-typo-detection-config-field-alias branch from 1bebd4e to e648c2f Compare July 7, 2022 12:07
@FlorentClarret FlorentClarret changed the title Take aliases into account when looking for typo in options Take aliases into account when looking for typos in options Jul 7, 2022
@FlorentClarret FlorentClarret force-pushed the florentclarret/AI-2362-typo-detection-config-field-alias branch 2 times, most recently from bf10f28 to a689154 Compare July 7, 2022 12:15
@FlorentClarret FlorentClarret force-pushed the florentclarret/AI-2362-typo-detection-config-field-alias branch from a689154 to 86aa1cf Compare July 7, 2022 12:27
@FlorentClarret FlorentClarret changed the title Take aliases into account when looking for typos in options Fix typo detection for config field aliases Jul 7, 2022
@FlorentClarret FlorentClarret force-pushed the florentclarret/AI-2362-typo-detection-config-field-alias branch from f86a2a1 to e46187c Compare July 7, 2022 15:59
@FlorentClarret FlorentClarret force-pushed the florentclarret/AI-2362-typo-detection-config-field-alias branch from e46187c to 1164484 Compare July 7, 2022 16:00
@FlorentClarret FlorentClarret marked this pull request as ready for review July 8, 2022 06:18
@FlorentClarret FlorentClarret requested review from a team as code owners July 8, 2022 06:18
@FlorentClarret FlorentClarret force-pushed the florentclarret/AI-2362-typo-detection-config-field-alias branch from dfb945e to fe169eb Compare July 8, 2022 06:27
@FlorentClarret FlorentClarret force-pushed the florentclarret/AI-2362-typo-detection-config-field-alias branch from fe169eb to d1602ee Compare July 8, 2022 06:41
@FlorentClarret FlorentClarret force-pushed the florentclarret/AI-2362-typo-detection-config-field-alias branch from 2440622 to 5e9e369 Compare July 8, 2022 07:36
Copy link
Contributor

@sarah-witt sarah-witt left a comment

Choose a reason for hiding this comment

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

Awesome!

@FlorentClarret FlorentClarret requested a review from sarah-witt July 8, 2022 13:59
@FlorentClarret FlorentClarret force-pushed the florentclarret/AI-2362-typo-detection-config-field-alias branch from d965ecc to 1ae00a2 Compare July 8, 2022 14:15
@FlorentClarret FlorentClarret force-pushed the florentclarret/AI-2362-typo-detection-config-field-alias branch from e7c3562 to 719c418 Compare July 11, 2022 06:36
@FlorentClarret FlorentClarret merged commit 21e60eb into master Jul 11, 2022
@FlorentClarret FlorentClarret deleted the florentclarret/AI-2362-typo-detection-config-field-alias branch July 11, 2022 14:01
github-actions bot pushed a commit that referenced this pull request Jul 11, 2022
* Test the typos returned by the log_typos_in_options method

* Take aliases into account when looking for typos in options

* Fix for Python 2

* Run black

* Ugly fix for Python 2 tests

* Run black

* Fix for mypy

* Add a unit test with a typo in an alias

* Move imports 21e60eb
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.

2 participants