Skip to content

Commit 1eb3569

Browse files
committed
Merge upstream/master: resolve conflict in node_test.go
Signed-off-by: Harsh <harshmastic@gmail.com>
2 parents 9735360 + 77d4cb2 commit 1eb3569

122 files changed

Lines changed: 20280 additions & 11387 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.

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ jobs:
4242

4343
steps:
4444
- name: Checkout repository
45-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
45+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
4646

4747
# Initializes the CodeQL tools for scanning.
4848
- name: Initialize CodeQL
49-
uses: github/codeql-action/init@19b2f06db2b6f5108140aeb04014ef02b648f789 # v3.29.5
49+
uses: github/codeql-action/init@b20883b0cd1f46c72ae0ba6d1090936928f9fa30 # v3.29.5
5050
with:
5151
languages: ${{ matrix.language }}
5252
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -66,4 +66,4 @@ jobs:
6666
# make release
6767

6868
- name: Perform CodeQL Analysis
69-
uses: github/codeql-action/analyze@19b2f06db2b6f5108140aeb04014ef02b648f789 # v3.29.5
69+
uses: github/codeql-action/analyze@b20883b0cd1f46c72ae0ba6d1090936928f9fa30 # v3.29.5

.github/workflows/kind-e2e.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4.3.1
4646

4747
- name: Checkout code
48-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
48+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
4949
with:
5050
path: ${{ env.GOPATH }}/src/github.com/fluid-cloudnative/fluid
5151

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
name: PR Quota Limit
2+
3+
on:
4+
pull_request:
5+
types: [opened, reopened]
6+
7+
permissions:
8+
contents: read
9+
pull-requests: read
10+
11+
jobs:
12+
check-pr-quota:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
pull-requests: write
16+
issues: write
17+
steps:
18+
- name: Check PR quota
19+
// Use action version v7.0.1
20+
uses: actions/github-script@60a0d8304218317a38b4124020f343a0d555a1eb
21+
with:
22+
script: |
23+
try {
24+
const prAuthor = context.payload.pull_request.user.login;
25+
const currentPRNumber = context.payload.pull_request.number;
26+
27+
console.log(`Checking PR quota for user: ${prAuthor}`);
28+
console.log(`Current PR number: ${currentPRNumber}`);
29+
30+
// Get all open PRs with pagination support
31+
let allPRs = [];
32+
let page = 1;
33+
let hasMorePages = true;
34+
35+
while (hasMorePages) {
36+
const { data: prs } = await github.rest.pulls.list({
37+
owner: context.repo.owner,
38+
repo: context.repo.repo,
39+
state: 'open',
40+
per_page: 100,
41+
page: page
42+
});
43+
44+
allPRs = allPRs.concat(prs);
45+
46+
// If we got less than 100 PRs, we've reached the last page
47+
if (prs.length < 100) {
48+
hasMorePages = false;
49+
} else {
50+
page++;
51+
}
52+
}
53+
54+
console.log(`Total open PRs in repository: ${allPRs.length}`);
55+
56+
// Filter PRs by the same author
57+
const userPRs = allPRs.filter(pr => pr.user.login === prAuthor);
58+
const openCount = userPRs.length;
59+
60+
console.log(`User ${prAuthor} has ${openCount} open PR(s)`);
61+
62+
// Check if exceeds quota (15 PRs max)
63+
const maxPRs = 15;
64+
if (openCount > maxPRs) {
65+
const currentStatus = `${openCount}/${maxPRs}`;
66+
67+
const message = `Hi, @${prAuthor}, Thanks for your contribution! To ensure quality reviews, we limit how many concurrent open PRs contributors can open. This pull request will be temporarily closed (Current status: ${currentStatus} open). We encourage you to submit a new PR once the quota policy permits future contributions.`;
68+
69+
console.log(`Quota exceeded! Closing PR #${currentPRNumber}`);
70+
console.log(`User has ${openCount} open PRs, which exceeds the limit of ${maxPRs}`);
71+
console.log(`Message: ${message}`);
72+
73+
// Add comment to the PR
74+
try {
75+
await github.rest.issues.createComment({
76+
owner: context.repo.owner,
77+
repo: context.repo.repo,
78+
issue_number: currentPRNumber,
79+
body: message
80+
});
81+
console.log('Comment added successfully');
82+
} catch (commentError) {
83+
console.error('Failed to add comment:', commentError.message);
84+
}
85+
86+
// Close the PR
87+
try {
88+
await github.rest.pulls.update({
89+
owner: context.repo.owner,
90+
repo: context.repo.repo,
91+
pull_number: currentPRNumber,
92+
state: 'closed'
93+
});
94+
console.log(`PR #${currentPRNumber} has been closed due to quota limit.`);
95+
} catch (closeError) {
96+
console.error('Failed to close PR:', closeError.message);
97+
throw closeError; // Re-throw to fail the workflow
98+
}
99+
} else {
100+
const availableSlots = maxPRs - openCount;
101+
console.log(`Quota check passed. User has ${availableSlots} slot(s) available.`);
102+
}
103+
} catch (error) {
104+
console.error('Error in PR quota check:', error.message);
105+
throw error; // Re-throw to fail the workflow
106+
}

.github/workflows/project-check.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
staticcheck:
1818
runs-on: ubuntu-latest
1919
steps:
20-
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
20+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2121
- uses: dominikh/staticcheck-action@024238d2898c874f26d723e7d0ff4308c35589a2 # v1
2222

2323
lint:
@@ -35,7 +35,7 @@ jobs:
3535
go-version: ${{ env.GO_VERSION }}
3636

3737
- name: Checkout code
38-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
38+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3939
with:
4040
path: ${{ env.GOPATH }}/src/github.com/fluid-cloudnative/fluid
4141

@@ -93,7 +93,7 @@ jobs:
9393
go-version: ${{ env.GO_VERSION }}
9494

9595
- name: Checkout code
96-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
96+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
9797
with:
9898
path: ${{ env.GOPATH }}/src/github.com/fluid-cloudnative/fluid
9999

@@ -117,7 +117,7 @@ jobs:
117117
go-version: ${{ env.GO_VERSION }}
118118

119119
- name: Checkout code
120-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
120+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
121121
with:
122122
path: ${{ env.GOPATH }}/src/github.com/fluid-cloudnative/fluid
123123

.github/workflows/sonarcloud.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030

3131
steps:
3232
- name: "Checkout code"
33-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
33+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3434
with:
3535
persist-credentials: false
3636

@@ -51,6 +51,6 @@ jobs:
5151
retention-days: 5
5252

5353
- name: "Upload to code-scanning"
54-
uses: github/codeql-action/upload-sarif@19b2f06db2b6f5108140aeb04014ef02b648f789 # v2.22.11
54+
uses: github/codeql-action/upload-sarif@b20883b0cd1f46c72ae0ba6d1090936928f9fa30 # v2.22.11
5555
with:
5656
sarif_file: results.sarif

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ bin
2424
*.swo
2525
*~
2626
.vscode
27+
.qoder
2728

2829
**/*.tgz
2930
**/.DS_Store

CONTRIBUTING.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ Go to the "Pull requests" tab page under your repository and Click the "New Pull
104104
105105
To help reviewers better get your purpose, PR title should be descriptive enough but not too long. It's also recommended that you follow the [PR template](.github/PULL_REQUEST_TEMPLATE.md) as your PR description.
106106

107+
#### PR Quota Policy
108+
To maintain code quality and avoid conflicts, we enforce a limit on the number of open pull requests per contributor. Each contributor can have a **maximum of 15 open pull requests** at any given time. If you attempt to open or reopen a pull request when you already have 15 open PRs, the pull request will be automatically closed with a notification message. Please wait for some of your existing PRs to be merged or closed before submitting or reopening additional ones.
109+
107110
### Tracking Your PR
108111
Once you've submitted the PR to the Fluid project, your PR will be reviewed. Please keep tracking the status of your PR, make responses to the reviewers' comments and update your changes if needed to make your PR get accepted.
109112

addons/3fs/dev-guide/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ ARG FOUNDATIONDB_TAG=7.3.59
66
ARG FOUNDATIONDB_VERSION=${FOUNDATIONDB_TAG}-1
77
ARG LIBFUSE_TAG=fuse-3.16.1
88
ARG LIBFUSE_VERSION=3.16.1
9+
ARG RUSTUP_VERSION=1.27.1
10+
ARG RUSTUP_INIT_SHA256=f39939f3c83a31eda563840394548455a095842de8467556748c55a9346a4959
911

1012
# Install system dependencies and build tools
1113
RUN apt update && \
@@ -22,8 +24,8 @@ RUN apt update && \
2224
    rm -rf /var/lib/apt/lists/* apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
2325

2426
# Install Rust
25-
RUN wget -O rustup-init "https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init" && \
26-
echo "f39939f3c83a31eda563840394548455a095842de8467556748c55a9346a4959 *rustup-init" | sha256sum -c - && \
27+
RUN wget -O rustup-init "https://static.rust-lang.org/rustup/archive/${RUSTUP_VERSION}/x86_64-unknown-linux-gnu/rustup-init" && \
28+
echo "${RUSTUP_INIT_SHA256} *rustup-init" | sha256sum -c - && \
2729
chmod +x rustup-init && \
2830
./rustup-init -y --no-modify-path --default-toolchain 1.90.0 && \
2931
rm rustup-init

csi/shell/check_mount.sh

Lines changed: 36 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,34 +8,43 @@ SubPath="$3"
88

99
#[ -z ${ConditionPathIsMountPoint} ] && ConditionPathIsMountPoint=/alluxio-fuse
1010

11-
count=0
12-
# while ! mount | grep alluxio | grep $ConditionPathIsMountPoint | grep -v grep
13-
while ! cat /proc/self/mountinfo | grep $ConditionPathIsMountPoint | grep $MountType
14-
do
15-
sleep 3
16-
count=`expr $count + 1`
17-
if test $count -eq 10
11+
# Retry configuration constants
12+
readonly MAX_RETRY_ATTEMPTS=10
13+
readonly RETRY_SLEEP_INTERVAL=3
14+
15+
# Retry function: retry a command up to MAX_RETRY_ATTEMPTS times with RETRY_SLEEP_INTERVAL
16+
# Avoids eval for security. For commands with pipelines, wrap them in a dedicated function.
17+
# Usage: retry_command <error_message> <exit_code> <command> [args...]
18+
retry_command() {
19+
local error_message=$1
20+
local exit_code=$2
21+
shift 2
22+
23+
local count=0
24+
while ! "$@" > /dev/null 2>&1
25+
do
26+
sleep $RETRY_SLEEP_INTERVAL
27+
count=$((count + 1))
28+
if [ $count -eq $MAX_RETRY_ATTEMPTS ]
1829
then
19-
echo "timed out waiting for $ConditionPathIsMountPoint mounted"
20-
exit 1
30+
echo "$error_message"
31+
exit $exit_code
2132
fi
22-
done
23-
24-
count=0
25-
while ! stat $ConditionPathIsMountPoint
26-
do
27-
sleep 3
28-
count=`expr $count + 1`
29-
if test $count -eq 10
30-
then
31-
echo "timed out stating $ConditionPathIsMountPoint returns ready"
32-
exit 1
33-
fi
34-
done
35-
36-
if [ ! -e $ConditionPathIsMountPoint/$SubPath ] ; then
37-
echo "sub path [$SubPath] not exist!"
38-
exit 2
39-
fi
33+
done
34+
}
35+
36+
# Check if mount point is mounted
37+
check_mount() {
38+
cat /proc/self/mountinfo | grep -F "$ConditionPathIsMountPoint" | grep -F "$MountType"
39+
}
40+
retry_command "timed out waiting for $ConditionPathIsMountPoint mounted" 1 check_mount
41+
42+
# Check if mount point is accessible
43+
retry_command "timed out stating $ConditionPathIsMountPoint returns ready" 1 \
44+
stat "$ConditionPathIsMountPoint"
45+
46+
# Check if sub path exists
47+
retry_command "timed out waiting for sub path [$SubPath] to exist" 2 \
48+
test -e "$ConditionPathIsMountPoint/$SubPath"
4049

4150
echo "succeed in checking mount point $ConditionPathIsMountPoint"

docker/Dockerfile.alluxioruntime

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ RUN make alluxioruntime-controller-build && \
1010
cp bin/alluxioruntime-controller /go/bin/alluxioruntime-controller
1111
RUN bash hack/helm/pin_runtime_chart_version.sh "${FLUID_VERSION}"
1212

13-
# alpine:3.23.2
14-
FROM alpine:3.23.2@sha256:865b95f46d98cf867a156fe4a135ad3fe50d2056aa3f25ed31662dff6da4eb62
13+
# alpine:3.23.3
14+
FROM alpine:3.23.3@sha256:25109184c71bdad752c8312a8623239686a9a2071e8825f20acb8f2198c3f659
1515
RUN apk add --update bash curl wget iproute2 libc6-compat tzdata vim && \
1616
rm -rf /var/cache/apk/* && \
1717
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \

0 commit comments

Comments
 (0)