Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/trunk' into KAFKA-17516
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewJSchofield committed Jan 20, 2025
2 parents a2254c1 + bcbc72e commit 80c8d9d
Show file tree
Hide file tree
Showing 2,209 changed files with 81,308 additions and 71,051 deletions.
75 changes: 75 additions & 0 deletions .github/actions/run-gradle/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
---
name: "Run Tests with Gradle"
description: "Run specified Gradle test tasks with configuration for timeout and test catalog."
inputs:
# Composite actions do not support typed parameters. Everything is treated as a string
# See: https://github.com/actions/runner/issues/2238
test-task:
description: "The test suite to run. Either 'test' or 'quarantinedTest'."
required: true
timeout-minutes:
description: "The timeout for the tests, in minutes."
required: true
test-catalog-path:
description: "The file path of the test catalog file."
required: true
build-scan-artifact-name:
description: "The name to use for archiving the build scan."
required: true
outputs:
gradle-exitcode:
description: "The result of the Gradle test task."
value: ${{ steps.run-tests.outputs.exitcode }}
runs:
using: "composite"
steps:
- name: Run JUnit Tests (${{ inputs.test-task }})
# Gradle flags
# --build-cache: Let Gradle restore the build cache
# --no-scan: Don't attempt to publish the scan yet. We want to archive it first.
# --continue: Keep running even if a test fails
# -PcommitId Prevent the Git SHA being written into the jar files (which breaks caching)
shell: bash
id: run-tests
env:
TIMEOUT_MINUTES: ${{ inputs.timeout-minutes}}
TEST_CATALOG: ${{ inputs.test-catalog-path }}
TEST_TASK: ${{ inputs.test-task }}
run: |
set +e
./.github/scripts/thread-dump.sh &
timeout ${TIMEOUT_MINUTES}m ./gradlew --build-cache --continue --no-scan \
-PtestLoggingEvents=started,passed,skipped,failed \
-PmaxParallelForks=2 \
-PmaxTestRetries=1 -PmaxTestRetryFailures=3 \
-PmaxQuarantineTestRetries=3 -PmaxQuarantineTestRetryFailures=0 \
-Pkafka.test.catalog.file=$TEST_CATALOG \
-PcommitId=xxxxxxxxxxxxxxxx \
$TEST_TASK
exitcode="$?"
echo "exitcode=$exitcode" >> $GITHUB_OUTPUT
- name: Archive build scan (${{ inputs.test-task }})
if: always()
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.build-scan-artifact-name }}
path: ~/.gradle/build-scan-data
compression-level: 9
if-no-files-found: ignore
12 changes: 12 additions & 0 deletions .github/configs/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,15 @@ kraft:
- any-glob-to-any-file:
- 'metadata/**'
- 'raft/**'

dependencies:
- changed-files:
- any-glob-to-any-file:
- "grade/dependencies.gradle"
- "LICENSE-binary"

tiered-storage:
- changed-files:
- any-glob-to-any-file:
- '*/src/*/java/org/apache/kafka/server/log/remote/**'
- '*/src/*/java/kafka/log/remote/**'
Loading

0 comments on commit 80c8d9d

Please sign in to comment.