Skip to content

Commit

Permalink
ci: randomize the execution order of a few product test suites (#7979)
Browse files Browse the repository at this point in the history
This pull request randomizes the execution order of tests in the
`telemetry`, `integration`, `datastreams`, `ci_visibility`, and
`runtime` suites by depending on the `pytest-randomly` plugin. It also
changes a few tests to work regardless of which other tests ran before
them, and ignores randomization in certain CI Visibility tests that
don't expect it. Lastly, this change pins `werkzeug` to the range that
passes the `telemetry` test suite.

The benefit of randomizing execution order is that it lets us know when
tests depend on each other. Often, coupled tests indicate coupled
library code, which can lead to subtle bugs that are otherwise hard to
isolate.

## 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] Risk is outlined (performance impact, potential for breakage,
maintainability, etc).
- [x] Change is maintainable (easy to change, telemetry, documentation).
- [x] [Library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
are followed. If no release note is required, add label
`changelog/no-changelog`.
- [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))

## Reviewer Checklist

- [x] Title is accurate.
- [x] No unnecessary changes are introduced.
- [x] Description motivates each change.
- [x] Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes unless absolutely necessary.
- [x] Testing strategy adequately addresses listed risk(s).
- [x] Change is maintainable (easy to change, telemetry, documentation).
- [x] Release note makes sense to a user of the library.
- [x] Reviewer has explicitly 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)
- [x] If this PR touches code that signs or publishes builds or
packages, or handles credentials of any kind, I've requested a review
from `@DataDog/security-design-and-guidance`.
- [x] This PR doesn't touch any of that.

---------

Co-authored-by: Federico Mon <federico.mon@datadoghq.com>
Co-authored-by: Munir Abdinur <munir.abdinur@datadoghq.com>
  • Loading branch information
3 people committed Jan 2, 2024
1 parent 8864ea9 commit 14d3cbc
Show file tree
Hide file tree
Showing 70 changed files with 853 additions and 763 deletions.
36 changes: 36 additions & 0 deletions .riot/requirements/10f1036.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# pip-compile --no-annotate .riot/requirements/10f1036.in
#
attrs==23.1.0
certifi==2023.11.17
charset-normalizer==3.3.2
click==7.1.2
coverage[toml]==7.3.4
exceptiongroup==1.2.0
flask==1.1.4
gunicorn==21.2.0
httpretty==1.0.5
hypothesis==6.45.0
idna==3.6
importlib-metadata==7.0.0
iniconfig==2.0.0
itsdangerous==1.1.0
jinja2==2.11.3
markupsafe==2.1.3
mock==5.1.0
opentracing==2.4.0
packaging==23.2
pluggy==1.3.0
pytest==7.4.3
pytest-cov==4.1.0
pytest-mock==3.12.0
pytest-randomly==3.15.0
requests==2.31.0
sortedcontainers==2.4.0
tomli==2.0.1
urllib3==2.1.0
werkzeug==1.0.1
zipp==3.17.0
33 changes: 0 additions & 33 deletions .riot/requirements/10fb966.txt

This file was deleted.

19 changes: 0 additions & 19 deletions .riot/requirements/113417b.txt

This file was deleted.

35 changes: 0 additions & 35 deletions .riot/requirements/115be7b.txt

This file was deleted.

22 changes: 22 additions & 0 deletions .riot/requirements/1185b58.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile --no-annotate .riot/requirements/1185b58.in
#
attrs==23.1.0
coverage[toml]==7.3.4
exceptiongroup==1.2.0
hypothesis==6.45.0
iniconfig==2.0.0
mock==5.1.0
msgpack==1.0.7
opentracing==2.4.0
packaging==23.2
pluggy==1.3.0
pytest==7.4.3
pytest-cov==4.1.0
pytest-mock==3.12.0
pytest-randomly==3.15.0
sortedcontainers==2.4.0
tomli==2.0.1
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# pip-compile --no-annotate .riot/requirements/1a630b3.in
# pip-compile --no-annotate .riot/requirements/119431a.in
#
attrs==23.1.0
coverage[toml]==7.2.7
coverage[toml]==7.3.4
hypothesis==6.45.0
iniconfig==2.0.0
mock==5.1.0
msgpack==1.0.5
msgpack==1.0.7
opentracing==2.4.0
packaging==23.1
pluggy==1.2.0
pytest==7.4.0
packaging==23.2
pluggy==1.3.0
pytest==7.4.3
pytest-cov==4.1.0
pytest-mock==3.11.1
pytest-mock==3.12.0
pytest-randomly==3.15.0
sortedcontainers==2.4.0
25 changes: 25 additions & 0 deletions .riot/requirements/11fe1f6.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#
# This file is autogenerated by pip-compile with Python 3.7
# by the following command:
#
# pip-compile --config=pyproject.toml --no-annotate --resolver=backtracking .riot/requirements/11fe1f6.in
#
attrs==23.1.0
coverage[toml]==7.2.7
exceptiongroup==1.2.0
hypothesis==6.45.0
importlib-metadata==6.7.0
iniconfig==2.0.0
mock==5.1.0
msgpack==1.0.5
opentracing==2.4.0
packaging==23.2
pluggy==1.2.0
pytest==7.4.3
pytest-cov==4.1.0
pytest-mock==3.11.1
pytest-randomly==3.12.0
sortedcontainers==2.4.0
tomli==2.0.1
typing-extensions==4.7.1
zipp==3.15.0
24 changes: 24 additions & 0 deletions .riot/requirements/1214426.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# pip-compile --no-annotate .riot/requirements/1214426.in
#
attrs==23.1.0
coverage[toml]==7.3.4
exceptiongroup==1.2.0
hypothesis==6.45.0
importlib-metadata==7.0.0
iniconfig==2.0.0
mock==5.1.0
msgpack==1.0.7
opentracing==2.4.0
packaging==23.2
pluggy==1.3.0
pytest==7.4.3
pytest-cov==4.1.0
pytest-mock==3.12.0
pytest-randomly==3.15.0
sortedcontainers==2.4.0
tomli==2.0.1
zipp==3.17.0
21 changes: 0 additions & 21 deletions .riot/requirements/1240f78.txt

This file was deleted.

25 changes: 25 additions & 0 deletions .riot/requirements/136fbd2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#
# This file is autogenerated by pip-compile with Python 3.7
# by the following command:
#
# pip-compile --config=pyproject.toml --no-annotate --resolver=backtracking .riot/requirements/136fbd2.in
#
attrs==23.1.0
coverage[toml]==7.2.7
exceptiongroup==1.2.0
hypothesis==6.45.0
importlib-metadata==6.7.0
iniconfig==2.0.0
mock==5.1.0
msgpack==1.0.5
opentracing==2.4.0
packaging==23.2
pluggy==1.2.0
pytest==7.4.3
pytest-cov==4.1.0
pytest-mock==3.11.1
pytest-randomly==3.12.0
sortedcontainers==2.4.0
tomli==2.0.1
typing-extensions==4.7.1
zipp==3.15.0
21 changes: 0 additions & 21 deletions .riot/requirements/139a2c3.txt

This file was deleted.

24 changes: 24 additions & 0 deletions .riot/requirements/1418434.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#
# This file is autogenerated by pip-compile with Python 3.9
# by the following command:
#
# pip-compile --no-annotate .riot/requirements/1418434.in
#
attrs==23.1.0
coverage[toml]==7.3.4
exceptiongroup==1.2.0
hypothesis==6.45.0
importlib-metadata==7.0.0
iniconfig==2.0.0
mock==5.1.0
msgpack==1.0.7
opentracing==2.4.0
packaging==23.2
pluggy==1.3.0
pytest==7.4.3
pytest-cov==4.1.0
pytest-mock==3.12.0
pytest-randomly==3.15.0
sortedcontainers==2.4.0
tomli==2.0.1
zipp==3.17.0
22 changes: 22 additions & 0 deletions .riot/requirements/157ee7b.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile --no-annotate .riot/requirements/157ee7b.in
#
attrs==23.1.0
coverage[toml]==7.3.4
exceptiongroup==1.2.0
hypothesis==6.45.0
iniconfig==2.0.0
mock==5.1.0
msgpack==1.0.7
opentracing==2.4.0
packaging==23.2
pluggy==1.3.0
pytest==7.4.3
pytest-cov==4.1.0
pytest-mock==3.12.0
pytest-randomly==3.15.0
sortedcontainers==2.4.0
tomli==2.0.1
22 changes: 22 additions & 0 deletions .riot/requirements/15b58f8.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile --no-annotate .riot/requirements/15b58f8.in
#
attrs==23.1.0
coverage[toml]==7.3.4
exceptiongroup==1.2.0
hypothesis==6.45.0
iniconfig==2.0.0
mock==5.1.0
msgpack==1.0.7
opentracing==2.4.0
packaging==23.2
pluggy==1.3.0
pytest==7.4.3
pytest-cov==4.1.0
pytest-mock==3.12.0
pytest-randomly==3.15.0
sortedcontainers==2.4.0
tomli==2.0.1

0 comments on commit 14d3cbc

Please sign in to comment.