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

Added support for the "Not" Operator #195

Merged
merged 21 commits into from
Dec 18, 2023
Merged

Conversation

aldrickdev
Copy link
Contributor

Requirements for Contributing to this repository

  • Fill out the template below. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • The pull request must only fix one issue, or add one feature, at the time.
  • The pull request must update the test suite to demonstrate the changed functionality.
  • After you create the pull request, all status checks must be pass before a maintainer reviews your contribution. For more details, please see CONTRIBUTING.

What does this PR do?

This PR adds support for the Not Operator when defining the filter for a particular resource.

This was in response to question that was brought up by a Support Engineer where their client asked if the tool supported the the Not operation. This wasn't supported but was determined that it was a useful option to have.

Description of the Change

The change for this was to basically, invert the boolean result that was generated when we compared the default regex (Exact Match) to the resource attribute.

Alternate Designs

Possible Drawbacks

Verification Process

To verify that the change is working as intended, I manually made sure that when using the new operator, that I received the expected results.

I also added additional tests that would confirm that the Not Operator was working as intended. I took all of the tests that verified the filtering behavior and then created inverse versions of them.

Additional Notes

Release Notes

Review checklist (to be filled by reviewers)

  • Feature or bug fix MUST have appropriate tests (unit, integration, etc...)
  • 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 one changelog/ label attached. If applicable it should have the backward-incompatible label attached.
  • PR should not have do-not-merge/ label attached.
  • If Applicable, issue must have kind/ and severity/ labels attached at least.

@aldrickdev aldrickdev requested a review from a team as a code owner December 7, 2023 20:10
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
datadog_sync/utils/filter.py Show resolved Hide resolved
datadog_sync/utils/filter.py Outdated Show resolved Hide resolved
aldrickdev and others added 8 commits December 8, 2023 10:46
Co-authored-by: skarimo <40482491+skarimo@users.noreply.github.com>
Co-authored-by: skarimo <40482491+skarimo@users.noreply.github.com>
Co-authored-by: skarimo <40482491+skarimo@users.noreply.github.com>
Co-authored-by: skarimo <40482491+skarimo@users.noreply.github.com>
Co-authored-by: skarimo <40482491+skarimo@users.noreply.github.com>
…sts to make sure that regex inputs work with the not operator
datadog_sync/utils/filter.py Outdated Show resolved Hide resolved
datadog_sync/utils/filter.py Outdated Show resolved Hide resolved
aldrickdev and others added 2 commits December 15, 2023 15:39
Co-authored-by: skarimo <40482491+skarimo@users.noreply.github.com>
Co-authored-by: skarimo <40482491+skarimo@users.noreply.github.com>
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
aldrickdev and others added 2 commits December 18, 2023 14:20
Co-authored-by: skarimo <40482491+skarimo@users.noreply.github.com>
@skarimo skarimo merged commit 92cef1e into main Dec 18, 2023
7 checks passed
@skarimo skarimo deleted the aldrick_castro/add_not_operator branch December 18, 2023 20:28
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