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

ci: add ITR unskippable marker if subprocess marker is used #9261

Conversation

romainkomorndatadog
Copy link
Collaborator

@romainkomorndatadog romainkomorndatadog commented May 14, 2024

This works around an issue where tests are improperly being skipped due to issues collecting coverage data using coverage.py when subprocess is used.

Whenever the subprocess marker is seen during collection, we add the same skipif marker that's used to mark tests as unskippable, which makes pytest run the tests no matter what.

This ends up with tests being forced to run and the test.itr.unskippable tag being set to true:
image

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

@romainkomorndatadog romainkomorndatadog self-assigned this May 14, 2024
@romainkomorndatadog romainkomorndatadog requested a review from a team as a code owner May 14, 2024 16:06
@romainkomorndatadog romainkomorndatadog added changelog/no-changelog A changelog entry is not required for this PR. backport 2.7 labels May 14, 2024
@datadog-dd-trace-py-rkomorn
Copy link

datadog-dd-trace-py-rkomorn bot commented May 14, 2024

Datadog Report

Branch report: romain.komorn/CIVIS-10031/make_test_unskippable_if_using_subprocess_marker
Commit report: 5fc66f4
Test service: dd-trace-py

✅ 0 Failed, 174286 Passed, 1593 Skipped, 11h 3m 0.11s Total duration (23m 50.68s time saved)

@romainkomorndatadog romainkomorndatadog changed the title ci: add ITR unskippable marker whenever subprocess marker is used ci: add ITR unskippable marker is subprocess marker is used May 14, 2024
@pr-commenter
Copy link

pr-commenter bot commented May 14, 2024

Benchmarks

Benchmark execution time: 2024-05-16 16:38:59

Comparing candidate commit 4f6d960 in PR branch romain.komorn/CIVIS-10031/make_test_unskippable_if_using_subprocess_marker with baseline commit 74932ac in branch main.

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

@romainkomorndatadog romainkomorndatadog enabled auto-merge (squash) May 15, 2024 14:12
@emmettbutler emmettbutler changed the title ci: add ITR unskippable marker is subprocess marker is used ci: add ITR unskippable marker if subprocess marker is used May 15, 2024
romainkomorndatadog and others added 6 commits May 16, 2024 15:08
…g_subprocess_marker' of github.com:DataDog/dd-trace-py into romain.komorn/CIVIS-10031/make_test_unskippable_if_using_subprocess_marker
@romainkomorndatadog romainkomorndatadog merged commit 370b175 into main May 17, 2024
145 checks passed
@romainkomorndatadog romainkomorndatadog deleted the romain.komorn/CIVIS-10031/make_test_unskippable_if_using_subprocess_marker branch May 17, 2024 09:33
github-actions bot pushed a commit that referenced this pull request May 17, 2024
This works around an issue where tests are improperly being skipped due
to issues collecting coverage data using coverage.py when subprocess is
used.

Whenever the subprocess marker is seen during collection, we add the
same skipif marker that's used to mark tests as unskippable, which makes
pytest run the tests no matter what.

This ends up with tests being forced to run and the
`test.itr.unskippable` tag being set to `true`:

![image](https://github.com/DataDog/dd-trace-py/assets/136473744/e189cacf-dbf5-4070-80c7-9584afe7edcc)

## Checklist

- [x] Change(s) are motivated and described in the PR description
- [x] Testing strategy is described if automated tests are not included
in the PR
- [x] Risks are described (performance impact, potential for breakage,
maintainability)
- [x] Change is maintainable (easy to change, telemetry, documentation)
- [x] [Library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
are followed or label `changelog/no-changelog` is set
- [x] Documentation is included (in-code, generated user docs, [public
corp docs](https://github.com/DataDog/documentation/))
- [x] Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))
- [x] If this PR changes the public interface, I've notified
`@DataDog/apm-tees`.

## Reviewer Checklist

- [x] Title is accurate
- [x] All changes are related to the pull request's stated goal
- [x] Description motivates each change
- [x] Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes
- [x] Testing strategy adequately addresses listed risks
- [x] Change is maintainable (easy to change, telemetry, documentation)
- [x] Release note makes sense to a user of the library
- [x] Author has acknowledged and discussed the performance implications
of this PR as reported in the benchmarks PR comment
- [x] Backport labels are set in a manner that is consistent with the
[release branch maintenance
policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)

(cherry picked from commit 370b175)
github-actions bot pushed a commit that referenced this pull request May 17, 2024
This works around an issue where tests are improperly being skipped due
to issues collecting coverage data using coverage.py when subprocess is
used.

Whenever the subprocess marker is seen during collection, we add the
same skipif marker that's used to mark tests as unskippable, which makes
pytest run the tests no matter what.

This ends up with tests being forced to run and the
`test.itr.unskippable` tag being set to `true`:

![image](https://github.com/DataDog/dd-trace-py/assets/136473744/e189cacf-dbf5-4070-80c7-9584afe7edcc)

## Checklist

- [x] Change(s) are motivated and described in the PR description
- [x] Testing strategy is described if automated tests are not included
in the PR
- [x] Risks are described (performance impact, potential for breakage,
maintainability)
- [x] Change is maintainable (easy to change, telemetry, documentation)
- [x] [Library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
are followed or label `changelog/no-changelog` is set
- [x] Documentation is included (in-code, generated user docs, [public
corp docs](https://github.com/DataDog/documentation/))
- [x] Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))
- [x] If this PR changes the public interface, I've notified
`@DataDog/apm-tees`.

## Reviewer Checklist

- [x] Title is accurate
- [x] All changes are related to the pull request's stated goal
- [x] Description motivates each change
- [x] Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes
- [x] Testing strategy adequately addresses listed risks
- [x] Change is maintainable (easy to change, telemetry, documentation)
- [x] Release note makes sense to a user of the library
- [x] Author has acknowledged and discussed the performance implications
of this PR as reported in the benchmarks PR comment
- [x] Backport labels are set in a manner that is consistent with the
[release branch maintenance
policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)

(cherry picked from commit 370b175)
github-actions bot pushed a commit that referenced this pull request May 17, 2024
This works around an issue where tests are improperly being skipped due
to issues collecting coverage data using coverage.py when subprocess is
used.

Whenever the subprocess marker is seen during collection, we add the
same skipif marker that's used to mark tests as unskippable, which makes
pytest run the tests no matter what.

This ends up with tests being forced to run and the
`test.itr.unskippable` tag being set to `true`:

![image](https://github.com/DataDog/dd-trace-py/assets/136473744/e189cacf-dbf5-4070-80c7-9584afe7edcc)

## Checklist

- [x] Change(s) are motivated and described in the PR description
- [x] Testing strategy is described if automated tests are not included
in the PR
- [x] Risks are described (performance impact, potential for breakage,
maintainability)
- [x] Change is maintainable (easy to change, telemetry, documentation)
- [x] [Library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
are followed or label `changelog/no-changelog` is set
- [x] Documentation is included (in-code, generated user docs, [public
corp docs](https://github.com/DataDog/documentation/))
- [x] Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))
- [x] If this PR changes the public interface, I've notified
`@DataDog/apm-tees`.

## Reviewer Checklist

- [x] Title is accurate
- [x] All changes are related to the pull request's stated goal
- [x] Description motivates each change
- [x] Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes
- [x] Testing strategy adequately addresses listed risks
- [x] Change is maintainable (easy to change, telemetry, documentation)
- [x] Release note makes sense to a user of the library
- [x] Author has acknowledged and discussed the performance implications
of this PR as reported in the benchmarks PR comment
- [x] Backport labels are set in a manner that is consistent with the
[release branch maintenance
policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)

(cherry picked from commit 370b175)
romainkomorndatadog added a commit that referenced this pull request May 20, 2024
… 2.9] (#9303)

Backport 370b175 from #9261 to 2.9.

This works around an issue where tests are improperly being skipped due
to issues collecting coverage data using coverage.py when subprocess is
used.

Whenever the subprocess marker is seen during collection, we add the
same skipif marker that's used to mark tests as unskippable, which makes
pytest run the tests no matter what.

This ends up with tests being forced to run and the
`test.itr.unskippable` tag being set to `true`:

![image](https://github.com/DataDog/dd-trace-py/assets/136473744/e189cacf-dbf5-4070-80c7-9584afe7edcc)


## Checklist

- [x] Change(s) are motivated and described in the PR description
- [x] Testing strategy is described if automated tests are not included
in the PR
- [x] Risks are described (performance impact, potential for breakage,
maintainability)
- [x] Change is maintainable (easy to change, telemetry, documentation)
- [x] [Library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
are followed or label `changelog/no-changelog` is set
- [x] Documentation is included (in-code, generated user docs, [public
corp docs](https://github.com/DataDog/documentation/))
- [x] Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))
- [x] If this PR changes the public interface, I've notified
`@DataDog/apm-tees`.

## Reviewer Checklist

- [x] Title is accurate
- [x] All changes are related to the pull request's stated goal
- [x] Description motivates each change
- [x] Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes
- [x] Testing strategy adequately addresses listed risks
- [x] Change is maintainable (easy to change, telemetry, documentation)
- [x] Release note makes sense to a user of the library
- [x] Author has acknowledged and discussed the performance implications
of this PR as reported in the benchmarks PR comment
- [x] Backport labels are set in a manner that is consistent with the
[release branch maintenance
policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)

Co-authored-by: Romain Komorn <136473744+romainkomorndatadog@users.noreply.github.com>
brettlangdon pushed a commit that referenced this pull request May 20, 2024
… 2.8] (#9302)

Backport 370b175 from #9261 to 2.8.

This works around an issue where tests are improperly being skipped due
to issues collecting coverage data using coverage.py when subprocess is
used.

Whenever the subprocess marker is seen during collection, we add the
same skipif marker that's used to mark tests as unskippable, which makes
pytest run the tests no matter what.

This ends up with tests being forced to run and the
`test.itr.unskippable` tag being set to `true`:

![image](https://github.com/DataDog/dd-trace-py/assets/136473744/e189cacf-dbf5-4070-80c7-9584afe7edcc)


## Checklist

- [x] Change(s) are motivated and described in the PR description
- [x] Testing strategy is described if automated tests are not included
in the PR
- [x] Risks are described (performance impact, potential for breakage,
maintainability)
- [x] Change is maintainable (easy to change, telemetry, documentation)
- [x] [Library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
are followed or label `changelog/no-changelog` is set
- [x] Documentation is included (in-code, generated user docs, [public
corp docs](https://github.com/DataDog/documentation/))
- [x] Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))
- [x] If this PR changes the public interface, I've notified
`@DataDog/apm-tees`.

## Reviewer Checklist

- [x] Title is accurate
- [x] All changes are related to the pull request's stated goal
- [x] Description motivates each change
- [x] Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes
- [x] Testing strategy adequately addresses listed risks
- [x] Change is maintainable (easy to change, telemetry, documentation)
- [x] Release note makes sense to a user of the library
- [x] Author has acknowledged and discussed the performance implications
of this PR as reported in the benchmarks PR comment
- [x] Backport labels are set in a manner that is consistent with the
[release branch maintenance
policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)

Co-authored-by: Romain Komorn <136473744+romainkomorndatadog@users.noreply.github.com>
brettlangdon pushed a commit that referenced this pull request May 28, 2024
… 2.7] (#9301)

Backport 370b175 from #9261 to 2.7.

This works around an issue where tests are improperly being skipped due
to issues collecting coverage data using coverage.py when subprocess is
used.

Whenever the subprocess marker is seen during collection, we add the
same skipif marker that's used to mark tests as unskippable, which makes
pytest run the tests no matter what.

This ends up with tests being forced to run and the
`test.itr.unskippable` tag being set to `true`:

![image](https://github.com/DataDog/dd-trace-py/assets/136473744/e189cacf-dbf5-4070-80c7-9584afe7edcc)


## Checklist

- [x] Change(s) are motivated and described in the PR description
- [x] Testing strategy is described if automated tests are not included
in the PR
- [x] Risks are described (performance impact, potential for breakage,
maintainability)
- [x] Change is maintainable (easy to change, telemetry, documentation)
- [x] [Library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
are followed or label `changelog/no-changelog` is set
- [x] Documentation is included (in-code, generated user docs, [public
corp docs](https://github.com/DataDog/documentation/))
- [x] Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))
- [x] If this PR changes the public interface, I've notified
`@DataDog/apm-tees`.

## Reviewer Checklist

- [x] Title is accurate
- [x] All changes are related to the pull request's stated goal
- [x] Description motivates each change
- [x] Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes
- [x] Testing strategy adequately addresses listed risks
- [x] Change is maintainable (easy to change, telemetry, documentation)
- [x] Release note makes sense to a user of the library
- [x] Author has acknowledged and discussed the performance implications
of this PR as reported in the benchmarks PR comment
- [x] Backport labels are set in a manner that is consistent with the
[release branch maintenance
policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)

Co-authored-by: Romain Komorn <136473744+romainkomorndatadog@users.noreply.github.com>
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.

4 participants