Skip to content

Commit 65f0c5a

Browse files
feat(ci): Update groovy enforcement label and merge queue documentation (#11897)
feat(ci): Update groovy enforcement label and merge queue documentation Co-authored-by: bruce.bujon <bruce.bujon@datadoghq.com>
1 parent ae4de64 commit 65f0c5a

4 files changed

Lines changed: 21 additions & 10 deletions

File tree

.github/pull_request_template.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,7 @@
1212
Use `solves` instead, and assign the PR [milestone](https://github.com/DataDog/dd-trace-java/milestones) to the issue
1313
- Update the [CODEOWNERS](https://github.com/DataDog/dd-trace-java/blob/master/.github/CODEOWNERS) file on source file addition, migration, or deletion
1414
- Update [public documentation](https://docs.datadoghq.com/tracing/trace_collection/library_config/java/) with any new configuration flags or behaviors
15-
- Add your completed PR to the merge queue by commenting `/merge`. You can also:
16-
- Customize the commit message associated with the merge with `/merge --commit-message "..."`
17-
- Remove your PR from the merge queue with `/merge -c`
18-
- Skip all merge queue checks with `/merge -f --reason "reason"`; please use this judiciously, as some checks do not run at the PR-level (note: the PR still needs to be mergeable, this will only skip the pre-merge build)
19-
- Get more information in [this doc](https://datadoghq.atlassian.net/wiki/spaces/DEVX/pages/3121612126/MergeQueue)
15+
- Once approved, [use merge queue](https://github.com/DataDog/dd-trace-java/blob/master/CONTRIBUTING#merge-queue) to merge the PR
2016

2117
Jira ticket: [PROJ-IDENT]
2218

.github/workflows/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ _Actions:_
124124

125125
* Fail the PR if it introduces any new `.groovy` file, including added, copied, or renamed files whose previous name was not already `.groovy`.
126126

127-
_Recovery:_ Re-write the new Groovy files in Java / JUnit. To override this check entirely, add the `tag: override-groovy-enforcement` label to the PR. Remove the label to re-enable enforcement.
127+
_Recovery:_ Re-write the new Groovy files in Java / JUnit. To override this check entirely, add the `tag: override groovy enforcement` label to the PR. Remove the label to re-enable enforcement.
128128

129129
_Notes:_ The override label skips the workflow entirely.
130130

.github/workflows/enforce-groovy-migration.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ jobs:
5454
5555
// Check for override label — skip all checks if label present
5656
const labels = context.payload.pull_request.labels.map(l => l.name)
57-
if (labels.includes('tag: override-groovy-enforcement')) {
57+
if (labels.includes('tag: override groovy enforcement')) {
5858
await deleteManagedComment()
59-
console.log('tag: override-groovy-enforcement label detected — skipping all checks.')
59+
console.log('tag: override groovy enforcement label detected — skipping all checks.')
6060
return
6161
}
6262
@@ -99,7 +99,7 @@ jobs:
9999
`Please avoid introducing new \`.groovy\` files to this repository.\n\n` +
100100
`${fileList}\n\n` +
101101
`Instead, rewrite the new file(s) in Java / JUnit. See the [How to Test With JUnit Guide](https://github.com/DataDog/dd-trace-java/blob/master/docs/how_to_test_with_junit.md) for more details.\n\n` +
102-
`If this PR needs an exception, add the \`tag: override-groovy-enforcement\` label to bypass this workflow.\n\n` +
102+
`If this PR needs an exception, add the \`tag: override groovy enforcement\` label to bypass this workflow.\n\n` +
103103
managedMarker
104104
if (existingComment) {
105105
await github.rest.issues.updateComment({
@@ -125,5 +125,5 @@ jobs:
125125
}
126126
127127
if (introducedGroovy.length > 0) {
128-
core.setFailed(`${introducedGroovy.length} new Groovy file(s) detected. See PR comment for details. To bypass this workflow, add the 'tag: override-groovy-enforcement' label.`)
128+
core.setFailed(`${introducedGroovy.length} new Groovy file(s) detected. See PR comment for details. To bypass this workflow, add the 'tag: override groovy enforcement' label.`)
129129
}

CONTRIBUTING.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,21 @@ Labels are used to not only categorize but also alter the continuous integration
130130
> For reference, the [full list of all labels available](https://github.com/DataDog/dd-trace-java/labels).
131131
> If you feel one is missing, let [the maintainer team](https://github.com/orgs/DataDog/teams/apm-java) know!
132132
133+
### Merge Queue
134+
135+
Pull requests are merged into the protected branches using [the Datadog GitLab merge queue system](https://datadoghq.atlassian.net/wiki/spaces/DEVX/pages/3121612126/MergeQueue).
136+
Once approved, pull requests can be added to merge queue using the `Merge when ready` button at the bottom of the page, or by commenting `/merge`.
137+
The merge queue will run more tests than the pull request checks, meaning having test failures on merge queue while having pull request checks passing is an expected behavior - the pull request checks are lighter to provide quick feedback during development iterations.
138+
139+
By default, the merge commit message uses the pull request title as its subject and the squashed pull request commit messages as its body.
140+
A custom commit message can be specified by commenting `/merge --commit-message "custom message"`.
141+
142+
Pull requests can be force-merged by commenting: `/merge -f --reason "reason"`.
143+
144+
>[!WARNING]
145+
> By-passing merge queue will effectively merge pull request content without running all continuous integration tests and checks.
146+
> Only by-pass the merge queue to fix the build or help restore the continuous integration status.
147+
133148
## Pull request reviews
134149

135150
### Review expectations

0 commit comments

Comments
 (0)