Skip to content

Commit dd440cb

Browse files
committed
Merge remote-tracking branch 'origin/master' into glopes/helper-rust
2 parents 0d242c6 + f785afe commit dd440cb

147 files changed

Lines changed: 4341 additions & 1049 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitlab-ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ variables:
88
GIT_SUBMODULE_STRATEGY: recursive
99
# Only clone libdatadog submodule by default
1010
GIT_SUBMODULE_PATHS: libdatadog
11-
DOWNSTREAM_REL_BRANCH:
11+
RELIABILITY_ENV_BRANCH:
1212
value: "master"
1313
description: "Run a specific datadog-reliability-env branch downstream"
1414
SYSTEM_TESTS_LIBRARY: php
@@ -94,3 +94,4 @@ package-trigger:
9494
PARENT_PIPELINE_ID: $CI_PIPELINE_ID
9595
GIT_SUBMODULE_PATHS: libdatadog appsec/third_party/cpp-base64 appsec/third_party/libddwaf appsec/third_party/msgpack-c
9696
NIGHTLY_BUILD: $NIGHTLY_BUILD
97+
RELIABILITY_ENV_BRANCH: $RELIABILITY_ENV_BRANCH

.gitlab/benchmarks.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,10 @@ workflow:
3333
interruptible: true
3434
- if: $CI_COMMIT_REF_NAME == "master"
3535
when: manual
36+
allow_failure: true
3637
interruptible: false
3738
- when: manual
39+
allow_failure: true
3840
interruptible: true
3941

4042
.benchmarks-appsec-rules: &benchmarks-appsec-rules
@@ -54,8 +56,10 @@ workflow:
5456
interruptible: true
5557
- if: $CI_COMMIT_REF_NAME == "master"
5658
when: manual
59+
allow_failure: true
5760
interruptible: false
5861
- when: manual
62+
allow_failure: true
5963
interruptible: true
6064

6165
.benchmarks-tracer-rules: &benchmarks-tracer-rules
@@ -67,8 +71,10 @@ workflow:
6771
interruptible: true
6872
- if: $CI_COMMIT_REF_NAME == "master"
6973
when: manual
74+
allow_failure: true
7075
interruptible: false
7176
- when: manual
77+
allow_failure: true
7278
interruptible: true
7379

7480
.on-master-or-nightly-benchmarks-or-release-always-and-not-interruptible: &on-master-or-nightly-benchmarks-or-release-always-and-not-interruptible
@@ -79,6 +85,7 @@ workflow:
7985
.macrobenchmarks-rules: &macrobenchmarks-rules
8086
- <<: *on-master-or-nightly-benchmarks-or-release-always-and-not-interruptible
8187
- when: manual
88+
allow_failure: true
8289
interruptible: true
8390

8491
.pre-release-performance-quality-gates-rules: &pre-release-performance-quality-gates-rules

.gitlab/ci-images.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ CentOS:
1212
stage: ci-build
1313
rules:
1414
- when: manual
15+
allow_failure: true
1516
needs: []
1617
tags: ["arch:amd64"]
1718
timeout: 4h
@@ -40,6 +41,7 @@ Alpine:
4041
stage: ci-build
4142
rules:
4243
- when: manual
44+
allow_failure: true
4345
needs: []
4446
tags: ["arch:amd64"]
4547
timeout: 4h
@@ -68,6 +70,7 @@ Bookworm:
6870
stage: ci-build
6971
rules:
7072
- when: manual
73+
allow_failure: true
7174
needs: []
7275
tags: ["arch:amd64"]
7376
timeout: 4h
@@ -98,6 +101,7 @@ Buster:
98101
stage: ci-build
99102
rules:
100103
- when: manual
104+
allow_failure: true
101105
needs: []
102106
tags: ["arch:amd64"]
103107
timeout: 4h

.gitlab/generate-appsec.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,7 @@
433433
- ARCH: ["amd64", "arm64"]
434434
rules:
435435
- when: manual
436+
allow_failure: true
436437
needs: []
437438
script:
438439
- cd appsec/tests/integration

.gitlab/generate-common.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ function dockerhub_login() {
200200
MONGO_INITDB_ROOT_PASSWORD: test
201201

202202
sqlsrv:
203-
name: registry.ddbuild.io/images/mirror/sqlserver:2022-latest
203+
name: registry.ddbuild.io/images/mirror/sqlserver:2019-CU15-ubuntu-20.04
204204
alias: sqlsrv-integration
205205
variables:
206206
ACCEPT_EULA: Y

.gitlab/generate-package.php

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
# One pipeline job overrides
9999
configure_system_tests:
100100
variables:
101-
SYSTEM_TESTS_SCENARIOS_GROUPS: "simple_onboarding,simple_onboarding_profiling,lib-injection,lib-injection-profiling,docker-ssi"
101+
SYSTEM_TESTS_SCENARIOS_GROUPS: "simple_onboarding,simple_onboarding_profiling,simple_onboarding_appsec,lib-injection,lib-injection-profiling,docker-ssi"
102102
ALLOW_MULTIPLE_CHILD_LEVELS: "false"
103103

104104
package-oci:
@@ -488,18 +488,32 @@
488488
IMAGE: "<?= $image ?>"
489489
ABI_NO: "<?= $abi_no ?>"
490490
PHP_VERSION: "<?= $major_minor ?>"
491-
GIT_STRATEGY: clone
492-
GIT_CONFIG_COUNT: 2
493-
GIT_CONFIG_KEY_0: core.longpaths
494-
GIT_CONFIG_VALUE_0: true
495-
GIT_CONFIG_KEY_1: core.symlinks
496-
GIT_CONFIG_VALUE_1: true
491+
GIT_STRATEGY: none
497492
CONTAINER_NAME: ${CI_JOB_NAME_SLUG}-${CI_JOB_ID}
498493
script: |
494+
# Aggressive Git cleanup
495+
Write-Host "Performing aggressive workspace cleanup with cmd.exe..."
496+
cmd /c "if exist .git rmdir /s /q .git" 2>$null
497+
cmd /c "for /d %d in (*) do @rmdir /s /q ""%d""" 2>$null
498+
cmd /c "del /f /s /q *" 2>$null
499+
Write-Host "Cleanup complete."
500+
499501
# Make sure we actually fail if a command fails
500502
$ErrorActionPreference = 'Stop'
501503
$PSNativeCommandUseErrorActionPreference = $true
502504

505+
# Manual git clone with proper config
506+
Write-Host "Cloning repository..."
507+
git config --global core.longpaths true
508+
git config --global core.symlinks true
509+
git clone --branch $env:CI_COMMIT_REF_NAME $env:CI_REPOSITORY_URL .
510+
git checkout $env:CI_COMMIT_SHA
511+
512+
# Initialize submodules
513+
Write-Host "Initializing submodules..."
514+
git submodule update --init --recursive
515+
Write-Host "Git setup complete."
516+
503517
mkdir extensions_x86_64
504518
mkdir extensions_x86_64_debugsymbols
505519

@@ -1348,8 +1362,9 @@
13481362
tags: [ "arch:amd64" ]
13491363
rules:
13501364
- if: $CI_COMMIT_REF_NAME == "master" && $CI_PIPELINE_SOURCE != "schedule"
1351-
when: always
1365+
when: on_success
13521366
- when: manual
1367+
allow_failure: true
13531368
needs:
13541369
- job: "prepare code"
13551370
artifacts: true
@@ -1394,9 +1409,9 @@
13941409
tags: [ "runner:main", "size:large" ]
13951410
rules:
13961411
- if: $CI_PIPELINE_SOURCE == "schedule" && $NIGHTLY
1397-
when: always
1412+
when: on_success
13981413
- if: $CI_COMMIT_REF_NAME =~ /^ddtrace-/
1399-
when: always
1414+
when: on_success
14001415
- when: manual
14011416
allow_failure: true
14021417
needs:
@@ -1422,6 +1437,7 @@
14221437

14231438
deploy_to_reliability_env:
14241439
stage: shared-pipeline
1440+
allow_failure: true
14251441
needs:
14261442
- job: "bundle for reliability env"
14271443
rules:

.gitlab/generate-tracer.php

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -118,20 +118,33 @@ function before_script_steps($with_docker_auth = false) {
118118
- PHP_MAJOR_MINOR: <?= json_encode($windows_minor_major_targets) ?>
119119

120120
variables:
121-
GIT_CONFIG_COUNT: 2
122-
GIT_CONFIG_KEY_0: core.longpaths
123-
GIT_CONFIG_VALUE_0: true
124-
GIT_CONFIG_KEY_1: core.symlinks
125-
GIT_CONFIG_VALUE_1: true
126121
CONTAINER_NAME: $CI_JOB_NAME_SLUG
127-
GIT_STRATEGY: clone
128-
GIT_CLEAN_FLAGS: -ffdxq
122+
GIT_STRATEGY: none
129123
IMAGE: "registry.ddbuild.io/images/mirror/datadog/dd-trace-ci:php-${PHP_MAJOR_MINOR}_windows"
130124
script: |
125+
# Agressive Git cleanup
126+
Write-Host "Performing aggressive workspace cleanup with cmd.exe..."
127+
cmd /c "if exist .git rmdir /s /q .git" 2>$null
128+
cmd /c "for /d %d in (*) do @rmdir /s /q ""%d""" 2>$null
129+
cmd /c "del /f /s /q *" 2>$null
130+
Write-Host "Cleanup complete."
131+
131132
# Make sure we actually fail if a command fails
132133
$ErrorActionPreference = 'Stop'
133134
$PSNativeCommandUseErrorActionPreference = $true
134135

136+
# Manual git clone with proper config
137+
Write-Host "Cloning repository..."
138+
git config --global core.longpaths true
139+
git config --global core.symlinks true
140+
git clone --branch $env:CI_COMMIT_REF_NAME $env:CI_REPOSITORY_URL .
141+
git checkout $env:CI_COMMIT_SHA
142+
143+
# Initialize submodules
144+
Write-Host "Initializing submodules..."
145+
git submodule update --init --recursive
146+
Write-Host "Git setup complete."
147+
135148
mkdir dumps
136149

137150
$names = @('httpbin-integration','request-replayer', $env:CONTAINER_NAME)
@@ -492,7 +505,7 @@ function before_script_steps($with_docker_auth = false) {
492505
DD_TRACE_GIT_METADATA_ENABLED: "0"
493506
REPORT_EXIT_STATUS: "1"
494507
TEST_PHP_JUNIT: "${CI_PROJECT_DIR}/artifacts/tests/php-tests.xml"
495-
SKIP_ONLINE_TEST: "1"
508+
SKIP_ONLINE_TESTS: "1"
496509
<?php if (version_compare($major_minor, "7.2", ">=")): /* too expensive */ ?>
497510
DD_INSTRUMENTATION_TELEMETRY_ENABLED: 0
498511
<?php endif; ?>
@@ -607,6 +620,9 @@ function before_script_steps($with_docker_auth = false) {
607620
WAIT_FOR: zookeeper:2181 kafka-integration:9092
608621
CI_DEBUG_SERVICES: "true"
609622
<?php endif; ?>
623+
<?php if (str_contains($target, "sqlsrv")): ?>
624+
WAIT_FOR: sqlsrv-integration:1433
625+
<?php endif; ?>
610626
<?php if (preg_match("(test_web_symfony_(2|30|33|40))", $target)): ?>
611627
COMPOSER_VERSION: 2.2
612628
<?php endif; ?>
@@ -751,3 +767,4 @@ function before_script_steps($with_docker_auth = false) {
751767
- if: $CI_COMMIT_REF_NAME == "master"
752768
when: always
753769
- when: manual
770+
allow_failure: true

.gitlab/one-pipeline.locked.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# DO NOT EDIT THIS FILE MANUALLY
22
# This file is auto-generated by automation.
33
include:
4-
- remote: https://gitlab-templates.ddbuild.io/libdatadog/one-pipeline/ca/c6ea92df19738f28d6e7c3e4fea86d030fa801ac3361427d6acb6f99a917c28a/one-pipeline.yml
4+
- remote: https://gitlab-templates.ddbuild.io/libdatadog/one-pipeline/ca/d0b85ce8f091ecfcf164b92dbb8a24affee699ef5dac9414f72765ce77df24c0/one-pipeline.yml

.gitlab/wait-for-service-ready.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ detect_service_type() {
1212
kafka*) echo "kafka" ;;
1313
redis*) echo "redis" ;;
1414
httpbin*) echo "httpbin" ;;
15+
sqlsrv-integration) echo "sqlsrv" ;;
1516
*) echo "generic" ;;
1617
esac
1718
}
@@ -77,6 +78,14 @@ wait_for_single_service() {
7778
return 0
7879
fi
7980
;;
81+
sqlsrv)
82+
# SQL Server readiness check
83+
if timeout 5 bash -c "echo > /dev/tcp/${HOST}/${PORT}" 2>/dev/null; then
84+
echo "SQL Server port ${HOST}:${PORT} is open"
85+
sleep 5
86+
return 0
87+
fi
88+
;;
8089
generic|*)
8190
# For generic services, just verify port + HTTP 200/health endpoint
8291
if curl -sf "http://${HOST}:${PORT}/" > /dev/null 2>&1 || curl -sf "http://${HOST}:${PORT}/health" > /dev/null 2>&1; then

0 commit comments

Comments
 (0)