Skip to content

Commit 4df314b

Browse files
purple4reinaclaude
andcommitted
ci: warn-and-fall-through when no upstream ddtrace wheel matches
dd-trace-py 4.x stopped building cp38 wheels (PYTHON_TAGS in .gitlab/package.yml starts at cp39), so when this repo's CI is triggered from a dd-trace-py 4.x PR, the cp38 unit-test job's spec_ddtrace_dep call hard-errored. Lambda-python's pyproject.toml already pins ddtrace<4 for Python 3.8/3.9, so the released ddtrace is the correct thing to use there. Match the original build_layers.sh behavior: warn, leave pyproject.toml untouched, return 0. The dd-trace-py upload-serverless job's status independently signals build/upload failures for supported versions. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent e5dee1d commit 4df314b

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

scripts/_spec_ddtrace_dep.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,15 @@ spec_ddtrace_dep() {
7575
else
7676
PLATFORM="manylinux2014_aarch64"
7777
fi
78-
_search_and_spec_s3_wheel "ddtrace_serverless" "serverless" \
79-
|| _search_and_spec_s3_wheel "ddtrace" "manylinux2014" \
80-
|| { echo "ERROR: No matching ddtrace wheel for ${PY_TAG} ${PLATFORM} in pipeline ${UPSTREAM_PIPELINE_ID}" >&2; return 1; }
78+
# Fall through to the released ddtrace when no wheel matches. This
79+
# is expected for Python versions that dd-trace-py no longer builds
80+
# for (e.g. cp38 on dd-trace-py 4.x), and matches the original
81+
# build_layers.sh "No S3 wheel found, using default pyproject.toml
82+
# version" behavior. The dd-trace-py upload-serverless job's status
83+
# independently signals build/upload failures for supported versions.
84+
if ! _search_and_spec_s3_wheel "ddtrace_serverless" "serverless" \
85+
&& ! _search_and_spec_s3_wheel "ddtrace" "manylinux2014"; then
86+
echo "WARNING: No matching ddtrace wheel for ${PY_TAG} ${PLATFORM} in pipeline ${UPSTREAM_PIPELINE_ID} — falling back to released ddtrace from pyproject.toml" >&2
87+
fi
8188
fi
8289
}

0 commit comments

Comments
 (0)