Skip to content

Commit 31bfb8a

Browse files
committed
Merge branch 'master' into feature/IGNITE-27971
# Conflicts: # modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/DiscoveryMessageFactory.java # modules/core/src/main/java/org/apache/ignite/internal/processors/marshaller/MappingAcceptedMessage.java
2 parents 190ff9e + 40d9b61 commit 31bfb8a

153 files changed

Lines changed: 3470 additions & 1537 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.
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one or more
2+
# contributor license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright ownership.
4+
# The ASF licenses this file to You under the Apache License, Version 2.0
5+
# (the "License"); you may not use this file except in compliance with
6+
# the License. You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
name: Check Protected Classes
17+
on:
18+
pull_request:
19+
20+
concurrency:
21+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
22+
cancel-in-progress: true
23+
24+
jobs:
25+
check-protected-classes:
26+
runs-on: ubuntu-latest
27+
name: Check protected classes
28+
steps:
29+
- uses: actions/checkout@v6
30+
with:
31+
ref: ${{ github.event.pull_request.head.sha }}
32+
fetch-depth: 0
33+
34+
- name: Check for protected class modifications
35+
id: check
36+
run: |
37+
BASE_SHA=${{ github.event.pull_request.base.sha }}
38+
HEAD_SHA=${{ github.event.pull_request.head.sha }}
39+
40+
HITS=""
41+
42+
# New and deleted files: check diff content for @Order annotation.
43+
for file in $(git diff --name-only --no-renames --diff-filter=AD "$BASE_SHA"..."$HEAD_SHA" -- '*.java'); do
44+
if git diff "$BASE_SHA"..."$HEAD_SHA" -- "$file" | grep -q 'org.apache.ignite.internal.Order'; then
45+
HITS="${HITS}${file}\n"
46+
fi
47+
done
48+
49+
# Modified files: check base version content for @Order annotation.
50+
for file in $(git diff --name-only --no-renames --diff-filter=M "$BASE_SHA"..."$HEAD_SHA" -- '*.java'); do
51+
if git show "${BASE_SHA}:${file}" 2>/dev/null | grep -q 'org.apache.ignite.internal.Order'; then
52+
HITS="${HITS}${file}\n"
53+
fi
54+
done
55+
56+
if [ -n "$HITS" ]; then
57+
echo "affected=true" >> "$GITHUB_OUTPUT"
58+
printf '%b' "$HITS" > /tmp/protected-hits.txt
59+
fi
60+
61+
- name: Comment on PR
62+
if: steps.check.outputs.affected == 'true'
63+
uses: actions/github-script@v8
64+
with:
65+
script: |
66+
const fs = require('fs');
67+
const hits = fs.readFileSync('/tmp/protected-hits.txt', 'utf8').trim();
68+
const body = [
69+
'## Protected Classes Review Required',
70+
'',
71+
'This PR modifies protected classes (with @Order annotation).',
72+
'Changes to these classes can break rolling upgrade compatibility.',
73+
'',
74+
'**Affected files:**',
75+
hits.split('\n').map(f => '- `' + f.trim() + '`').join('\n'),
76+
'',
77+
].join('\n');
78+
79+
const { data: comments } = await github.rest.issues.listComments({
80+
owner: context.repo.owner,
81+
repo: context.repo.repo,
82+
issue_number: context.issue.number,
83+
});
84+
85+
const existing = comments.find(c => c.body.includes('Protected Classes Review Required'));
86+
87+
if (existing) {
88+
await github.rest.issues.updateComment({
89+
owner: context.repo.owner,
90+
repo: context.repo.repo,
91+
comment_id: existing.id,
92+
body,
93+
});
94+
} else {
95+
await github.rest.issues.createComment({
96+
owner: context.repo.owner,
97+
repo: context.repo.repo,
98+
issue_number: context.issue.number,
99+
body,
100+
});
101+
}
102+
103+
- name: Add label
104+
if: steps.check.outputs.affected == 'true'
105+
uses: actions/github-script@v8
106+
with:
107+
script: |
108+
await github.rest.issues.addLabels({
109+
owner: context.repo.owner,
110+
repo: context.repo.repo,
111+
issue_number: context.issue.number,
112+
labels: ['protected-classes'],
113+
});

.mvn/wrapper/maven-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@
1515
# limitations under the License.
1616
#
1717

18-
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.3/apache-maven-3.8.3-bin.zip
18+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip
1919
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar

0 commit comments

Comments
 (0)