-
Notifications
You must be signed in to change notification settings - Fork 14k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'trunk' into gh-KAFKA-17564
# Conflicts: # core/src/test/scala/unit/kafka/controller/KafkaControllerTest.scala # core/src/test/scala/unit/kafka/server/FinalizedFeatureChangeListenerTest.scala
- Loading branch information
Showing
399 changed files
with
6,817 additions
and
23,568 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# 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: "Approve Workflow Run" | ||
description: "Approve a Workflow run that has been submitted by a non-committer" | ||
inputs: | ||
gh-token: | ||
description: "The GitHub token for use with the CLI" | ||
required: true | ||
repository: | ||
description: "The GitHub repository" | ||
required: true | ||
default: "apache/kafka" | ||
run_id: | ||
description: "The Workflow Run ID" | ||
required: true | ||
pr_number: | ||
description: "The Pull Request number" | ||
required: true | ||
commit_sha: | ||
description: "The SHA of the commit the run is for" | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Approve Workflow Run | ||
shell: bash | ||
env: | ||
GH_TOKEN: ${{ inputs.gh-token }} | ||
run: | | ||
echo "Approving workflow run ${{ inputs.run_id }} for PR ${{ inputs.pr_number }} at SHA ${{ inputs.commit_sha }}"; | ||
gh api --method POST \ | ||
-H 'Accept: application/vnd.github+json' \ | ||
-H 'X-GitHub-Api-Version: 2022-11-28' \ | ||
/repos/${{ inputs.repository }}/actions/runs/${{ inputs.run_id }}/approve |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
# 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. | ||
|
||
build: | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- '.github/**' | ||
- 'gradle/**' | ||
- '*gradlew*' | ||
|
||
clients: | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- 'clients/**' | ||
|
||
|
||
tests: | ||
- all: | ||
- changed-files: | ||
- any-glob-to-all-files: | ||
- 'tests/**' | ||
- '**/test/**' | ||
|
||
|
||
connect: | ||
- all: | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- 'connect/**/*' | ||
- all-globs-to-all-files: | ||
- '!connect/mirror/*' | ||
|
||
mirror-maker-2: | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- 'connect/mirror/**' | ||
|
||
|
||
core: | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- 'core/**' | ||
- '*server*/**' | ||
|
||
storage: | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- 'storage/**' | ||
|
||
streams: | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- 'streams/**' | ||
|
||
tools: | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- 'tools/**' | ||
- 'trogdor/**' | ||
- 'vagrant/**' | ||
- 'committer-tools/**' | ||
- 'log4j-appender/**' | ||
- 'shell/**' | ||
|
||
docs: | ||
- changed-files: | ||
- any-glob-to-all-files: | ||
- 'docs/**' | ||
- '**/*.md' | ||
- 'examples/**' | ||
|
||
generator: | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- 'generator/**' | ||
|
||
transactions: | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- 'transaction-coordinator/**' | ||
|
||
KIP-932: | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- 'share/**' | ||
- 'share-coordinator/**' | ||
|
||
docker: | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- 'docker/**' | ||
|
||
performance: | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- 'jmh-benchmarks/**' | ||
|
||
consumer: | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- 'clients/src/main/java/org/apache/kafka/clients/consumer/**' | ||
|
||
producer: | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- 'clients/src/main/java/org/apache/kafka/clients/producer/**' | ||
|
||
kraft: | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- 'metadata/**' | ||
- 'raft/**' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# 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: CI Requested | ||
|
||
on: | ||
workflow_run: | ||
workflows: [CI] | ||
types: | ||
- requested | ||
|
||
jobs: | ||
check-pr-labels: | ||
# Even though job conditionals are difficult to debug, this will reduce the number of unnecessary runs | ||
if: | | ||
github.event_name == 'workflow_run' && | ||
github.event.workflow_run.event == 'pull_request' && | ||
github.event.workflow_run.status == 'completed' && | ||
github.event.workflow_run.conclusion == 'action_required' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Env | ||
run: printenv | ||
env: | ||
GITHUB_CONTEXT: ${{ toJson(github) }} | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: | ||
false | ||
- name: Check PR Labels | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
RUN_ID: ${{ github.event.workflow_run.id }} | ||
HEAD_BRANCH: ${{ github.event.workflow_run.head_branch }} | ||
HEAD_REPO: ${{ github.event.workflow_run.head_repository.owner.login }} | ||
# Caution! This is a bit hacky. The GH documentation shows that the workflow_run event should include a list | ||
# of referencing pull_requests. I think this might only be the case for pull requests originating from the | ||
# base repository. To deal with fork PRs, we need to query the API for PRs for the owner's branch. This | ||
# code assumes that the fork repo owner is the same as the organization for the "org:branch" syntax used | ||
# in the query. Also, only the first matching PR from that org will be considered. | ||
run: | | ||
set +e | ||
PR_NUMBER=$(gh api \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
/repos/${{ github.repository }}/pulls?head=$HEAD_REPO:$HEAD_BRANCH \ | ||
--jq '.[0].number') | ||
if [ -z "$PR_NUMBER" ]; then | ||
echo "Could not find the PR that triggered this workflow request"; | ||
exit 1; | ||
fi | ||
gh pr view $PR_NUMBER --json labels -q '.labels[].name' | grep -q 'ci-approved' | ||
exitcode="$?" | ||
if [ $exitcode -ne 0 ]; then | ||
echo "No ci-approved label set on PR #$PR_NUMBER. Will not auto-approve."; | ||
exit 0; | ||
else | ||
echo "Found 'ci-approved' label on PR #$PR_NUMBER. Auto-approving workflow run $RUN_ID."; | ||
fi | ||
echo "PR_NUMBER=$PR_NUMBER" >> "$GITHUB_ENV" | ||
echo "RUN_ID=$RUN_ID" >> "$GITHUB_ENV" | ||
- name: Approve Workflow Run | ||
if: env.RUN_ID != '' | ||
uses: ./.github/actions/gh-api-approve-run | ||
with: | ||
gh-token: ${{ secrets.GITHUB_TOKEN }} | ||
repository: ${{ github.repository }} | ||
run_id: ${{ env.RUN_ID }} | ||
pr_number: ${{ env.PR_NUMBER }} | ||
commit_sha: ${{ github.event.workflow_run.head_sha }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.