diff --git a/utils/_context/containers.py b/utils/_context/containers.py index 327e9cfd151..382d1915a2b 100644 --- a/utils/_context/containers.py +++ b/utils/_context/containers.py @@ -1114,6 +1114,11 @@ def post_start(self): logger.stdout(f"Library: {self.library}") + if self._container is not None: + exit_code, output = self.exec_run("cat /binaries/metadata.txt") + if exit_code == 0 and output: + logger.stdout(f"Library metadata:\n{output.decode('utf-8', errors='replace').strip()}") + if self.appsec_rules_file: logger.stdout("Using a custom appsec rules file") diff --git a/utils/build/docker/python/install_ddtrace.sh b/utils/build/docker/python/install_ddtrace.sh index 97e3994e323..f6e43feda70 100755 --- a/utils/build/docker/python/install_ddtrace.sh +++ b/utils/build/docker/python/install_ddtrace.sh @@ -18,6 +18,12 @@ elif [ "$(ls *.whl | wc -l)" = "1" ]; then elif [ $(ls python-load-from-s3 | wc -l) = 1 ]; then GIT_REF=$(cat python-load-from-s3) echo "Install ddtrace from S3, git ref: ${GIT_REF}" + # Try to fetch `metadata.txt` and save it so test output can display it, but don't fail if we cannot + # This includes commit sha, pipeline id, etc that was used to build the artifact + curl -sf https://dd-trace-py-builds.s3.amazonaws.com/${GIT_REF}/metadata.txt > metadata.txt || true + if [ -s metadata.txt ]; then + cat metadata.txt + fi # Install from S3 bucket # NOTE: Artifacts age out after 2 weeks, if this fails then you need to first run the dd-trace-py GitLab CI for the desired commit again # NOTE: Must have `--no-index` otherwise `pip` will look for the highest available version between S3 and PyPI