You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.'
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+20-7Lines changed: 20 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,13 +4,8 @@
4
4
5
5
Pull requests for bug fixes are welcome, but before submitting new features or changes to current
6
6
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.
14
9
15
10
## Adding instrumentations
16
11
@@ -91,6 +86,10 @@ command line should be Java 8.
91
86
92
87
## Pull Request Guidelines
93
88
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
+
94
93
### Title Format
95
94
96
95
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
133
132
>[!NOTE]
134
133
> For reference, the [full list of all labels available](https://github.com/DataDog/dd-trace-java/labels).
135
134
> 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.
Copy file name to clipboardExpand all lines: docs/how_to_test.md
+26-4Lines changed: 26 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ Spock framework provides an alternative for more complex test scenarios, or test
12
12
2. A variant of unit tests are **instrumented tests**.
13
13
Their purpose is similar to the unit tests but the tested code is instrumented by the java agent (`:dd-trace-java:java-agent`) while running. They extend the Spock specification `datadog.trace.agent.test.AgentTestRunner` which allows to test produced traces and metrics.
14
14
15
-
3. The third type of tests are **Muzzle checks.
15
+
3. The third type of tests are **Muzzle checks**.
16
16
Their goal is to check the [Muzzle directives](./how_instrumentations_work.md#muzzle), making sure instrumentations are safe to load against specific library versions.
17
17
18
18
3. The fourth type of tests are **integration tests**.
@@ -31,22 +31,32 @@ They are intended to test behavior consistency between all the client libraries,
31
31
### Forked Tests
32
32
33
33
Independently of the type of test, test can be run in another (forked) JVM than the one running Gradle.
34
-
This behavior is implicit when the test class name is suffixed by `ForkedTest` (eg `SomeFeatureForkedTest`). This mechanism exists to make sure either java agent state or static data are reset between test runs.
34
+
This behavior is implicit when the test class name is suffixed by `ForkedTest` (eg `SomeFeatureForkedTest`).
35
+
This mechanism exists to make sure either java agent state or static data are reset between test runs.
36
+
37
+
> [!NOTE]
38
+
> Forked tests are not run part of the gradle `test` task.
39
+
> In order to run them, you need to use the `forkedTest` task instead.
35
40
36
41
### Flaky Tests
37
42
38
43
If a test runs unreliably, or doen't have a fully deterministic behavior, this will lead into recurrent unexpected errors in continuous integration.
39
44
In order to identify such tests and avoid the continuous integration to fail, they are marked as _flaky_ and must be annotated with the `@Flaky` annotation.
40
45
46
+
> [!TIP]
47
+
> In case your pull request checks failed due to some unexpected flaky tests, you can retry the continous integration pilepeline on CircleCI using the `Rerun workflow from failed` button:
48
+
49
+

50
+
41
51
## Running Tests
42
52
43
53
You can run the whole project test suite using `./gradlew test` but expect it to take a certain time.
44
-
Instead, you can run test for a specific module (ex. `:dd-java-agent:instrumentation:opentelemetry:opentelemetry-1.4`) using the test command for this module only: `./gradlew :dd-java-agent:instrumentation:opentelemetry:opentelemetry-1.4:test`.
54
+
Instead, you can run tests for a specific module (ex. `:dd-java-agent:instrumentation:opentelemetry:opentelemetry-1.4`) using the test command for this module only: `./gradlew :dd-java-agent:instrumentation:opentelemetry:opentelemetry-1.4:test`.
45
55
46
56
> [!TIP]
47
57
> Flaky tests can be disabled by setting the Gradle property `skipFlakyTests` (ex. `./gradlew -PskipFlakyTests <task>`).
48
58
49
-
### Running tests on another JVM
59
+
### Running Tests on Another JVM
50
60
51
61
To run tests on a different JVM than the one used for doing the build, you need two things:
52
62
@@ -59,6 +69,18 @@ To run tests on a different JVM than the one used for doing the build, you need
59
69
> [!NOTE]
60
70
> Please note that the JDK name needs to end with the JDK version, e.g. `11`, `ZULU15`, `ORACLE8`, `GRAALVM17`, etc.
61
71
72
+
### Running System Tests
73
+
74
+
The system tests are setup to run on continous integration as pull request check.
75
+
76
+
If you would like to run them locally, you would have to grab [a local copy of the system tests](https://github.com/DataDog/system-tests), and run them from there.
77
+
You can make them use your development version of `dd-trace-java` by [dropping the built artifacts to the `/binaries` folder](https://github.com/DataDog/system-tests/blob/main/docs/execute/binaries.md#java-library) of your local copy of the system tests.
78
+
79
+
If you would like to run another version of the system tests on continuous integration, or update them to the latest version, you would need to use [the update pinned system tests script](../.circleci/update_pinned_system_tests.sh) as your pull request won't use the latest `main` version from the system test repository, but a pinned version.
80
+
81
+
> [!NOTE]
82
+
> The system tests version used for continous integration is defined using `default_system_tests_commit` in [CircleCI configuration](../.circleci/config.continue.yml.j2).
83
+
62
84
### The APM test agent
63
85
64
86
The APM test agent emulates the APM endpoints of the Datadog Agent.
0 commit comments