Skip to content

Commit e3b075e

Browse files
fix(ci): isolate tests from egress proxy (#4078)
* fix(ci): isolate PHPTs from Fabric egress proxy * fix(ci): isolate integration tests from Fabric proxy * fix(appsec): unset proxy in test wrapper
1 parent f560ac2 commit e3b075e

4 files changed

Lines changed: 10 additions & 0 deletions

File tree

.gitlab/generate-package.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1217,6 +1217,8 @@ function appsec_image_from_tag_mapping(string $tag): string
12171217
- pecl install datadog_trace.tgz
12181218
- echo "extension=ddtrace.so" | sudo tee $(php -i | awk -F"=> " '/Scan this dir for additional .ini files/ {print $2}')/ddtrace.ini
12191219
- php --ri=ddtrace
1220+
# The Fabric proxy changes network failure semantics in PECL tests.
1221+
- unset HTTP_PROXY HTTPS_PROXY http_proxy https_proxy ALL_PROXY all_proxy
12201222
- TERM=dumb HTTPBIN_HOSTNAME=httpbin-integration HTTPBIN_PORT=8080 DATADOG_HAVE_DEV_ENV=1 DD_TRACE_GIT_METADATA_ENABLED=0 pecl run-tests --showdiff --ini=" -d datadog.trace.sources_path=" -p datadog_trace
12211223
after_script:
12221224
- mkdir artifacts

.gitlab/generate-tracer.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,8 @@ function before_script_steps($with_docker_auth = false) {
571571
- make composer_tests_update
572572
- .gitlab/wait-for-service-ready.sh
573573
script:
574+
# The Fabric proxy changes network failure semantics in integration tests.
575+
- unset HTTP_PROXY HTTPS_PROXY http_proxy https_proxy ALL_PROXY all_proxy
574576
- DD_TRACE_AGENT_TIMEOUT=1000 make $MAKE_TARGET RUST_DEBUG_BUILD=1 PHPUNIT_JUNIT="artifacts/tests/results.xml" <?= ASSERT_NO_MEMLEAKS ?>
575577
<?php after_script(".", true); ?>
576578
- find tests -type f \( -name 'phpunit_error.log' -o -name 'nginx_*.log' -o -name 'apache_*.log' -o -name 'php_fpm_*.log' -o -name 'dd_php_error.log' \) -exec cp --parents '{}' artifacts \;

.gitlab/run_php_language_tests.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#!/usr/bin/env bash
22
set -eo pipefail
33

4+
# The Fabric proxy changes network failure semantics and leaks HTTP_PROXY into $_SERVER.
5+
unset HTTP_PROXY HTTPS_PROXY http_proxy https_proxy ALL_PROXY all_proxy
6+
47
# Helper to parse version strings for comparison
58
function version { echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'; }
69

appsec/cmake/run-tests-wrapper.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ else
6868
set -- "${@:1:$#-1}" "${EXTRA_FLAGS[@]}" "${!#}"
6969
fi
7070

71+
# The Fabric proxy leaks HTTP_PROXY into $_SERVER as a request header.
72+
unset HTTP_PROXY HTTPS_PROXY http_proxy https_proxy ALL_PROXY all_proxy
73+
7174
set -x
7275
exec "$@"
7376

0 commit comments

Comments
 (0)