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

chore(internal): fix CI Visibility usage of the core API #9162

Merged
merged 14 commits into from May 15, 2024

Conversation

brettlangdon
Copy link
Member

@brettlangdon brettlangdon commented May 6, 2024

Fixes some small inconsistencies with the core api usage in CI Visibility.

  1. A call to dispatch_with_results when no value is expected to be returned (small performance optimization to avoid building a results dictionary when it isn't needed).
  2. A call to dispatch_with_results which would not return the underlying listener value
    a. (I think it would always return a falsey value since it should have been returning the core._MissingEvent EventResult which is falsey and which has a value of None... ?)

I am not sure which tests should be evaluated/updated, since I am surprised there weren't any failing tests before, there should have been.

Checklist

  • Change(s) are motivated and described in the PR description
  • Testing strategy is described if automated tests are not included in the PR
  • Risks are described (performance impact, potential for breakage, maintainability)
  • Change is maintainable (easy to change, telemetry, documentation)
  • Library release note guidelines are followed or label changelog/no-changelog is set
  • Documentation is included (in-code, generated user docs, public corp docs)
  • Backport labels are set (if applicable)
  • If this PR changes the public interface, I've notified @DataDog/apm-tees.

Reviewer Checklist

  • Title is accurate
  • All changes are related to the pull request's stated goal
  • Description motivates each change
  • Avoids breaking API changes
  • Testing strategy adequately addresses listed risks
  • Change is maintainable (easy to change, telemetry, documentation)
  • Release note makes sense to a user of the library
  • Author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment
  • Backport labels are set in a manner that is consistent with the release branch maintenance policy

@brettlangdon brettlangdon added the changelog/no-changelog A changelog entry is not required for this PR. label May 6, 2024
@brettlangdon brettlangdon requested a review from a team as a code owner May 6, 2024 13:19
Copy link
Collaborator

@emmettbutler emmettbutler left a comment

Choose a reason for hiding this comment

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

Oh yeah, it's not clear at all to me why this isn't causing test_is_item_itr_skippable_test_level to fail in current main. This change does look more correct, though.

@pr-commenter
Copy link

pr-commenter bot commented May 7, 2024

Benchmarks

Benchmark execution time: 2024-05-15 08:23:13

Comparing candidate commit 197c676 in PR branch brettlangdon/fix.ci.core.api.usage with baseline commit 5148d18 in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 209 metrics, 9 unstable metrics.

@brettlangdon brettlangdon enabled auto-merge (squash) May 7, 2024 17:26
@brettlangdon brettlangdon requested review from romainkomorndatadog and removed request for tonyredondo May 13, 2024 19:28
Copy link
Collaborator

@romainkomorndatadog romainkomorndatadog left a comment

Choose a reason for hiding this comment

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

These (the settings request) aren't in use yet so they're not tested (and, clearly, not working either).

edit: the external API is_item_itr_skippable() static method (that ends up calling core.dispatch_with_results("ci_visibility.itr.is_item_skippable") itself) is also not tested yet.

test_is_item_itr_skippable_test_level is directly testing the CIVisibility.is_item_itr_skippable() function directly (which is why it's in test_ci_visibility.py), so any changes in this PR wouldn't affect its results.

I'll take over the PR.

@romainkomorndatadog romainkomorndatadog self-assigned this May 14, 2024
@romainkomorndatadog
Copy link
Collaborator

Renaming this to a chore because this API isn't released yet, so it's not a "fix".

@romainkomorndatadog romainkomorndatadog changed the title fix(internal): fix CI Visibility usage of the core API chore(internal): fix CI Visibility usage of the core API May 14, 2024
@brettlangdon brettlangdon merged commit 9eccfec into main May 15, 2024
113 of 114 checks passed
@brettlangdon brettlangdon deleted the brettlangdon/fix.ci.core.api.usage branch May 15, 2024 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog/no-changelog A changelog entry is not required for this PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants