Skip to content

Commit 45be5de

Browse files
author
druidliu
committed
Merge remote-tracking branch 'upstream/master' into add-bookkeeper-deleted-in-ml-info
2 parents bc8cfcd + 203f305 commit 45be5de

1,202 files changed

Lines changed: 48483 additions & 44618 deletions

File tree

Some content is hidden

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

.asf.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ github:
5858

5959
required_signatures: false
6060

61+
# Requires all conversations on code to be resolved before a pull request can be merged.
62+
required_conversation_resolution: true
63+
6164
# The following branch protections only ensure that force pushes are not allowed
6265
branch-1.15: {}
6366
branch-1.16: {}

.github/ISSUE_TEMPLATE/bug-report.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ body:
2828
For suggestions or help, please consider:
2929
1. [User Mail List](mailto:users@pulsar.apache.org) ([subscribe](mailto:users-subscribe@pulsar.apache.org));
3030
2. [Github Discussion](https://github.com/apache/pulsar/discussions).
31+
32+
If you are reporting a security vulnerability, please instead follow the [security policy](https://pulsar.apache.org/en/security/).
3133
- type: checkboxes
3234
attributes:
3335
label: Search before asking
@@ -37,11 +39,20 @@ body:
3739
- label: >
3840
I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.
3941
required: true
42+
- type: checkboxes
43+
attributes:
44+
label: Read release policy
45+
description: >
46+
Please check the [supported Pulsar versions in the release policy](https://pulsar.apache.org/contribute/release-policy/#supported-versions).
47+
options:
48+
- label: >
49+
I understand that unsupported versions don't get bug fixes. I will attempt to reproduce the issue on a supported version of Pulsar client and Pulsar broker.
50+
required: true
4051
- type: textarea
4152
attributes:
4253
label: Version
4354
description: >
44-
Please provide the OS and Pulsar version you are using. If you are using the master branch, please provide the commit id.
55+
Please provide the OS, Java version and Pulsar versions (client + broker) you are using.
4556
validations:
4657
required: true
4758
- type: textarea

.github/ISSUE_TEMPLATE/flaky-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
name: Flaky test
1919
title: "Flaky-test: test_class.test_method"
2020
description: Report a flaky test failure
21-
labels: [ "component/test", "flaky-tests" ]
21+
labels: [ "area/test", "type/flaky-tests" ]
2222
body:
2323
- type: markdown
2424
attributes:

.github/actions/tune-runner-vm/action.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ runs:
5353
# tune filesystem mount options, https://www.kernel.org/doc/Documentation/filesystems/ext4.txt
5454
# commit=999999, effectively disables automatic syncing to disk (default is every 5 seconds)
5555
# nobarrier/barrier=0, loosen data consistency on system crash (no negative impact to empheral CI nodes)
56-
sudo mount -o remount,nodiscard,commit=999999,barrier=0 /
57-
sudo mount -o remount,nodiscard,commit=999999,barrier=0 /mnt
56+
sudo mount -o remount,nodiscard,commit=999999,barrier=0 / || true
57+
sudo mount -o remount,nodiscard,commit=999999,barrier=0 /mnt || true
5858
# disable discard/trim at device level since remount with nodiscard doesn't seem to be effective
5959
# https://www.spinics.net/lists/linux-ide/msg52562.html
6060
for i in /sys/block/sd*/queue/discard_max_bytes; do
@@ -77,12 +77,6 @@ runs:
7777
# stop Azure Linux agent to save RAM
7878
sudo systemctl stop walinuxagent.service || true
7979
80-
# enable docker experimental mode which is
81-
# required for using "docker build --squash" / "-Ddocker.squash=true"
82-
daemon_json="$(sudo cat /etc/docker/daemon.json | jq '.experimental = true')"
83-
echo "$daemon_json" | sudo tee /etc/docker/daemon.json
84-
# restart docker daemon
85-
sudo systemctl restart docker
8680
echo '::endgroup::'
8781
8882
# show memory

.github/actions/upload-coverage/action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ runs:
5151
- name: "Upload to Codecov (attempt #1)"
5252
id: codecov-upload-1
5353
if: steps.repo-check.outputs.passed == 'true'
54-
uses: codecov/codecov-action@v3
54+
uses: codecov/codecov-action@v4
5555
continue-on-error: true
5656
with:
5757
flags: ${{ inputs.flags }}
@@ -64,7 +64,7 @@ runs:
6464
- name: "Upload to Codecov (attempt #2)"
6565
id: codecov-upload-2
6666
if: steps.codecov-upload-1.outcome == 'failure'
67-
uses: codecov/codecov-action@v3
67+
uses: codecov/codecov-action@v4
6868
continue-on-error: true
6969
with:
7070
flags: ${{ inputs.flags }}
@@ -77,7 +77,7 @@ runs:
7777
- name: "Upload to Codecov (attempt #3)"
7878
id: codecov-upload-3
7979
if: steps.codecov-upload-2.outcome == 'failure'
80-
uses: codecov/codecov-action@v3
80+
uses: codecov/codecov-action@v4
8181
# fail on last attempt
8282
continue-on-error: false
8383
with:

.github/changes-filter.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ docs:
1212
- 'deployment/**'
1313
- 'wiki/**'
1414
- 'pip/**'
15+
java_non_tests:
16+
- '**/src/main/java/**/*.java'
1517
tests:
1618
- added|modified: '**/src/test/java/**/*.java'
1719
need_owasp:

.github/workflows/ci-go-functions.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
docs_only: ${{ steps.check_changes.outputs.docs_only }}
4343
steps:
4444
- name: checkout
45-
uses: actions/checkout@v3
45+
uses: actions/checkout@v4
4646

4747
- name: Detect changed files
4848
id: changes
@@ -75,11 +75,11 @@ jobs:
7575
runs-on: ubuntu-22.04
7676
strategy:
7777
matrix:
78-
go-version: [1.15, 1.16, 1.17]
78+
go-version: ['1.21']
7979

8080
steps:
8181
- name: Check out code into the Go module directory
82-
uses: actions/checkout@v3
82+
uses: actions/checkout@v4
8383

8484
- name: Tune Runner VM
8585
uses: ./.github/actions/tune-runner-vm
@@ -93,7 +93,7 @@ jobs:
9393
- name: InstallTool
9494
run: |
9595
cd pulsar-function-go
96-
wget -O - -q https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s v1.18.0
96+
wget -O - -q https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s v1.55.2
9797
./bin/golangci-lint --version
9898
9999
- name: Build

.github/workflows/ci-maven-cache-update.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ on:
4343

4444
env:
4545
MAVEN_OPTS: -Xss1500k -Xmx1024m -Daether.connector.http.reuseConnections=false -Daether.connector.requestTimeout=60000 -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3 -Dmaven.wagon.http.retryHandler.requestSentEnabled=true -Dmaven.wagon.http.serviceUnavailableRetryStrategy.class=standard -Dmaven.wagon.rto=60000
46+
JDK_DISTRIBUTION: corretto
4647

4748
jobs:
4849
update-maven-dependencies-cache:
@@ -73,7 +74,7 @@ jobs:
7374

7475
steps:
7576
- name: checkout
76-
uses: actions/checkout@v3
77+
uses: actions/checkout@v4
7778

7879
- name: Tune Runner VM
7980
uses: ./.github/actions/tune-runner-vm
@@ -91,7 +92,7 @@ jobs:
9192
- name: Cache local Maven repository
9293
if: ${{ github.event_name == 'schedule' || steps.changes.outputs.poms == 'true' }}
9394
id: cache
94-
uses: actions/cache@v3
95+
uses: actions/cache@v4
9596
timeout-minutes: 5
9697
with:
9798
path: |
@@ -103,10 +104,10 @@ jobs:
103104
# cache would be used as the starting point for a new cache entry
104105

105106
- name: Set up JDK 17
106-
uses: actions/setup-java@v3
107+
uses: actions/setup-java@v4
107108
if: ${{ (github.event_name == 'schedule' || steps.changes.outputs.poms == 'true') && steps.cache.outputs.cache-hit != 'true' }}
108109
with:
109-
distribution: 'temurin'
110+
distribution: ${{ env.JDK_DISTRIBUTION }}
110111
java-version: 17
111112

112113
- name: Download dependencies

.github/workflows/ci-owasp-dependency-check.yaml

Lines changed: 54 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ on:
2525

2626
env:
2727
MAVEN_OPTS: -Xss1500k -Xmx1024m -Daether.connector.http.reuseConnections=false -Daether.connector.requestTimeout=60000 -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3 -Dmaven.wagon.http.retryHandler.requestSentEnabled=true -Dmaven.wagon.http.serviceUnavailableRetryStrategy.class=standard -Dmaven.wagon.rto=60000
28+
JDK_DISTRIBUTION: corretto
2829

2930
jobs:
3031
run-owasp-dependency-check:
@@ -34,66 +35,101 @@ jobs:
3435
JOB_NAME: Check ${{ matrix.branch }}
3536
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
3637
runs-on: ubuntu-22.04
37-
timeout-minutes: 45
38+
timeout-minutes: 75
3839
strategy:
3940
fail-fast: false
41+
max-parallel: 1
4042
matrix:
4143
include:
4244
- branch: master
45+
- branch: branch-3.2
4346
- branch: branch-3.1
4447
- branch: branch-3.0
4548
- branch: branch-2.11
4649
- branch: branch-2.10
4750
jdk: 11
48-
- branch: branch-2.9
49-
jdk: 11
50-
- branch: branch-2.8
51-
jdk: 11
5251

5352
steps:
5453
- name: checkout
55-
uses: actions/checkout@v3
54+
uses: actions/checkout@v4
5655
with:
5756
ref: ${{ matrix.branch }}
5857

5958
- name: Tune Runner VM
6059
uses: ./.github/actions/tune-runner-vm
6160

6261
- name: Cache local Maven repository
63-
uses: actions/cache@v3
62+
uses: actions/cache@v4
6463
timeout-minutes: 5
6564
with:
6665
path: |
6766
~/.m2/repository/*/*/*
6867
!~/.m2/repository/org/apache/pulsar
69-
key: ${{ runner.os }}-m2-dependencies-owasp-${{ hashFiles('**/pom.xml') }}
68+
!~/.m2/repository/org/owasp/dependency-check-data
69+
key: ${{ runner.os }}-m2-dependencies-all-${{ hashFiles('**/pom.xml') }}
70+
lookup-only: true
7071
restore-keys: |
71-
${{ runner.os }}-m2-dependencies-all-${{ hashFiles('**/pom.xml') }}
7272
${{ runner.os }}-m2-dependencies-core-modules-${{ hashFiles('**/pom.xml') }}
7373
${{ runner.os }}-m2-dependencies-core-modules-
7474
7575
- name: Set up JDK ${{ matrix.jdk || '17' }}
76-
uses: actions/setup-java@v3
76+
uses: actions/setup-java@v4
7777
with:
78-
distribution: 'temurin'
78+
distribution: ${{ env.JDK_DISTRIBUTION }}
7979
java-version: ${{ matrix.jdk || '17' }}
8080

8181
- name: run install by skip tests
8282
run: mvn -B -ntp clean install -DskipTests -Dspotbugs.skip=true -Dlicense.skip=true -Dcheckstyle.skip=true -Drat.skip=true -DskipDocker=true
8383

84+
- name: OWASP cache key weeknum
85+
id: get-weeknum
86+
run: |
87+
echo "weeknum=$(date -u +"%Y-%U")" >> $GITHUB_OUTPUT
88+
shell: bash
89+
90+
- name: Restore OWASP Dependency Check data
91+
id: restore-owasp-dependency-check-data
92+
uses: actions/cache/restore@v3
93+
timeout-minutes: 5
94+
with:
95+
path: ~/.m2/repository/org/owasp/dependency-check-data
96+
key: owasp-dependency-check-data-${{ steps.get-weeknum.outputs.weeknum }}
97+
enableCrossOsArchive: true
98+
restore-keys: |
99+
owasp-dependency-check-data-
100+
101+
- name: Update OWASP Dependency Check data
102+
id: update-owasp-dependency-check-data
103+
if: ${{ matrix.branch == 'master' && (steps.restore-owasp-dependency-check-data.outputs.cache-hit != 'true' || steps.restore-owasp-dependency-check-data.outputs.cache-matched-key != steps.restore-owasp-dependency-check-data.outputs.cache-primary-key) }}
104+
run: mvn -B -ntp -Powasp-dependency-check initialize -pl . dependency-check:update-only
105+
106+
- name: Save OWASP Dependency Check data
107+
if: ${{ steps.update-owasp-dependency-check-data.outcome == 'success' }}
108+
uses: actions/cache/save@v3
109+
timeout-minutes: 5
110+
with:
111+
path: ~/.m2/repository/org/owasp/dependency-check-data
112+
key: ${{ steps.restore-owasp-dependency-check-data.outputs.cache-primary-key }}
113+
enableCrossOsArchive: true
114+
84115
- name: run OWASP Dependency Check for distribution/server (-DfailBuildOnAnyVulnerability=true)
85116
run: mvn -B -ntp -Pmain,skip-all,skipDocker,owasp-dependency-check initialize verify -pl distribution/server -DfailBuildOnAnyVulnerability=true
86117

87-
- name: run OWASP Dependency Check for distribution/offloaders, distribution/io and pulsar-sql/presto-distribution
88-
run: mvn -B -ntp -Pmain,skip-all,skipDocker,owasp-dependency-check initialize verify -pl distribution/offloaders,distribution/io,pulsar-sql/presto-distribution
118+
- name: run OWASP Dependency Check for offloaders/tiered-storage and pulsar-io connectors (-DfailOnError=false)
119+
if: ${{ !cancelled() }}
120+
run: |
121+
mvnprojects=$(mvn -B -ntp -Dscan=false initialize \
122+
| grep -- "-< .* >-" \
123+
| sed -E 's/.*-< (.*) >-.*/\1/' \
124+
| grep -E 'pulsar-io-|tiered-storage-|offloader' \
125+
| tr '\n' ',' | sed 's/,$/\n/' )
126+
set -xe
127+
mvn --fail-at-end -B -ntp -Pmain,skip-all,skipDocker,owasp-dependency-check initialize verify -DfailOnError=false -pl "${mvnprojects}"
89128
90129
- name: Upload OWASP Dependency Check reports
91-
uses: actions/upload-artifact@v3
130+
uses: actions/upload-artifact@v4
92131
if: always()
93132
with:
94133
name: owasp-dependency-check-reports-${{ matrix.branch }}
95134
path: |
96-
distribution/server/target/dependency-check-report.html
97-
distribution/offloaders/target/dependency-check-report.html
98-
distribution/io/target/dependency-check-report.html
99-
pulsar-sql/presto-distribution/target/dependency-check-report.html
135+
**/target/dependency-check-report.html

.github/workflows/ci-semantic-pull-request.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ jobs:
5353
# io -> Pulsar Connectors
5454
# offload -> tiered storage
5555
# sec -> security
56-
# sql -> Pulsar Trino Plugin
5756
# txn -> transaction
5857
# ws -> websocket
5958
# ml -> managed ledger
@@ -79,7 +78,6 @@ jobs:
7978
schema
8079
sec
8180
site
82-
sql
8381
storage
8482
test
8583
txn

0 commit comments

Comments
 (0)