Skip to content

chore: add hatch#6442

Merged
majorgreys merged 21 commits into
1.xfrom
majorgreys/add-hatch
Aug 1, 2023
Merged

chore: add hatch#6442
majorgreys merged 21 commits into
1.xfrom
majorgreys/add-hatch

Conversation

@majorgreys
Copy link
Copy Markdown
Contributor

@majorgreys majorgreys commented Jul 24, 2023

Introduces hatch for managing CI environments.

The intention is to migrate away from the current tool (riot). Several riot environments are consolidated into a single linting hatch environment. The docs hatch environment is configured to run as a Docker container locally while running as a virtual environment in CI.

Checklist

  • Change(s) are motivated and described in the PR description.
  • Testing strategy is described if automated tests are not included in the PR.
  • Risk is outlined (performance impact, potential for breakage, maintainability, etc).
  • Change is maintainable (easy to change, telemetry, documentation).
  • Library release note guidelines are followed. If no release note is required, add label changelog/no-changelog.
  • Documentation is included (in-code, generated user docs, public corp docs).
  • Backport labels are set (if applicable)

Reviewer Checklist

  • Title is accurate.
  • No unnecessary changes are introduced.
  • Description motivates each change.
  • Avoids breaking API changes unless absolutely necessary.
  • Testing strategy adequately addresses listed risk(s).
  • Change is maintainable (easy to change, telemetry, documentation).
  • Release note makes sense to a user of the library.
  • Reviewer has explicitly 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

@majorgreys majorgreys force-pushed the majorgreys/add-hatch branch from 507f3a5 to 820eb56 Compare July 24, 2023 13:16
Comment thread .circleci/config.yml Outdated
@majorgreys majorgreys force-pushed the majorgreys/add-hatch branch 3 times, most recently from 342543b to 2785f82 Compare July 25, 2023 14:35
@majorgreys majorgreys added the changelog/no-changelog A changelog entry is not required for this PR. label Jul 25, 2023
@majorgreys majorgreys marked this pull request as ready for review July 25, 2023 14:47
@majorgreys majorgreys requested review from a team as code owners July 25, 2023 14:47
Comment thread docs/contributing-testing.rst Outdated
Comment thread docs/contributing-testing.rst Outdated
Comment thread pyproject.toml Outdated
Comment thread pyproject.toml Outdated
@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented Jul 25, 2023

Benchmarks

Benchmark execution time: 2023-08-01 16:41:43

Comparing candidate commit 0e9bbc4 in PR branch majorgreys/add-hatch with baseline commit bed1ee6 in branch 1.x.

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

scenario:otelspan-start-finish-telemetry

  • 🟩 max_rss_usage [-863.990KB; -763.761KB] or [-2.925%; -2.585%]

scenario:samplingrules-low_match

  • 🟥 max_rss_usage [+761.415KB; +1037.139KB] or [+2.764%; +3.765%]

scenario:sethttpmeta-all-disabled

  • 🟩 max_rss_usage [-818.802KB; -653.710KB] or [-2.854%; -2.279%]

scenario:sethttpmeta-all-enabled

  • 🟩 max_rss_usage [-809.434KB; -674.956KB] or [-2.824%; -2.355%]

scenario:sethttpmeta-collectipvariant_exists

  • 🟩 max_rss_usage [-774.427KB; -605.106KB] or [-2.705%; -2.113%]

scenario:sethttpmeta-obfuscation-worst-case-explicit-query

  • 🟥 max_rss_usage [+668.568KB; +807.221KB] or [+2.373%; +2.865%]

scenario:sethttpmeta-useragentvariant_exists_1

  • 🟩 max_rss_usage [-732.963KB; -602.743KB] or [-2.559%; -2.104%]

scenario:sethttpmeta-useragentvariant_exists_2

  • 🟩 max_rss_usage [-763.759KB; -639.941KB] or [-2.665%; -2.233%]

scenario:sethttpmeta-useragentvariant_exists_3

  • 🟩 max_rss_usage [-831.716KB; -647.350KB] or [-2.897%; -2.255%]

scenario:sethttpmeta-useragentvariant_not_exists_2

  • 🟩 max_rss_usage [-1.249MB; -1.071MB] or [-4.349%; -3.728%]

scenario:tracer-large

  • 🟩 max_rss_usage [-904.284KB; -754.186KB] or [-3.086%; -2.573%]

@majorgreys majorgreys force-pushed the majorgreys/add-hatch branch 3 times, most recently from 2bb66e9 to 5a39a72 Compare July 26, 2023 18:37
@majorgreys majorgreys requested a review from emmettbutler July 26, 2023 18:47
@majorgreys majorgreys force-pushed the majorgreys/add-hatch branch 2 times, most recently from a1ae3cd to 617de21 Compare July 27, 2023 11:55
@majorgreys
Copy link
Copy Markdown
Contributor Author

We will need to hold off on migrating from setup.py to pyproject.toml as long as we need to support 3.6 and below.

Failing build run: https://github.com/DataDog/dd-trace-py/actions/runs/5680041302?pr=6442

Successful build run: https://github.com/DataDog/dd-trace-py/actions/runs/5680653740

@emmettbutler emmettbutler removed their request for review July 27, 2023 15:45
@majorgreys majorgreys force-pushed the majorgreys/add-hatch branch from 0744c2a to 8dd8b9c Compare July 28, 2023 13:28
@majorgreys majorgreys force-pushed the majorgreys/add-hatch branch from 8dd8b9c to c2b1080 Compare July 28, 2023 18:43
majorgreys and others added 3 commits August 1, 2023 10:59
Comment thread tests/.suitespec.json Outdated
Copy link
Copy Markdown
Contributor

@P403n1x87 P403n1x87 left a comment

Choose a reason for hiding this comment

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

Just a nit, otherwise LGTM!

majorgreys and others added 2 commits August 1, 2023 11:18
Co-authored-by: Gabriele N. Tornetta <P403n1x87@users.noreply.github.com>
@majorgreys majorgreys requested a review from P403n1x87 August 1, 2023 15:19
Copy link
Copy Markdown
Contributor

@P403n1x87 P403n1x87 left a comment

Choose a reason for hiding this comment

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

💯

@majorgreys majorgreys merged commit 1e5cb24 into 1.x Aug 1, 2023
@majorgreys majorgreys deleted the majorgreys/add-hatch branch August 1, 2023 18:28
@github-actions github-actions Bot added this to the v1.18.0 milestone Aug 1, 2023
@majorgreys majorgreys mentioned this pull request Aug 2, 2023
16 tasks
majorgreys added a commit that referenced this pull request Aug 2, 2023
#6442 removed the environment variable added in #6361 to build 3.12
wheels. This change adds a new input parameter for the action to set the
necessary environment variable.

We can drop this once 3.12 is released. 

## 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

- [ ] Title is accurate.
- [ ] No unnecessary changes are introduced.
- [ ] Description motivates each change.
- [ ] Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes unless absolutely necessary.
- [ ] Testing strategy adequately addresses listed risk(s).
- [ ] Change is maintainable (easy to change, telemetry, documentation).
- [ ] Release note makes sense to a user of the library.
- [ ] Reviewer has explicitly 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](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)
romainkomorn-exdatadog added a commit that referenced this pull request Aug 2, 2023
Makes testrunner container started by `scripts/ddtest` a bit more
compliant with #6442
by installing `hatch` on start.

## Tests
```
romain.komorn@COMP-CLXFH7L2J3 dd-trace-py % scripts/ddtest
...
root@docker-desktop:~/project# hatch
Usage: hatch [OPTIONS] COMMAND [ARGS]...

   _   _       _       _
  | | | |     | |     | |
  | |_| | __ _| |_ ___| |__
  |  _  |/ _` | __/ __| '_ \
  | | | | (_| | || (__| | | |
  \_| |_/\__,_|\__\___|_| |_|
```

## 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)

---------

Co-authored-by: Tahir H. Butt <tahir.butt@datadoghq.com>
Co-authored-by: Gabriele N. Tornetta <P403n1x87@users.noreply.github.com>
romainkomorn-exdatadog pushed a commit that referenced this pull request Aug 8, 2023
Introduces hatch for managing CI environments.

The intention is to migrate away from the current tool (riot). Several
riot environments are consolidated into a single linting hatch
environment. The docs hatch environment is configured to run as a Docker
container locally while running as a virtual environment in CI.

## 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

- [ ] Title is accurate.
- [ ] No unnecessary changes are introduced.
- [ ] Description motivates each change.
- [ ] Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes unless absolutely necessary.
- [ ] Testing strategy adequately addresses listed risk(s).
- [ ] Change is maintainable (easy to change, telemetry, documentation).
- [ ] Release note makes sense to a user of the library.
- [ ] Reviewer has explicitly 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](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)
romainkomorn-exdatadog pushed a commit that referenced this pull request Aug 8, 2023
#6442 removed the environment variable added in #6361 to build 3.12
wheels. This change adds a new input parameter for the action to set the
necessary environment variable.

We can drop this once 3.12 is released. 

## 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

- [ ] Title is accurate.
- [ ] No unnecessary changes are introduced.
- [ ] Description motivates each change.
- [ ] Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes unless absolutely necessary.
- [ ] Testing strategy adequately addresses listed risk(s).
- [ ] Change is maintainable (easy to change, telemetry, documentation).
- [ ] Release note makes sense to a user of the library.
- [ ] Reviewer has explicitly 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](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)
romainkomorn-exdatadog added a commit that referenced this pull request Aug 8, 2023
Makes testrunner container started by `scripts/ddtest` a bit more
compliant with #6442
by installing `hatch` on start.

## Tests
```
romain.komorn@COMP-CLXFH7L2J3 dd-trace-py % scripts/ddtest
...
root@docker-desktop:~/project# hatch
Usage: hatch [OPTIONS] COMMAND [ARGS]...

   _   _       _       _
  | | | |     | |     | |
  | |_| | __ _| |_ ___| |__
  |  _  |/ _` | __/ __| '_ \
  | | | | (_| | || (__| | | |
  \_| |_/\__,_|\__\___|_| |_|
```

## 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)

---------

Co-authored-by: Tahir H. Butt <tahir.butt@datadoghq.com>
Co-authored-by: Gabriele N. Tornetta <P403n1x87@users.noreply.github.com>
juli1 pushed a commit that referenced this pull request Aug 8, 2023
Introduces hatch for managing CI environments.

The intention is to migrate away from the current tool (riot). Several
riot environments are consolidated into a single linting hatch
environment. The docs hatch environment is configured to run as a Docker
container locally while running as a virtual environment in CI.

## 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

- [ ] Title is accurate.
- [ ] No unnecessary changes are introduced.
- [ ] Description motivates each change.
- [ ] Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes unless absolutely necessary.
- [ ] Testing strategy adequately addresses listed risk(s).
- [ ] Change is maintainable (easy to change, telemetry, documentation).
- [ ] Release note makes sense to a user of the library.
- [ ] Reviewer has explicitly 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](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)
juli1 pushed a commit that referenced this pull request Aug 8, 2023
#6442 removed the environment variable added in #6361 to build 3.12
wheels. This change adds a new input parameter for the action to set the
necessary environment variable.

We can drop this once 3.12 is released. 

## 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

- [ ] Title is accurate.
- [ ] No unnecessary changes are introduced.
- [ ] Description motivates each change.
- [ ] Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes unless absolutely necessary.
- [ ] Testing strategy adequately addresses listed risk(s).
- [ ] Change is maintainable (easy to change, telemetry, documentation).
- [ ] Release note makes sense to a user of the library.
- [ ] Reviewer has explicitly 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](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)
juli1 pushed a commit that referenced this pull request Aug 8, 2023
Makes testrunner container started by `scripts/ddtest` a bit more
compliant with #6442
by installing `hatch` on start.

## Tests
```
romain.komorn@COMP-CLXFH7L2J3 dd-trace-py % scripts/ddtest
...
root@docker-desktop:~/project# hatch
Usage: hatch [OPTIONS] COMMAND [ARGS]...

   _   _       _       _
  | | | |     | |     | |
  | |_| | __ _| |_ ___| |__
  |  _  |/ _` | __/ __| '_ \
  | | | | (_| | || (__| | | |
  \_| |_/\__,_|\__\___|_| |_|
```

## 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)

---------

Co-authored-by: Tahir H. Butt <tahir.butt@datadoghq.com>
Co-authored-by: Gabriele N. Tornetta <P403n1x87@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