Skip to content

Commit 3d30ce9

Browse files
Merge branch 'christophe-papazian/django_endpoint_discovery_improvements' of github.com:DataDog/dd-trace-py into christophe-papazian/django_endpoint_discovery_improvements
2 parents a95db2b + 058a8bf commit 3d30ce9

30 files changed

+1513
-476
lines changed

.github/workflows/build_python_3.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,20 +69,16 @@ jobs:
6969
# See: https://stackoverflow.com/a/65402241
7070
CIBW_ENVIRONMENT_MACOS: CMAKE_BUILD_PARALLEL_LEVEL=24 SYSTEM_VERSION_COMPAT=0 CMAKE_ARGS="-DNATIVE_TESTING=OFF"
7171
CIBW_REPAIR_WHEEL_COMMAND_LINUX: |
72+
python scripts/zip_filter.py {wheel} \*.c \*.cpp \*.cc \*.h \*.hpp \*.pyx \*.md &&
7273
mkdir ./tempwheelhouse &&
7374
unzip -l {wheel} | grep '\.so' &&
7475
auditwheel repair -w ./tempwheelhouse {wheel} &&
75-
for w in ./tempwheelhouse/*.whl; do
76-
python scripts/zip_filter.py $w \*.c \*.cpp \*.cc \*.h \*.hpp \*.pyx \*.md
77-
mv $w {dest_dir}
78-
done &&
76+
mv ./tempwheelhouse/*.whl {dest_dir} &&
7977
rm -rf ./tempwheelhouse
8078
CIBW_REPAIR_WHEEL_COMMAND_MACOS: |
81-
zip -d {wheel} \*.c \*.cpp \*.cc \*.h \*.hpp \*.pyx \*.md &&
79+
python scripts/zip_filter.py {wheel} \*.c \*.cpp \*.cc \*.h \*.hpp \*.pyx \*.md &&
8280
MACOSX_DEPLOYMENT_TARGET=12.7 delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}
83-
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: choco install -y 7zip &&
84-
7z d -r "{wheel}" *.c *.cpp *.cc *.h *.hpp *.pyx *.md &&
85-
move "{wheel}" "{dest_dir}"
81+
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: python scripts/zip_filter.py "{wheel}" "*.c" "*.cpp" "*.cc" "*.h" "*.hpp" "*.pyx" "*.md" && mv "{wheel}" "{dest_dir}"
8682
CIBW_TEST_COMMAND: "python {project}/tests/smoke_test.py"
8783

8884
steps:
@@ -107,6 +103,16 @@ jobs:
107103
with:
108104
only: ${{ matrix.only }}
109105

106+
- name: Validate wheel RECORD files
107+
shell: bash
108+
run: |
109+
for wheel in ./wheelhouse/*.whl; do
110+
if [ -f "$wheel" ]; then
111+
echo "Validating $(basename $wheel)..."
112+
python scripts/validate_wheel.py "$wheel"
113+
fi
114+
done
115+
110116
- if: runner.os != 'Windows'
111117
run: |
112118
echo "ARTIFACT_NAME=${{ matrix.only }}" >> $GITHUB_ENV

.gitlab/benchmarks/steps/detect-baseline.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ elif [[ "${UPSTREAM_BRANCH}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+ ]]; then
2727
BASELINE_BRANCH=$(echo "${UPSTREAM_BRANCH:1}" | cut -d. -f1-2)
2828

2929
# Check if a release branch exists or not
30-
if git ls-remote --exit-code --heads origin "${BASELINE_BRANCH}" > /dev/null; then
30+
if git ls-remote --exit-code --heads origin "refs/heads/${BASELINE_BRANCH}" > /dev/null; then
3131
echo "Found remote branch origin/${BASELINE_BRANCH}"
3232
else
3333
echo "Remote branch origin/${BASELINE_BRANCH} not found. Falling back to main."

.gitlab/download-wheels-from-gh-actions.sh

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,29 @@
11
#!/bin/bash
22
set -eo pipefail
33

4+
get_run_id() {
5+
RUN_ID=$(
6+
gh run ls \
7+
--repo DataDog/dd-trace-py \
8+
--commit="$CI_COMMIT_SHA" \
9+
$([ -z "$TRIGGERING_EVENT" ] && echo "" || echo "--event=$TRIGGERING_EVENT") \
10+
--workflow=build_deploy.yml \
11+
--json databaseId \
12+
--jq "first (.[]) | .databaseId"
13+
)
14+
}
15+
416
if [ -z "$CI_COMMIT_SHA" ]; then
517
echo "Error: CI_COMMIT_SHA was not provided"
618
exit 1
719
fi
820

9-
RUN_ID=$(gh run ls --repo DataDog/dd-trace-py --commit=$CI_COMMIT_SHA --workflow=build_deploy.yml --json databaseId --jq "first (.[]) | .databaseId")
21+
if [ -v "$CI_COMMIT_TAG" ]; then
22+
TRIGGERING_EVENT="release"
23+
fi
24+
25+
get_run_id
26+
1027
if [ -z "$RUN_ID" ]; then
1128
echo "No RUN_ID found waiting for job to start"
1229
# The job has not started yet. Give it time to start
@@ -19,7 +36,7 @@ if [ -z "$RUN_ID" ]; then
1936
end_time=$((start_time + timeout))
2037
# Loop for 10 minutes waiting for run to appear in github
2138
while [ $(date +%s) -lt $end_time ]; do
22-
RUN_ID=$(gh run ls --repo DataDog/dd-trace-py --commit=$CI_COMMIT_SHA --workflow=build_deploy.yml --json databaseId --jq "first (.[]) | .databaseId")
39+
get_run_id
2340
if [ -n "$RUN_ID" ]; then
2441
break;
2542
fi

.riot/requirements/181e571.txt

Lines changed: 0 additions & 166 deletions
This file was deleted.

0 commit comments

Comments
 (0)