Skip to content

Commit ecbe34c

Browse files
authored
Merge branch 'master' into codex/find-and-fix-critical-bug-in-dd-java-agent/agent-iast
2 parents 8739467 + aa9dd27 commit ecbe34c

File tree

46 files changed

+525
-545
lines changed

Some content is hidden

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

46 files changed

+525
-545
lines changed

.circleci/upload_ciapp.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ java_prop() {
2020
# Upload test results to CI Visibility
2121
junit_upload() {
2222
# based on tracer implementation: https://github.com/DataDog/dd-trace-java/blob/master/dd-java-agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap/instrumentation/decorator/TestDecorator.java#L55-L77
23+
# Overwriting the tag with the GitHub repo URL instead of the GitLab one. Otherwise, some Test Optimization features won't work.
2324
DD_API_KEY=$1 \
2425
datadog-ci junit upload --service $SERVICE_NAME \
2526
--logs \
@@ -30,6 +31,7 @@ junit_upload() {
3031
--tags "os.architecture:$(java_prop os.arch)" \
3132
--tags "os.platform:$(java_prop os.name)" \
3233
--tags "os.version:$(java_prop os.version)" \
34+
--tags "git.repository_url:https://github.com/DataDog/dd-trace-java" \
3335
./results
3436
}
3537

.github/workflows/README.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -115,16 +115,6 @@ _Action:_
115115

116116
_Notes:_ Results are sent on both production and staging environments.
117117

118-
### check-ci-pipelines [🔗](check-ci-pipelines.yaml)
119-
120-
_Trigger:_ When opening or updating a PR.
121-
122-
_Action:_ This action will check all other continuous integration jobs (Github action, Gitlab, CircleCi), and will fail if any of them fails.
123-
The purpose of this job is to be required for PR merges, achieving Green CI Policy.
124-
It got an `ignored` parameters to exclude some jobs if they are temprorary failing.
125-
126-
_Recovery:_ Manually trigger the action on the desired branch.
127-
128118
### comment-on-submodule-update [🔗](comment-on-submodule-update.yaml)
129119

130120
_Trigger:_ When creating a PR commits to `master` or a `release/*` branch with a Git Submodule update.

.github/workflows/analyze-changes.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
${{ runner.os }}-gradle-
4141
4242
- name: Initialize CodeQL
43-
uses: github/codeql-action/init@fca7ace96b7d713c7035871441bd52efbe39e27e # v3.28.19
43+
uses: github/codeql-action/init@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0
4444
with:
4545
languages: 'java'
4646
build-mode: 'manual'
@@ -57,7 +57,7 @@ jobs:
5757
--build-cache --parallel --stacktrace --no-daemon --max-workers=4
5858
5959
- name: Perform CodeQL Analysis and upload results to GitHub Security tab
60-
uses: github/codeql-action/analyze@fca7ace96b7d713c7035871441bd52efbe39e27e # v3.28.19
60+
uses: github/codeql-action/analyze@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0
6161

6262
trivy:
6363
name: Analyze changes with Trivy
@@ -122,7 +122,7 @@ jobs:
122122
TRIVY_JAVA_DB_REPOSITORY: ghcr.io/aquasecurity/trivy-java-db,public.ecr.aws/aquasecurity/trivy-java-db
123123

124124
- name: Upload Trivy scan results to GitHub Security tab
125-
uses: github/codeql-action/upload-sarif@fca7ace96b7d713c7035871441bd52efbe39e27e # v3.28.19
125+
uses: github/codeql-action/upload-sarif@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0
126126
if: always()
127127
with:
128128
sarif_file: 'trivy-results.sarif'

.github/workflows/check-ci-pipelines.yml

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

.github/workflows/run-system-tests.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,12 @@ jobs:
6262
scenarios_groups: tracer-release
6363
excluded_scenarios: CROSSED_TRACING_LIBRARIES,INTEGRATIONS_AWS,APM_TRACING_E2E_OTEL,APM_TRACING_E2E_SINGLE_SPAN,PROFILING # require AWS and datadog credentials
6464
skip_empty_scenarios: true
65+
66+
# Ensure the main job is run to completion
67+
check:
68+
name: Check system tests success
69+
runs-on: ubuntu-latest
70+
needs:
71+
- main
72+
steps:
73+
- run: exit 0

.gitlab-ci.yml

Lines changed: 2 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
include:
2-
- project: DataDog/apm-reliability/libdatadog-build
3-
ref: 0f677257308e1c379af490b754febfb40fa2c06d
4-
file: templates/ci_authenticated_job.yml
52
- local: ".gitlab/one-pipeline.locked.yml"
63
- local: ".gitlab/benchmarks.yml"
74
- local: ".gitlab/macrobenchmarks.yml"
@@ -31,7 +28,7 @@ variables:
3128
GRADLE_VERSION: "8.5" # must match gradle-wrapper.properties
3229
MAVEN_REPOSITORY_PROXY: "http://artifactual.artifactual.all-clusters.local-dc.fabric.dog:8081/repository/maven-central/"
3330
GRADLE_PLUGIN_PROXY: "http://artifactual.artifactual.all-clusters.local-dc.fabric.dog:8081/repository/gradle-plugin-portal-proxy/"
34-
BUILDER_IMAGE_VERSION_PREFIX: "" # use either an empty string (e.g. "") for latest images or a version followed by a hyphen (e.g. "v25.05-")
31+
BUILDER_IMAGE_VERSION_PREFIX: "v25.06-" # use either an empty string (e.g. "") for latest images or a version followed by a hyphen (e.g. "v25.05-")
3532
REPO_NOTIFICATION_CHANNEL: "#apm-java-escalations"
3633
DEFAULT_TEST_JVMS: /^(8|11|17|21)$/
3734
PROFILE_TESTS:
@@ -136,6 +133,7 @@ default:
136133
policy: $BUILD_CACHE_POLICY
137134
before_script:
138135
- source .gitlab/gitlab-utils.sh
136+
- mkdir -p .gradle
139137
- export GRADLE_USER_HOME=$(pwd)/.gradle
140138
- |
141139
# Don't put jvm args here as it will be picked up by child gradle processes used in tests
@@ -153,7 +151,6 @@ default:
153151
# with Gitlab caching, .gradle is always owned by root and thus gradle's chmod invocation fails
154152
# This dance is a hack to have .gradle owned by the Gitlab runner user
155153
- gitlab_section_start "gradle-dance" "Fix .gradle directory permissions"
156-
- mkdir -p .gradle
157154
- cp -r .gradle .gradle-copy
158155
- rm -rf .gradle
159156
- mv .gradle-copy .gradle
@@ -799,37 +796,3 @@ create_key:
799796
expire_in: 13 mos
800797
paths:
801798
- pubkeys
802-
803-
tracer-base-image-release:
804-
extends: .ci_authenticated_job
805-
stage: publish
806-
needs: [ build ]
807-
rules:
808-
- if: '$POPULATE_CACHE'
809-
when: never
810-
- if: '$CI_COMMIT_TAG =~ /^v1\..*/'
811-
when: on_success
812-
dependencies:
813-
- build
814-
script:
815-
- echo $GH_TOKEN|docker login ghcr.io/datadog -u uploader --password-stdin
816-
- mkdir -p ./tooling/ci/binaries/ && cp workspace/dd-java-agent/build/libs/*.jar ./tooling/ci/binaries/dd-java-agent.jar
817-
- docker buildx build -t ghcr.io/datadog/dd-trace-java/dd-trace-java:latest -f ./tooling/ci/Dockerfile .
818-
- docker push ghcr.io/datadog/dd-trace-java/dd-trace-java:latest
819-
820-
tracer-base-image-snapshot:
821-
extends: .ci_authenticated_job
822-
stage: publish
823-
needs: [ build ]
824-
rules:
825-
- if: '$POPULATE_CACHE'
826-
when: never
827-
- if: '$CI_COMMIT_BRANCH == "master"'
828-
when: on_success
829-
dependencies:
830-
- build
831-
script:
832-
- echo $GH_TOKEN|docker login ghcr.io/datadog -u uploader --password-stdin
833-
- mkdir -p ./tooling/ci/binaries/ && cp workspace/dd-java-agent/build/libs/*.jar ./tooling/ci/binaries/dd-java-agent.jar
834-
- docker buildx build -t ghcr.io/datadog/dd-trace-java/dd-trace-java:latest_snapshot -f ./tooling/ci/Dockerfile .
835-
- docker push ghcr.io/datadog/dd-trace-java/dd-trace-java:latest_snapshot

.gitlab/benchmarks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
script:
1616
- export ARTIFACTS_DIR="$(pwd)/reports" && mkdir -p "${ARTIFACTS_DIR}"
1717
- git config --global url."https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.ddbuild.io/DataDog/".insteadOf "https://github.com/DataDog/"
18-
- git clone --branch dd-trace-java/tracer-benchmarks https://github.com/DataDog/benchmarking-platform.git /platform && cd /platform
18+
- git clone --branch dd-trace-java/tracer-benchmarks-parallel https://github.com/DataDog/benchmarking-platform.git /platform && cd /platform
1919
artifacts:
2020
name: "reports"
2121
paths:

benchmark/benchmarks.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@ if [[ ! -f "${TRACER}" ]]; then
3333
cd "${SCRIPT_DIR}"
3434
fi
3535

36-
# Cleanup previous reports
37-
rm -rf "${REPORTS_DIR}"
38-
mkdir -p "${REPORTS_DIR}"
39-
4036
if [[ "$#" == '0' ]]; then
4137
for type in 'startup' 'load' 'dacapo'; do
4238
run_benchmarks "$type"

benchmark/load/insecure-bank/benchmark.json

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

benchmark/load/insecure-bank/k6.js

Lines changed: 53 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,62 @@
11
import http from 'k6/http';
22
import {checkResponse, isOk, isRedirect} from "../../utils/k6.js";
33

4-
const baseUrl = 'http://localhost:8080';
4+
const variants = {
5+
"no_agent": {
6+
"APP_URL": 'http://localhost:8080',
7+
},
8+
"tracing": {
9+
"APP_URL": 'http://localhost:8081',
10+
},
11+
"profiling": {
12+
"APP_URL": 'http://localhost:8082',
13+
},
14+
"iast": {
15+
"APP_URL": 'http://localhost:8083',
16+
},
17+
"iast_GLOBAL": {
18+
"APP_URL": 'http://localhost:8084',
19+
},
20+
"iast_FULL": {
21+
"APP_URL": 'http://localhost:8085',
22+
},
23+
}
24+
25+
export const options = function (variants) {
26+
let scenarios = {};
27+
for (const variant of Object.keys(variants)) {
28+
scenarios[`load--insecure-bank--${variant}--warmup`] = {
29+
executor: 'constant-vus', // https://grafana.com/docs/k6/latest/using-k6/scenarios/executors/#all-executors
30+
vus: 5,
31+
duration: '20s',
32+
gracefulStop: '2s',
33+
env: {
34+
"APP_URL": variants[variant]["APP_URL"]
35+
}
36+
};
37+
38+
scenarios[`load--insecure-bank--${variant}--high_load`] = {
39+
executor: 'constant-vus',
40+
vus: 5,
41+
startTime: '22s',
42+
duration: '15s',
43+
gracefulStop: '2s',
44+
env: {
45+
"APP_URL": variants[variant]["APP_URL"]
46+
}
47+
};
48+
}
549

6-
export const options = {
7-
discardResponseBodies: true,
8-
vus: 5,
9-
iterations: 40000
10-
};
50+
return {
51+
discardResponseBodies: true,
52+
scenarios,
53+
}
54+
}(variants);
1155

1256
export default function () {
1357

1458
// login form
15-
const loginResponse = http.post(`${baseUrl}/login`, {
59+
const loginResponse = http.post(`${__ENV.APP_URL}/login`, {
1660
username: 'john',
1761
password: 'test'
1862
}, {
@@ -21,11 +65,11 @@ export default function () {
2165
checkResponse(loginResponse, isRedirect);
2266

2367
// dashboard
24-
const dashboard = http.get(`${baseUrl}/dashboard`);
68+
const dashboard = http.get(`${__ENV.APP_URL}/dashboard`);
2569
checkResponse(dashboard, isOk);
2670

2771
// logout
28-
const logout = http.get(`${baseUrl}/j_spring_security_logout`, {
72+
const logout = http.get(`${__ENV.APP_URL}/j_spring_security_logout`, {
2973
redirects: 0
3074
});
3175
checkResponse(logout, isRedirect);

0 commit comments

Comments
 (0)