Skip to content

Commit cc28d89

Browse files
authored
Merge branch 'master' into mhlidd/DD_VERSION
2 parents 9403778 + 14a45ea commit cc28d89

File tree

927 files changed

+30472
-6999
lines changed

Some content is hidden

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

927 files changed

+30472
-6999
lines changed

.circleci/config.continue.yml.j2

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -782,6 +782,7 @@ jobs:
782782
name: Gather muzzle tasks
783783
command: >-
784784
SKIP_BUILDSCAN="true"
785+
GRADLE_OPTS="-Dorg.gradle.jvmargs='-Xmx2G -Xms2G -XX:ErrorFile=/tmp/hs_err_pid%p.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp'"
785786
./gradlew writeMuzzleTasksToFile
786787
<< pipeline.parameters.gradle_flags >>
787788
--max-workers=3
@@ -880,11 +881,27 @@ jobs:
880881
881882
- run:
882883
name: Run APM Integrations tests
884+
environment:
885+
- AWS_ACCESS_KEY_ID: $SYSTEM_TESTS_IDM_AWS_ACCESS_KEY_ID
886+
- AWS_SECRET_ACCESS_KEY: $SYSTEM_TESTS_IDM_AWS_SECRET_ACCESS_KEY
887+
- AWS_REGION: us-east-1
888+
- AWS_DEFAULT_REGION: us-east-1 # AWS services should use `AWS_REGION`, but some still use the older `AWS_DEFAULT_REGION`
883889
# Stop the job after 5m to avoid excessive overhead. Will need adjustment as more tests are added.
884890
no_output_timeout: 5m
885891
command: |
886892
cd system-tests
887893
DD_SITE=datadoghq.com DD_API_KEY=$SYSTEM_TESTS_E2E_DD_API_KEY DD_APPLICATION_KEY=$SYSTEM_TESTS_E2E_DD_APP_KEY ./run.sh INTEGRATIONS
894+
895+
- run:
896+
name: Run IDM Crossed Tracing Libraries propagation tests for messaging
897+
environment:
898+
- AWS_ACCESS_KEY_ID: $SYSTEM_TESTS_IDM_AWS_ACCESS_KEY_ID
899+
- AWS_SECRET_ACCESS_KEY: $SYSTEM_TESTS_IDM_AWS_SECRET_ACCESS_KEY
900+
- AWS_REGION: us-east-1
901+
- AWS_DEFAULT_REGION: us-east-1 # AWS services should use `AWS_REGION`, but some still use the older `AWS_DEFAULT_REGION`
902+
command: |
903+
cd system-tests
904+
DD_API_KEY=$SYSTEM_TESTS_DD_API_KEY ./run.sh CROSSED_TRACING_LIBRARIES
888905
889906
- store_test_results:
890907
path: system-tests/logs_integrations
@@ -1201,6 +1218,20 @@ build_test_jobs: &build_test_jobs
12011218
parallelism: 4
12021219
maxWorkers: 4
12031220
testJvm: "8"
1221+
1222+
- tests:
1223+
requires:
1224+
- ok_to_test
1225+
name: z_test_8_flaky_debugger
1226+
gradleTarget: ":debuggerTest"
1227+
gradleParameters: "-PrunFlakyTests"
1228+
continueOnFailure: true
1229+
triggeredBy: *debugger_modules
1230+
stage: debugger
1231+
cacheType: base
1232+
parallelism: 4
1233+
maxWorkers: 4
1234+
testJvm: "8"
12041235
{% endif %}
12051236
12061237
- tests:
@@ -1404,6 +1435,7 @@ build_test_jobs: &build_test_jobs
14041435
{% for jdk in all_jdks %}
14051436
- "test_{{ jdk }}"
14061437
{% endfor %}
1438+
- muzzle
14071439
- profiling
14081440
- debugger
14091441
- system-tests

.github/workflows/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,15 @@ _Action:_ Clean up old lib-injection OCI images from GitHub Container Registry.
8282

8383
_Recovery:_ Manually trigger the action again.
8484

85+
### prune-old-pull-requests [🔗](prune-old-pull-requests.yaml)
86+
87+
_Trigger:_ Every month or manually.
88+
89+
_Action:_ Mark as stale and comment on pull requests with no update during the last quarter.
90+
Close them if no following update within a week.
91+
92+
_Recovery:_ Manually trigger the action again.
93+
8594
## Code Quality and Security
8695

8796
### analyze-changes [🔗](analyze-changes-with-github-codeql.yaml)

.github/workflows/increment-milestone-on-tag.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
const nextMilestoneTitle = versionNumbers.join('.')
5656
core.info(`Creating next version milestone: ${nextMilestoneTitle}`)
5757
// Create the next milestone
58-
await github.issues.createMilestone({
58+
await github.rest.issues.createMilestone({
5959
owner: context.repo.owner,
6060
repo: context.repo.repo,
6161
title: nextMilestoneTitle
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Prune old pull requests
2+
on:
3+
schedule:
4+
- cron: '0 3 1 * *'
5+
workflow_dispatch:
6+
7+
jobs:
8+
prune-old-pull-requests:
9+
name: Prune old pull requests
10+
runs-on: ubuntu-latest
11+
permissions:
12+
issues: write
13+
pull-requests: write
14+
steps:
15+
- name: Prune old pull requests
16+
uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0
17+
with:
18+
days-before-stale: -1 # Disable general stale bot
19+
days-before-pr-stale: 90 # Only enable stale bot for PRs with no activity for 90 days
20+
stale-pr-message: 'This pull request has been marked as stale because it has not had activity over the past quarter. It will be closed in 7 days if no further activity occurs. Feel free to reopen the PR if you are still working on it.'
21+
close-pr-message: 'This pull request has been closed because it has not had activity over the past quarter. Feel free to reopen the PR if you are still working on it.'
22+
stale-pr-label: 'tag: stale'
23+
operations-per-run: 500

.gitlab-ci.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,6 @@ stages:
1717
- ci-visibility-tests
1818
- generate-signing-key
1919

20-
workflow:
21-
rules:
22-
- if: $POPULATE_CACHE == "true"
23-
variables:
24-
SKIP_SHARED_PIPELINE: "true"
25-
- when: always
26-
2720
variables:
2821
REGISTRY: 486234852809.dkr.ecr.us-east-1.amazonaws.com
2922
BUILD_JOB_NAME: "build"
@@ -210,13 +203,20 @@ deploy_artifacts_to_github:
210203
max: 2
211204
when: always
212205

206+
requirements_json_test:
207+
rules:
208+
- when: on_success
209+
variables:
210+
REQUIREMENTS_BLOCK_JSON_PATH: "metadata/requirements-block.json"
211+
REQUIREMENTS_ALLOW_JSON_PATH: "metadata/requirements-allow.json"
212+
213213
package-oci:
214214
needs: [ build ]
215215

216216
onboarding_tests_installer:
217217
parallel:
218218
matrix:
219-
- ONBOARDING_FILTER_WEBLOG: [test-app-java, test-app-java-container, test-app-java-container-jdk15, test-app-java-alpine-libgcc]
219+
- ONBOARDING_FILTER_WEBLOG: [test-app-java, test-app-java-container, test-app-java-container-jdk15, test-app-java-alpine]
220220
SCENARIO: [ SIMPLE_INSTALLER_AUTO_INJECTION, SIMPLE_AUTO_INJECTION_PROFILING ]
221221
- ONBOARDING_FILTER_WEBLOG: [test-app-java-buildpack]
222222
SCENARIO: [ SIMPLE_INSTALLER_AUTO_INJECTION ]

.gitlab/prepare-oci-package.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ fi
1010
mkdir -p sources
1111
cp ../workspace/dd-java-agent/build/libs/*.jar sources/dd-java-agent.jar
1212
echo -n "$VERSION" > sources/version
13+
cp ../metadata/requirements.json sources/

BUILDING.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This documentation is dedicated to developers to setup their environment, and bu
1010

1111
## Development environment quick check
1212

13-
As a preliminary step, you can quickly check that your development environment is properly set up to build the project running `./setup.sh` from the project root:
13+
To check that your development environment is properly set up to build the project, you will eventually run `./setup.sh` from the project root and should have its output look something like this:
1414

1515
```bash
1616
$ ./setup.sh
@@ -25,6 +25,7 @@ $ ./setup.sh
2525
✅ The git command line is installed.
2626
✅ pre-commit hook is installed in repository.
2727
✅ git config submodule.recurse is set to true.
28+
✅ All git submodules are initialized.
2829
ℹ️ Checking Docker environment:
2930
✅ The docker command line is installed.
3031
✅ The Docker server is running.
@@ -190,4 +191,14 @@ To build the entire project with tests (this can take a very long time) run:
190191
./gradlew clean build
191192
```
192193

193-
After building the project, you can find the jar build artifact into the `dd-java-agent/build/libs` folder.
194+
>[!NOTE]
195+
> Running the complete test suite on a local development environment can be challenging.
196+
> It might take a very long time, and you might encounter few flaky tests along the way.
197+
> It is recommended to only run the tests related to your changes locally, and leave the whole test suite to the continuous integration platform.
198+
199+
To build the JVM agent artifact only run:
200+
```bash
201+
./gradlew :dd-java-agent:shadowJar
202+
```
203+
204+
After building the project, you can find the built JVM agent artifact into the `dd-java-agent/build/libs` folder.

CONTRIBUTING.md

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,8 @@
44

55
Pull requests for bug fixes are welcome, but before submitting new features or changes to current
66
functionality, please [open an issue](https://github.com/DataDog/dd-trace-java/issues/new)
7-
and discuss your ideas or propose the changes you wish to make first. After a resolution is reached a PR can be
8-
submitted for
9-
review.
10-
11-
When opening a pull request, please open it as
12-
a [draft](https://github.blog/2019-02-14-introducing-draft-pull-requests/) to not auto assign reviewers before you feel
13-
the pull request is in a reviewable state.
7+
and discuss your ideas or propose the changes you wish to make first. After a resolution is reached a [PR can be
8+
submitted](#pull-request-guidelines) for review.
149

1510
## Adding instrumentations
1611

@@ -91,6 +86,10 @@ command line should be Java 8.
9186

9287
## Pull Request Guidelines
9388

89+
### Draft first
90+
91+
When opening a pull request, please open it as a [draft](https://github.blog/2019-02-14-introducing-draft-pull-requests/) to not auto assign reviewers before you feel the pull request is in a reviewable state.
92+
9493
### Title Format
9594

9695
Pull request titles should briefly describe the proposed changes in a way that makes sense for the users.
@@ -133,3 +132,17 @@ Labels are not only used to categorize but also alter the continuous integration
133132
>[!NOTE]
134133
> For reference, the [full list of all labels available](https://github.com/DataDog/dd-trace-java/labels).
135134
> If you feel one is missing, let [the maintainer team](https://github.com/orgs/DataDog/teams/apm-java) know!
135+
136+
## Pull Request Reviews
137+
138+
### Review Expectations
139+
140+
After making you pull request ready for review by converting it from draft, you can expect getting an initial review comment within two working days, and a full review within a week of work.
141+
If you don't receive any update, feel free to send a nice reminder to the assigned reviewers using pull request comments or our internal Slack channel.
142+
143+
### Stale Pull Requests
144+
145+
A pull request is considered "stale" if it has had no activity (comments, updates) for the last quarter.
146+
Stale PRs will be commented and labelled as such (using the `tag: stale` label), then closed if they still receive no update for a week after.
147+
148+
Closed PRs can be reopened at any time, but may be closed again if they ever meet the same stale conditions.

buildSrc/call-site-instrumentation-plugin/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ dependencies {
3434
compileOnly("com.google.code.findbugs", "jsr305", "3.0.2")
3535

3636
implementation("org.freemarker", "freemarker", "2.3.30")
37-
implementation("org.ow2.asm", "asm", "9.0")
38-
implementation("org.ow2.asm", "asm-tree", "9.0")
37+
implementation("org.ow2.asm", "asm", "9.7")
38+
implementation("org.ow2.asm", "asm-tree", "9.7")
3939
implementation("com.github.javaparser", "javaparser-symbol-solver-core", "3.24.4")
4040

4141
testImplementation("net.bytebuddy", "byte-buddy", "1.14.18")

communication/src/main/java/datadog/communication/BackendApiFactory.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@
33
import datadog.communication.ddagent.DDAgentFeaturesDiscovery;
44
import datadog.communication.ddagent.SharedCommunicationObjects;
55
import datadog.communication.http.HttpRetryPolicy;
6+
import datadog.communication.http.OkHttpUtils;
67
import datadog.trace.api.Config;
78
import datadog.trace.util.throwable.FatalAgentMisconfigurationError;
89
import java.util.function.Function;
910
import javax.annotation.Nullable;
1011
import okhttp3.HttpUrl;
12+
import okhttp3.OkHttpClient;
1113
import org.slf4j.Logger;
1214
import org.slf4j.LoggerFactory;
1315

@@ -34,8 +36,10 @@ public BackendApiFactory(Config config, SharedCommunicationObjects sharedCommuni
3436
"Agentless mode is enabled and api key is not set. Please set application key");
3537
}
3638
String traceId = config.getIdGenerationStrategy().generateTraceId().toString();
37-
long timeoutMillis = config.getCiVisibilityBackendApiTimeoutMillis();
38-
return new IntakeApi(agentlessUrl, apiKey, traceId, timeoutMillis, retryPolicyFactory, true);
39+
OkHttpClient httpClient =
40+
OkHttpUtils.buildHttpClient(
41+
agentlessUrl, config.getCiVisibilityBackendApiTimeoutMillis());
42+
return new IntakeApi(agentlessUrl, apiKey, traceId, retryPolicyFactory, httpClient, true);
3943
}
4044

4145
DDAgentFeaturesDiscovery featuresDiscovery =

0 commit comments

Comments
 (0)