Skip to content

Commit

Permalink
Merge branch 'main' into revert-8883-gnufede/temp-disable-suite
Browse files Browse the repository at this point in the history
  • Loading branch information
avara1986 committed May 24, 2024
2 parents 36bab32 + 609a306 commit 9cecf2a
Show file tree
Hide file tree
Showing 386 changed files with 35,426 additions and 8,053 deletions.
13 changes: 12 additions & 1 deletion .circleci/config.templ.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ mongo_image: &mongo_image mongo:3.6@sha256:19c11a8f1064fd2bb713ef1270f79a742a184
httpbin_image: &httpbin_image kennethreitz/httpbin@sha256:2c7abc4803080c22928265744410173b6fea3b898872c01c5fd0f0f9df4a59fb
vertica_image: &vertica_image vertica/vertica-ce:latest
rabbitmq_image: &rabbitmq_image rabbitmq:3.7-alpine
testagent_image: &testagent_image ghcr.io/datadog/dd-apm-test-agent/ddapm-test-agent:v1.16.0
testagent_image: &testagent_image ghcr.io/datadog/dd-apm-test-agent/ddapm-test-agent:v1.17.0

parameters:
coverage:
Expand Down Expand Up @@ -81,6 +81,12 @@ commands:
# Make sure we install and run riot on Python 3
- run: pip3 install riot==0.19.0

setup_rust:
description: "Install rust toolchain"
steps:
- run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y
- run: echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> "$BASH_ENV"

setup_hatch:
description: "Install hatch"
steps:
Expand Down Expand Up @@ -543,6 +549,9 @@ jobs:

internal:
<<: *contrib_job_small
docker:
- image: *ddtrace_dev_image
- *testagent
steps:
- run_test:
pattern: "internal"
Expand Down Expand Up @@ -1321,13 +1330,15 @@ jobs:
executor: python310
steps:
- checkout
- setup_rust
- setup_hatch
- run: hatch run slotscheck:_

conftests:
executor: python310
steps:
- checkout
- setup_rust
- setup_hatch
- run: hatch run meta-testing:meta-testing

Expand Down
6 changes: 6 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ ddtrace/ext/ci_visibility @DataDog/ci-app-libraries
ddtrace/ext/test.py @DataDog/ci-app-libraries
ddtrace/internal/ci_visibility @DataDog/ci-app-libraries
ddtrace/internal/codeowners.py @DataDog/apm-core-python @datadog/ci-app-libraries
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/tracer/test_ci.py @DataDog/ci-app-libraries
Expand All @@ -63,6 +64,8 @@ ddtrace/appsec/ @DataDog/asm-python
ddtrace/settings/asm.py @DataDog/asm-python
ddtrace/contrib/subprocess/ @DataDog/asm-python
ddtrace/contrib/flask_login/ @DataDog/asm-python
ddtrace/contrib/webbrowser @DataDog/asm-python
ddtrace/contrib/urllib @DataDog/asm-python
ddtrace/internal/_exceptions.py @DataDog/asm-python
tests/appsec/ @DataDog/asm-python
tests/contrib/dbapi/test_dbapi_appsec.py @DataDog/asm-python
Expand All @@ -76,6 +79,7 @@ tests/contrib/*/test*appsec*.py @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

# MLObs
Expand All @@ -102,11 +106,13 @@ tests/internal/remoteconfig @DataDog/remote-config @DataDog/apm-core-pyt
setup.py @DataDog/python-guild
setup.cfg @DataDog/python-guild
pyproject.toml @DataDog/python-guild
hatch.toml @DataDog/python-guild
.readthedocs.yml @DataDog/python-guild @DataDog/apm-core-python
README.md @DataDog/python-guild @DataDog/apm-core-python
mypy.ini @DataDog/python-guild @DataDog/apm-core-python
.github/PULL_REQUEST_TEMPLATE.md @DataDog/python-guild @DataDog/apm-core-python
.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/_unpatched.py @DataDog/python-guild
ddtrace/internal/compat.py @DataDog/python-guild @DataDog/apm-core-python
2 changes: 1 addition & 1 deletion .github/workflows/apm-transport-stress-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
DD_API_KEY: ${{ secrets.DD_SHARED_TESTS_API_KEY }}
TRACER: python
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: DataDog/apm-transport-stress-tests
- name: Build
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/build-and-publish-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ on:
context:
required: true
type: string
file:
required: false
type: string
default: Dockerfile
secrets:
token:
required: true
Expand All @@ -23,7 +27,7 @@ jobs:
build_push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
Expand All @@ -42,3 +46,4 @@ jobs:
platforms: ${{ inputs.platforms }}
build-args: ${{ inputs.build-args }}
context: ${{ inputs.context }}
file: ${{ inputs.context }}/${{ inputs.file }}
23 changes: 11 additions & 12 deletions .github/workflows/build_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,28 +48,27 @@ jobs:
uses: ./.github/workflows/build_python_3.yml
with:
cibw_build: 'cp312*'
cibw_prerelease_pythons: 'True'

build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
# Include all history and tags
with:
fetch-depth: 0

- uses: actions/setup-python@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.7'

- name: Build sdist
run: |
pip install cython cmake
pip install "setuptools_scm[toml]>=4" "cython" "cmake>=3.24.2,<3.28" "setuptools-rust"
python setup.py sdist
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: source-dist
path: dist/*.tar.gz

test_alpine_sdist:
Expand All @@ -80,10 +79,10 @@ jobs:
container:
image: python:3.9-alpine
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: artifact
name: source-dist
path: dist

- name: Install build dependencies
Expand Down Expand Up @@ -114,10 +113,10 @@ jobs:
runs-on: ubuntu-latest
if: (github.event_name == 'release' && github.event.action == 'published')
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: artifact
path: dist
merge-multiple: true

- uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand Down
32 changes: 29 additions & 3 deletions .github/workflows/build_python_3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ jobs:
- os: macos-12
archs: x86_64 universal2
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
# Include all history and tags
with:
fetch-depth: 0

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
if: matrix.os != 'arm-4core-linux'
name: Install Python
with:
Expand Down Expand Up @@ -69,6 +69,15 @@ jobs:
CIBW_SKIP: ${{ inputs.cibw_skip }}
CIBW_PRERELEASE_PYTHONS: ${{ inputs.cibw_prerelease_pythons }}
CMAKE_BUILD_PARALLEL_LEVEL: 12
CIBW_MUSLLINUX_I686_IMAGE: ghcr.io/datadog/dd-trace-py/pypa_musllinux_1_2_i686:latest
CIBW_BEFORE_ALL: >
if [[ "$(uname -m)-$(uname -i)-$(uname -o | tr '[:upper:]' '[:lower:]')-$(ldd --version 2>&1 | head -n 1 | awk '{print $1}')" != "i686-unknown-linux-musl" ]];
then
curl -sSf https://sh.rustup.rs | sh -s -- -y;
fi
CIBW_BEFORE_ALL_WINDOWS: rustup target add i686-pc-windows-msvc
CIBW_BEFORE_ALL_MACOS: rustup target add aarch64-apple-darwin
CIBW_ENVIRONMENT_LINUX: "PATH=$HOME/.cargo/bin:$PATH"
CIBW_REPAIR_WHEEL_COMMAND_LINUX: |
mkdir ./tempwheelhouse &&
unzip -l {wheel} | grep '\.so' &&
Expand Down Expand Up @@ -100,6 +109,15 @@ jobs:
CIBW_SKIP: ${{ inputs.cibw_skip }}
CIBW_PRERELEASE_PYTHONS: ${{ inputs.cibw_prerelease_pythons }}
CMAKE_BUILD_PARALLEL_LEVEL: 12
CIBW_MUSLLINUX_I686_IMAGE: ghcr.io/datadog/dd-trace-py/pypa_musllinux_1_2_i686:latest
CIBW_BEFORE_ALL: >
if [[ "$(uname -m)-$(uname -i)-$(uname -o | tr '[:upper:]' '[:lower:]')-$(ldd --version 2>&1 | head -n 1 | awk '{print $1}')" != "i686-unknown-linux-musl" ]];
then
curl -sSf https://sh.rustup.rs | sh -s -- -y;
fi
CIBW_BEFORE_ALL_WINDOWS: rustup target add i686-pc-windows-msvc
CIBW_BEFORE_ALL_MACOS: rustup target add aarch64-apple-darwin
CIBW_ENVIRONMENT_LINUX: "PATH=$HOME/.cargo/bin:$PATH"
CIBW_REPAIR_WHEEL_COMMAND_LINUX: |
mkdir ./tempwheelhouse &&
unzip -l {wheel} | grep '\.so' &&
Expand All @@ -120,6 +138,14 @@ jobs:
# DEV: Uncomment to debug MacOS
# CIBW_BUILD_VERBOSITY_MACOS: 3

- uses: actions/upload-artifact@v3
- if: runner.os != 'Windows'
run: |
echo "ARTIFACT_NAME=${{ matrix.os }}-${{ matrix.archs }}-$(echo "${{ inputs.cibw_build }}" | tr -cd '[:alnum:]_-')" >> $GITHUB_ENV
- if: runner.os == 'Windows'
run: |
chcp 65001 #set code page to utf-8
echo ("ARTIFACT_NAME=${{ matrix.os }}-${{ matrix.archs }}-${{ inputs.cibw_build }}".replace('*', '').replace(' ', '_')) >> $env:GITHUB_ENV
- uses: actions/upload-artifact@v4
with:
name: wheels-${{ env.ARTIFACT_NAME }}
path: ./wheelhouse/*.whl
6 changes: 3 additions & 3 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
name: Validate changelog
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
# Include all history and tags
with:
fetch-depth: 0
Expand All @@ -25,7 +25,7 @@ jobs:
if: github.event_name == 'pull_request'
run: scripts/check-releasenotes

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.8'
Expand All @@ -42,7 +42,7 @@ jobs:
rst2html.py CHANGELOG.rst CHANGELOG.html
- name: Upload CHANGELOG.rst
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: changelog
path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/django-overhead-profile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
paths:
- 'ddtrace/**'
- 'scripts/profiles/django-simple/**'
- '.github/workflows/django-overhead-profile.yml'
jobs:
django-overhead-profile:
runs-on: ubuntu-latest
Expand All @@ -16,13 +17,13 @@ jobs:
run:
working-directory: ddtrace
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
path: ddtrace

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.10"

- name: Setup
run: |
Expand All @@ -32,7 +33,7 @@ jobs:
run: |
bash scripts/profiles/django-simple/run.sh ${PREFIX}
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: django-overhead-profile
path: ${{ github.workspace }}/prefix/artifacts
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/encoders-profile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
paths:
- 'ddtrace/internal/_encoding.pyx'
- 'scripts/profiles/encoders/**'
- '.github/workflows/encoders-profile.yml'
jobs:
encoders-profile:
runs-on: ubuntu-latest
Expand All @@ -16,13 +17,13 @@ jobs:
run:
working-directory: ddtrace
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
path: ddtrace

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.10"

- name: Setup
run: |
Expand All @@ -36,7 +37,7 @@ jobs:
sed -i 's|${{ github.workspace }}/ddtrace/||g' ${PREFIX}/artifacts/$a
done
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: encoders-profile
path: ${{ github.workspace }}/prefix/artifacts
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/flask-overhead-profile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
paths:
- 'ddtrace/**'
- 'scripts/profiles/flask-simple/**'
- '.github/workflows/flask-overhead-profile.yml'
jobs:
flask-overhead-profile:
runs-on: ubuntu-latest
Expand All @@ -16,11 +17,11 @@ jobs:
run:
working-directory: ddtrace
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
path: ddtrace

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"

Expand All @@ -32,7 +33,7 @@ jobs:
run: |
bash scripts/profiles/flask-simple/run.sh ${PREFIX}
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: flask-overhead-profile
path: ${{ github.workspace }}/prefix/artifacts
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lib-inject-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
wait_for_package:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Wait for package to be available from PyPI
Expand Down

0 comments on commit 9cecf2a

Please sign in to comment.