Skip to content

Commit

Permalink
Merge branch 'main' into brettlangdon/allchecks
Browse files Browse the repository at this point in the history
  • Loading branch information
brettlangdon authored Jul 15, 2024
2 parents a98ea41 + df57a62 commit 35da3a8
Show file tree
Hide file tree
Showing 830 changed files with 33,984 additions and 8,838 deletions.
57 changes: 41 additions & 16 deletions .circleci/config.templ.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ machine_executor: &machine_executor
- BOTO_CONFIG: /dev/null
# https://support.circleci.com/hc/en-us/articles/360045268074-Build-Fails-with-Too-long-with-no-output-exceeded-10m0s-context-deadline-exceeded-
- PYTHONUNBUFFERED: 1
- CMAKE_BUILD_PARALLEL_LEVEL: 12
steps:
- run: sudo apt-get update && sudo DEBIAN_FRONTEND=noninteractive apt-get install -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" --force-yes -y --no-install-recommends openssh-client git
- &pyenv-set-global
Expand Down Expand Up @@ -349,18 +350,26 @@ executors:
cimg_base:
docker:
- image: *cimg_base_image
environment:
- CMAKE_BUILD_PARALLEL_LEVEL: 6
resource_class: medium
python310:
docker:
- image: *python310_image
environment:
- CMAKE_BUILD_PARALLEL_LEVEL: 12
resource_class: large
ddtrace_dev:
docker:
- image: *ddtrace_dev_image
environment:
- CMAKE_BUILD_PARALLEL_LEVEL: 6
resource_class: *default_resource_class
ddtrace_dev_small:
docker:
- image: *ddtrace_dev_image
environment:
- CMAKE_BUILD_PARALLEL_LEVEL: 4
resource_class: small

# Common configuration blocks as YAML anchors
Expand Down Expand Up @@ -405,15 +414,6 @@ jobs:
name: "Spelling"
command: hatch run lint:spelling

ccheck:
executor: cimg_base
steps:
- checkout
- run: sudo apt-get update
- run: sudo apt-get install --yes clang-format cppcheck
- run: scripts/cformat.sh
- run: scripts/cppcheck.sh

coverage_report:
executor: python310
steps:
Expand All @@ -439,10 +439,10 @@ jobs:
path: coverage.json
# Print ddtrace/ report to stdout
# DEV: "--ignore-errors" to skip over files that are missing
- run: coverage report --ignore-errors --omit=tests/ || true
- run: coverage report --ignore-errors --omit='tests/*' || true
# Print tests/ report to stdout
# DEV: "--ignore-errors" to skip over files that are missing
- run: coverage report --ignore-errors --omit=ddtrace/ || true
- run: coverage report --ignore-errors --omit='ddtrace/*' || true
# Print diff-cover report to stdout (compares against origin/1.x)
- run: diff-cover --compare-branch $(git rev-parse --abbrev-ref origin/HEAD) coverage.xml || true

Expand All @@ -451,14 +451,17 @@ jobs:
resource_class: large
docker:
- image: *ddtrace_dev_image
parallelism: 8
parallelism: 6
steps:
- checkout
- setup_riot
- run:
name: "Generate base virtual environments."
# DEV: riot list -i tracer lists all supported Python versions
command: "riot list -i tracer | circleci tests split | xargs -I PY riot -P -v generate --python=PY"
environment:
CMAKE_BUILD_PARALLEL_LEVEL: 12
PIP_VERBOSE: 1
- persist_to_workspace:
root: .
paths:
Expand Down Expand Up @@ -495,11 +498,16 @@ jobs:

appsec_iast_packages:
<<: *machine_executor
parallelism: 10
parallelism: 5
steps:
- run_test:
pattern: 'appsec_iast_packages'
snapshot: true
- when:
condition:
matches: { pattern: "main", value: << pipeline.git.branch >> }
steps:
- run_test:
pattern: 'appsec_iast_packages'
snapshot: true
- run: echo "This test is skipped outside of main branch"

appsec_integrations:
<<: *machine_executor
Expand Down Expand Up @@ -578,6 +586,15 @@ jobs:
pattern: "ci_visibility"
snapshot: true

dd_coverage:
<<: *machine_executor
parallelism: 6
steps:
- run_hatch_env_test:
env: 'dd_coverage'
snapshot: true


llmobs:
<<: *contrib_job
steps:
Expand Down Expand Up @@ -1299,6 +1316,14 @@ jobs:
pattern: "langchain"
snapshot: true

anthropic:
<<: *machine_executor
parallelism: 3
steps:
- run_test:
pattern: "anthropic"
snapshot: true

logbook:
<<: *machine_executor
steps:
Expand Down
14 changes: 10 additions & 4 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ tests/contrib/grpc @DataDog/apm-idm-python @DataDog/asm-python
releasenotes/ @DataDog/apm-python
tests/snapshots/ @DataDog/apm-python
riotfile.py @DataDog/apm-python
.riot/requirements/ @DataDog/apm-python

# Core
tests/internal @DataDog/apm-core-python
Expand All @@ -43,6 +44,7 @@ ddtrace/internal/codeowners.py @DataDog/apm-core-python @datadog/ci-app-lib
ddtrace/internal/coverage @DataDog/apm-core-python @datadog/ci-app-libraries @Datadog/debugger-python
tests/internal/test_codeowners.py @datadog/ci-app-libraries
tests/ci_visibility @DataDog/ci-app-libraries
tests/coverage @DataDog/apm-core-python @DataDog/ci-app-libraries @Datadog/debugger-python
tests/tracer/test_ci.py @DataDog/ci-app-libraries
ddtrace/ext/git.py @DataDog/ci-app-libraries @DataDog/apm-core-python

Expand Down Expand Up @@ -70,7 +72,6 @@ ddtrace/internal/_exceptions.py @DataDog/asm-python
tests/appsec/ @DataDog/asm-python
tests/contrib/dbapi/test_dbapi_appsec.py @DataDog/asm-python
tests/contrib/subprocess @DataDog/asm-python
tests/contrib/flask_login @DataDog/asm-python
tests/contrib/flask/test_flask_appsec.py @DataDog/asm-python
tests/contrib/django/django_app/appsec_urls.py @DataDog/asm-python
tests/contrib/django/test_django_appsec.py @DataDog/asm-python
Expand All @@ -79,20 +80,23 @@ tests/contrib/*/test*appsec*.py @DataDog/asm-python
scripts/iast/* @DataDog/asm-python

# Profiling
ddtrace/profiling @DataDog/profiling-python @DataDog/apm-core-python
ddtrace/internal/datadog/profiling @DataDog/profiling-python @DataDog/apm-core-python
tests/profiling @DataDog/profiling-python @DataDog/apm-core-python
ddtrace/profiling @DataDog/profiling-python
ddtrace/settings/profiling.py @DataDog/profiling-python
ddtrace/internal/datadog/profiling @DataDog/profiling-python
tests/profiling @DataDog/profiling-python

# MLObs
ddtrace/llmobs/ @DataDog/ml-observability
ddtrace/contrib/openai @DataDog/ml-observability
ddtrace/contrib/langchain @DataDog/ml-observability
ddtrace/contrib/botocore/services/bedrock.py @DataDog/ml-observability
ddtrace/contrib/anthropic @DataDog/ml-observability
tests/llmobs @DataDog/ml-observability
tests/contrib/openai @DataDog/ml-observability
tests/contrib/langchain @DataDog/ml-observability
tests/contrib/botocore/test_bedrock.py @DataDog/ml-observability
tests/contrib/botocore/bedrock_cassettes @DataDog/ml-observability
tests/contrib/anthropic @DataDog/ml-observability

# Remote Config
ddtrace/internal/remoteconfig @DataDog/remote-config @DataDog/apm-core-python
Expand All @@ -115,5 +119,7 @@ mypy.ini @DataDog/python-guild @DataDog/apm-core-pyt
.github/ISSUE_TEMPLATE.md @DataDog/python-guild @DataDog/apm-core-python
.github/CODEOWNERS @DataDog/python-guild @DataDog/apm-core-python
.github/workflows/system-tests.yml @DataDog/python-guild @DataDog/apm-core-python
ddtrace/internal/_file_queue.py @DataDog/python-guild
ddtrace/internal/_unpatched.py @DataDog/python-guild
ddtrace/internal/compat.py @DataDog/python-guild @DataDog/apm-core-python
tests/utils.py @DataDog/python-guild
37 changes: 18 additions & 19 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
## 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](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) are followed or label `changelog/no-changelog` is set
- [ ] Documentation is included (in-code, generated user docs, [public corp docs](https://github.com/DataDog/documentation/))
- [ ] Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))
- [ ] If this PR changes the public interface, I've notified `@DataDog/apm-tees`.
- [ ] PR author has checked that all the criteria below are met
- The PR description includes an overview of the change
- The PR description articulates the motivation for the change
- The change includes tests OR the PR description describes a testing strategy
- The PR description notes risks associated with the change, if any
- Newly-added code is easy to change
- The change follows the [library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
- The change includes or references documentation updates if necessary
- Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))

## Reviewer Checklist

- [ ] Title is accurate
- [ ] All changes are related to the pull request's stated goal
- [ ] Description motivates each change
- [ ] Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) 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](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)
- [ ] Reviewer has checked that all the criteria below are met
- Title is accurate
- All changes are related to the pull request's stated goal
- Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes
- Testing strategy adequately addresses listed risks
- Newly-added code is easy to change
- Release note makes sense to a user of the library
- If necessary, 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](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)
3 changes: 3 additions & 0 deletions .github/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name: "CodeQL config"
paths-ignore:
- 'tests/appsec/iast_packages/packages/**'
36 changes: 3 additions & 33 deletions .github/workflows/build_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,35 +19,10 @@ on:
- cron: 0 2 * * 2-6

jobs:
build_wheels_py37:
build_wheels:
uses: ./.github/workflows/build_python_3.yml
with:
cibw_build: 'cp37*'

build_wheels_py38:
uses: ./.github/workflows/build_python_3.yml
with:
cibw_build: 'cp38*'

build_wheels_py39:
uses: ./.github/workflows/build_python_3.yml
with:
cibw_build: 'cp39*'

build_wheels_py310:
uses: ./.github/workflows/build_python_3.yml
with:
cibw_build: 'cp310*'

build_wheels_py311:
uses: ./.github/workflows/build_python_3.yml
with:
cibw_build: 'cp311*'

build_wheels_py312:
uses: ./.github/workflows/build_python_3.yml
with:
cibw_build: 'cp312*'
cibw_build: 'cp37* cp38* cp39* cp310* cp311* cp312*'

build_sdist:
name: Build source distribution
Expand Down Expand Up @@ -103,12 +78,7 @@ jobs:

upload_pypi:
needs:
- build_wheels_py37
- build_wheels_py38
- build_wheels_py39
- build_wheels_py310
- build_wheels_py311
- build_wheels_py312
- build_wheels
- test_alpine_sdist
runs-on: ubuntu-latest
if: (github.event_name == 'release' && github.event.action == 'published')
Expand Down
Loading

0 comments on commit 35da3a8

Please sign in to comment.