Skip to content

Commit b5bf570

Browse files
committed
Merge origin/main into flow-spotless-update
Resolved conflicts: - Removed check-permissions workflow (deleted in main) - Updated formatter job to run standalone without check-permissions dependency - Added environment configuration to build job from main - Kept formatter.yml deleted and integrated into validation.yml
2 parents 12f7a91 + f10f150 commit b5bf570

File tree

846 files changed

+30161
-17652
lines changed

Some content is hidden

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

846 files changed

+30161
-17652
lines changed

.github/ISSUE_TEMPLATE/vite-bug-report.md

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/check-permissions.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

.github/workflows/sonar-pr.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Sonar PR Analysis
2+
3+
on:
4+
pull_request_target:
5+
types: [opened, synchronize, reopened]
6+
branches: [main]
7+
8+
concurrency:
9+
group: sonar-pr-${{ github.event.pull_request.number }}
10+
cancel-in-progress: true
11+
12+
permissions:
13+
contents: read
14+
15+
env:
16+
_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
17+
_HEAD_REF: ${{ github.event.pull_request.head.ref }}
18+
_BASE_REF: ${{ github.event.pull_request.base.ref }}
19+
_PR_NUMBER: ${{ github.event.pull_request.number }}
20+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
21+
# PRs use github.base_ref, no push
22+
JAVA_VERSION: ${{ (startsWith(github.base_ref, '23.') && '11') || (startsWith(github.base_ref, '24.') && '17') || '21' }}
23+
24+
jobs:
25+
sonar-analysis:
26+
environment: ${{ github.event.pull_request.head.repo.fork && 'pr-tests' || '' }}
27+
name: Sonar Analysis
28+
runs-on: ubuntu-latest
29+
timeout-minutes: 120
30+
31+
steps:
32+
33+
- name: Checkout code
34+
uses: actions/checkout@v4
35+
with:
36+
ref: ${{ env._HEAD_SHA }}
37+
fetch-depth: 0 # Full history required for SonarCloud PR analysis
38+
39+
- name: Set up JDK
40+
uses: actions/setup-java@v4
41+
with:
42+
java-version: "${{ env.JAVA_VERSION }}"
43+
distribution: 'temurin'
44+
cache: 'maven'
45+
46+
- name: Run Sonar analysis
47+
run: |
48+
mvn clean install sonar:sonar \
49+
-ntp -B -e -V \
50+
-DskipTests \
51+
-Dsonar.projectKey=vaadin_flow \
52+
-Dsonar.organization=vaadin \
53+
-Dsonar.host.url=https://sonarcloud.io \
54+
-Dsonar.pullrequest.key=${{ env._PR_NUMBER }} \
55+
-Dsonar.pullrequest.base=${{ env._BASE_REF }} \
56+
-Dsonar.pullrequest.branch=${{ env._HEAD_REF }}

.github/workflows/validation.yml

Lines changed: 68 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,28 @@
11
name: Flow Validation
22
on:
33
push:
4-
branches: [main, '24.9', '24.8', '24.7', '23.6']
4+
branches: [main, '25.0', '24.9', '24.8', '23.6']
55
workflow_dispatch:
66
pull_request_target:
7-
types: [opened, synchronize, reopened, edited]
7+
types: [opened, synchronize, reopened]
8+
branches: [main]
89
permissions:
910
contents: write
1011
pull-requests: write
1112
issues: write
1213
concurrency:
13-
group: ${{ github.head_ref }} || ${{ github.ref_name }}
14+
group: ${{ github.head_ref || github.ref_name }}
1415
cancel-in-progress: true
1516
env:
16-
HEAD_REF: ${{ github.head_ref }}
17-
REF_NAME: ${{ github.ref_name }}
18-
BASE_REF: ${{ github.event.pull_request.base.ref }}
19-
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
20-
PR_NUMBER: ${{ github.event.number }}
21-
JAVA_VERSION: '21'
17+
_HEAD_REF: ${{ github.head_ref }}
18+
_REF_NAME: ${{ github.ref_name }}
19+
_BASE_REF: ${{ github.event.pull_request.base.ref }}
20+
_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
21+
_PR_NUMBER: ${{ github.event.number }}
22+
# PRs use github.base_ref, pushes use github.ref_name
23+
JAVA_VERSION: ${{ (startsWith(github.base_ref || github.ref_name, '23.') && '11') || (startsWith(github.base_ref || github.ref_name, '24.') && '17') || '21' }}
2224
jobs:
23-
check-permissions:
24-
uses: ./.github/workflows/check-permissions.yml
25-
2625
formatter:
27-
needs: check-permissions
2826
name: Format code
2927
runs-on: ubuntu-latest
3028
timeout-minutes: 120
@@ -216,23 +214,24 @@ jobs:
216214
exit 1
217215
218216
build:
219-
needs: [check-permissions, formatter]
220-
if: always() && needs.check-permissions.result == 'success' && (needs.formatter.result == 'success' || needs.formatter.result == 'skipped')
217+
needs: formatter
218+
if: always() && (needs.formatter.result == 'success' || needs.formatter.result == 'skipped')
219+
environment: ${{ github.event.pull_request.head.repo.fork && 'pr-tests' || '' }}
221220
timeout-minutes: 30
222221
runs-on: ubuntu-24.04
223222
outputs:
224223
matrix-unit: ${{ steps.set-matrix.outputs.matrix-unit }}
225224
matrix-it: ${{ steps.set-matrix.outputs.matrix-it }}
226225
steps:
227-
- run: echo "Concurrency Group = ${HEAD_REF:-$REF_NAME}"
226+
- run: echo "Concurrency Group = ${_HEAD_REF:-$_REF_NAME}"
228227
- name: Check secrets
229228
run: |
230229
[ -z "${{secrets.TB_LICENSE}}" ] \
231230
&& echo "🚫 **TB_LICENSE** is not defined, check that **${{github.repository}}** repo has a valid secret" \
232231
| tee -a $GITHUB_STEP_SUMMARY && exit 1 || exit 0
233232
- uses: actions/checkout@v4
234233
with:
235-
ref: ${{env.HEAD_SHA}}
234+
ref: ${{env._HEAD_SHA}}
236235
- uses: actions/setup-node@v4
237236
with:
238237
node-version: '24.9.0'
@@ -280,7 +279,7 @@ jobs:
280279
steps:
281280
- uses: actions/checkout@v4
282281
with:
283-
ref: ${{env.HEAD_SHA}}
282+
ref: ${{env._HEAD_SHA}}
284283
- name: Set up JDK
285284
uses: actions/setup-java@v4
286285
with:
@@ -346,7 +345,7 @@ jobs:
346345
steps:
347346
- uses: actions/checkout@v4
348347
with:
349-
ref: ${{env.HEAD_SHA}}
348+
ref: ${{env._HEAD_SHA}}
350349
- uses: actions/setup-node@v4
351350
with:
352351
node-version: '24.9.0'
@@ -436,7 +435,7 @@ jobs:
436435
pattern: tests-output-*
437436
- uses: actions/checkout@v4
438437
with:
439-
ref: ${{env.HEAD_SHA}}
438+
ref: ${{env._HEAD_SHA}}
440439
- uses: actions/download-artifact@v4
441440
with:
442441
name: tests-output
@@ -460,6 +459,7 @@ jobs:
460459
echo "🚫 THERE ARE TEST MODULES WITH FAILURES or BEEN CANCELLED" | tee -a $GITHUB_STEP_SUMMARY
461460
exit 1
462461
api-diff-labeling:
462+
environment: ${{ github.event.pull_request.head.repo.fork && 'pr-tests' || '' }}
463463
if: github.event_name == 'pull_request_target'
464464
timeout-minutes: 10
465465
runs-on: ubuntu-24.04
@@ -470,7 +470,7 @@ jobs:
470470
steps:
471471
- uses: actions/checkout@v4
472472
with:
473-
ref: ${{env.HEAD_SHA}}
473+
ref: ${{env._HEAD_SHA}}
474474
- name: Set up JDK
475475
uses: actions/setup-java@v4
476476
with:
@@ -487,31 +487,55 @@ jobs:
487487
!~/.m2/repository/com/vaadin
488488
key: ${{ runner.os }}-maven-api-diff-${{ hashFiles('**/pom.xml') }}
489489
restore-keys: ${{ runner.os }}-maven-
490+
- name: Checkout base branch for API comparison
491+
run: |
492+
echo "Checking out base branch: ${{ env._BASE_REF }}"
493+
git clone --depth 1 --branch ${{ env._BASE_REF }} ${{ github.event.repository.clone_url }} ../base-build
490494
- name: Determine base version
491495
id: base-version
496+
working-directory: ../base-build
492497
run: |
493-
baseVersion=$(mvn -N -q -DforceStdout help:evaluate -Dexpression='project.version')
498+
baseVersion=$(mvn -N -q -DforceStdout help:evaluate -Dexpression='project.version')
494499
echo "Base API Version: ${baseVersion}"
495500
echo "BASE_API_VERSION=${baseVersion}" >> $GITHUB_OUTPUT
496-
- name: Use temporary flow version
501+
- name: Build base version locally
502+
working-directory: ../base-build
497503
run: |
504+
echo "Building base version ${{ steps.base-version.outputs.BASE_API_VERSION }} from branch ${{ env._BASE_REF }}"
505+
echo "Running in $(pwd)"
506+
mvn clean install -B -ntp -DskipTests
507+
- name: Use temporary flow version for PR
508+
# working-directory is not set, so it defaults back to the PR branch checkout
509+
run: |
510+
echo "Setting temporary version for PR branch"
498511
mvn versions:set -DnewVersion=1111.3.2-SNAPSHOT -B
499512
- name: Calculate API version difference
500513
run: |
501-
mvn clean install -B -ntp -e -V -pl=flow-server,flow-data,flow-html-components,vaadin-spring -am -Papicmp -DskipTests -Dapi.reference.version=${{ steps.base-version.outputs.BASE_API_VERSION }} -Dtest.use.hub=true -Djapicmp.maven.plugin.version=0.22.0
514+
echo "Running in $(pwd)"
515+
mvn clean install -B -ntp -e -V -Papicmp -DskipTests -Dapi.reference.version=${{ steps.base-version.outputs.BASE_API_VERSION }} -Dtest.use.hub=true -Djapicmp.maven.plugin.version=0.22.0
502516
- name: Move API diff results
503517
run: |
504518
#!/bin/bash
519+
set -e
505520
mkdir -p apidiff
506-
mv flow-server/target/japicmp apidiff/flow-server
507-
mv flow-data/target/japicmp apidiff/flow-data
508-
mv flow-html-components/target/japicmp apidiff/flow-html-components
509-
mv vaadin-spring/target/japicmp apidiff/vaadin-spring
521+
# Find all japicmp output directories and move them
522+
for module_dir in */target/japicmp; do
523+
if [ -d "$module_dir" ]; then
524+
module_name=$(dirname $(dirname "$module_dir"))
525+
echo "Moving API diff results for $module_name"
526+
mv "$module_dir" "apidiff/$module_name"
527+
fi
528+
done
510529
- name: Upload API diff artifacts
511530
uses: actions/upload-artifact@v4
512531
with:
513532
name: apidiff-reports
514533
path: apidiff/
534+
- name: Cleanup base build directory
535+
if: always()
536+
run: |
537+
echo "Cleaning up base build directory"
538+
rm -rf ../base-build
515539
- name: Report API DIFF to GitHub
516540
env:
517541
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -523,6 +547,7 @@ jobs:
523547
524548
version_change="0.0.0"
525549
550+
summary=()
526551
for file in ${diff_files}
527552
do
528553
echo " Verifying file '${file}'..."
@@ -531,12 +556,23 @@ jobs:
531556
if [[ "${version_change}" < "${temp_version_change}" ]]; then
532557
version_change=${temp_version_change}
533558
fi
559+
560+
if [[ "${temp_version_change}" > "0.0.1" ]]; then
561+
summary+=("${file} :: ${temp_version_change}")
562+
fi
534563
done
535-
564+
536565
echo "Discovered version change: ${version_change}"
566+
567+
if [[ "${version_change}" > "0.0.1" ]]; then
568+
echo "### Significant API changes summary" >> $GITHUB_STEP_SUMMARY
569+
echo "" >> $GITHUB_STEP_SUMMARY
570+
echo "" >> $GITHUB_STEP_SUMMARY
571+
printf '%s\n' "${summary[@]}" >> $GITHUB_STEP_SUMMARY
572+
fi
537573
538574
# Get current labels
539-
current_labels=$(gh api repos/${{ github.repository }}/issues/${{ env.PR_NUMBER }}/labels --jq '.[].name')
575+
current_labels=$(gh api repos/${{ github.repository }}/issues/${{ env._PR_NUMBER }}/labels --jq '.[].name')
540576
541577
# Check if version change label already exists
542578
if echo "${current_labels}" | grep -q "+${version_change}"; then
@@ -548,12 +584,12 @@ jobs:
548584
for tlabel in '+0.0.1' '+0.1.0' '+1.0.0'; do
549585
if echo "${current_labels}" | grep -q "${tlabel}" && [[ "${version_change}" != "${tlabel##+}" ]]; then
550586
echo "Removing label ${tlabel}"
551-
gh api repos/${{ github.repository }}/issues/${{ env.PR_NUMBER }}/labels/"${tlabel}" -X DELETE || true
587+
gh api repos/${{ github.repository }}/issues/${{ env._PR_NUMBER }}/labels/"${tlabel}" -X DELETE || true
552588
fi
553589
done
554590
555591
# Add new version label
556-
gh api repos/${{ github.repository }}/issues/${{ env.PR_NUMBER }}/labels \
592+
gh api repos/${{ github.repository }}/issues/${{ env._PR_NUMBER }}/labels \
557593
-f labels[]="+${version_change}" \
558594
--method POST
559595
fi

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ Since [Vaadin platform 23.0](https://github.com/vaadin/platform), Flow major and
1717
| 2.12 | 14.13 (LATEST commercial with Java 8+ support and Servlet 3) | 2.12 |
1818
| 23.6 | 23.6 (LATEST commercial with Java 11+ support and Servlet 3) | 23.6 |
1919
| 24.8 | 24.8 (maintained minor release, Java 17+, Jakarta EE 10, Spring-boot 3) | 24.8 |
20-
| 24.9 | 24.9 (LATEST release, Java 17+, Jakarta EE 10, Spring-boot 3) | 24.9 |
21-
| main | 25.0 (Vaadin 25.0 preparations, Java 21+, Jakarta EE 11, Spring-boot 4) | 25.0 |
20+
| 24.9 | 24.9 (LATEST 24 minor release, Java 17+, Jakarta EE 10, Spring-boot 3) | 24.9 |
21+
| 25.0 | 25.0 (LATEST release, Java 21+, Jakarta EE 11, Spring-boot 4) | 25.0 |
22+
| main | 25.1 (Vaadin 25.1 preparations, Java 21+, Jakarta EE 11, Spring-boot 4) | 25.1 |

flow-bom/pom.xml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,17 @@
44
<parent>
55
<groupId>com.vaadin</groupId>
66
<artifactId>flow-project</artifactId>
7-
<version>25.0-SNAPSHOT</version>
7+
<version>25.1-SNAPSHOT</version>
88
</parent>
99
<artifactId>flow-bom</artifactId>
1010
<packaging>pom</packaging>
1111
<name>Flow Bill of Materials</name>
1212
<description>Flow Bill of Materials</description>
1313

14+
<properties>
15+
<flow.apicmp.skip>true</flow.apicmp.skip>
16+
</properties>
17+
1418
<dependencyManagement>
1519
<dependencies>
1620
<dependency>
@@ -78,6 +82,12 @@
7882
<artifactId>flow-dnd</artifactId>
7983
<version>${project.version}</version>
8084
</dependency>
85+
<dependency>
86+
<groupId>com.vaadin</groupId>
87+
<artifactId>flow-build-tools</artifactId>
88+
<version>${project.version}</version>
89+
<classifier>shaded</classifier>
90+
</dependency>
8191
<dependency>
8292
<groupId>com.vaadin</groupId>
8393
<artifactId>vaadin-dev-server</artifactId>

0 commit comments

Comments
 (0)