Skip to content

Commit

Permalink
Merge branch 'main' into ZheSun88-patch-13
Browse files Browse the repository at this point in the history
  • Loading branch information
ZheSun88 authored Jan 15, 2025
2 parents 27b53c5 + 1e1613d commit f759f03
Show file tree
Hide file tree
Showing 11 changed files with 163 additions and 111 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/pit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,31 +64,36 @@ jobs:
# COMPUTE MATRIX
echo "Computing matrix ..."
[ -z "${{secrets.GHTK}}" -o -z "${{secrets.TB_LICENSE}}" -o -z "${{secrets.SS_LICENSE}}" -o -z "${{secrets.CE_LICENSE}}" ] && exit 1
git clone -q https://${{secrets.GHTK}}@github.com/vaadin/platform-in-test-script.git pit
V="${{inputs.version}}"
[ -n "$V" ] && echo "$V" | grep -Eqv '^[0-9]+(\.[0-9]+)*(-SNAPSHOT|\.alpha[0-9]+|\.beta[0-9]+|\.rc[0-9]+)?$' && echo "Invalid version" && exit 1
git clone -q https://${{secrets.GHTK}}@github.com/vaadin/platform-in-test-script.git pit
W="${{inputs.windows}}"
L="${{inputs.linux}}"
[ true != "$W" -a true != "$L" ] && W=true
[ true != "$L" -a true != "$W" ] && L=true
A="$A --starters=${{inputs.starters}}"
[ true = "${{inputs.generated}}" ] && A="$A --generated"
[ true = "${{inputs.demos}}" ] && A="$A --demos"
S=`./pit/scripts/pit/run.sh $A --list=${{inputs.join}}`
cmd="./pit/scripts/pit/run.sh $A --list=${{inputs.join}}"
echo "Generating list of starters: $cmd"
S=`eval $cmd`
M='{"include":['
for i in `echo $S`; do
J='{"app":"'$i'"'
[ -n "$V" ] && J=$J',"version":"'$V'"'
[ true = "$W" ] && M=$M$J',"os":"windows"},'
[ true = "$L" ] && M=$M$J',"os":"ubuntu"},'
[ true = "$W" ] && M=$M$J',"os":"windows-latest"},'
[ true = "$L" ] && M=$M$J',"os":"ubuntu-22.04"},'
done
M=`echo $M | sed -e s/,$//`']}'
echo "$M"
echo "Generated Matrix: $M"
echo "matrix=$M" >> $GITHUB_OUTPUT
run:
needs: prepare
strategy:
fail-fast: false
matrix: ${{fromJson(needs.prepare.outputs.matrix)}}
runs-on: ${{matrix.os}}-latest
runs-on: ${{matrix.os}}
steps:
- run: |
# TEST PARAMETERS
Expand Down Expand Up @@ -150,10 +155,13 @@ jobs:
# WAIT (ACT)
echo "Keeping docker container running, push Ctrl-C to terminate ..."
read key
- if: ${{failure()}}
run: echo artifact_name=`echo failed-outputs-${{matrix.app}} | tr ',' _` >> $GITHUB_ENV
shell: bash
- if: ${{failure()}}
uses: actions/upload-artifact@v4
with:
name: failed-outputs-${{matrix.app}}
name: ${{ env.artifact_name }}
path: tmp/**/*.out
if-no-files-found: ignore
retention-days: 7
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<spring.boot.version>3.4.0</spring.boot.version>
<spring.boot.version>3.4.1</spring.boot.version>
<junit.jupiter.version>5.9.1</junit.jupiter.version>
<jetty.version>12.0.15</jetty.version>
</properties>
Expand Down
2 changes: 1 addition & 1 deletion scripts/generateAndCheckSBOM.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const cveWhiteList = {
cves: ['CVE-2024-26467'],
description: 'This is coming from the tools, @cyclonedx/cyclonedx-npm, we have used for sbom module, FP for us. '
},
'pkg:npm/libxmljs2@0.33.0' : {
'pkg:npm/libxmljs2@0.35.0' : {
cves: ['CVE-2024-34394', 'CVE-2024-34393'],
description: 'This is coming from the tools, @cyclonedx/cyclonedx, we have used for sbom module, FP for us. '
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ Vaadin {{platform}}
</pluginRepository>
</pluginRepositories>

**Note**
- Due to the [issue](https://github.com/spring-projects/spring-framework/issues/33936) from spring framework, we recommend you to use **Springboot 3.4.1 or newer** to build Vaadin 24.7 project
- Vaadin 24.7 is compatible with React Router v7, when upgrading application from v24.6, please remove the opt-in feature flag, i.e.: `future={{ v7_startTransition: true }}`, from custom routing file.

## <a id="_changelogs"></a> Changelogs

<!-- Remove the ones that do not contain any changes/updates -->
Expand Down
9 changes: 6 additions & 3 deletions scripts/generator/templates/template-release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@ Vaadin {{platform}}
## New and Noteworthy Since Vaadin 24.6

**Notable Changes**
-
- Due to the [issue](https://github.com/spring-projects/spring-framework/issues/33936) from spring framework, we recommend you to use Springboot 3.4.1 or newer to build Vaadin 24.7 project
- Vaadin 24.7 is compatible with React Router v7, when upgrading application from v24.6, please remove the opt-in feature flag, i.e.: `future={{ v7_startTransition: true }}`, from custom routing file.


### Flow
-
- Change supported Node from 18 to 20
- Node 20 is the active LTS version for Node. Node 18 will be end of life soon and new libraries like React 19 support Node 20+

### Design System
-
Expand Down Expand Up @@ -141,7 +144,7 @@ Vaadin Flow requires Java Servlet API 6 and Java 17 or newer. It is tested on:
</tr>
<tr>
<th>Node.js</th>
<td>Version 18 or newer</td>
<td>Version 20 or newer</td>
</tr>
<tr>
<th>Spring Boot</th>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,8 @@ String oldPackage = 'package com.vaadin.hilla.gradle.plugin'
String newPackage = 'package com.vaadin.gradle.plugin'
String oldPluginClassDef = 'public class HillaPlugin : Plugin<Project> {'
String newPluginClassDef = 'public class VaadinPlugin : Plugin<Project> {'
String importDef = 'import com.vaadin.gradle.VaadinPlugin'
String projectDef = 'override fun apply(project: Project) {'
String projectTaskDef = 'project.tasks.apply {'
String oldPluginCreateEngineConf = 'HillaPlugin.createEngineConfiguration'
String newPluginCreateEngineConf = 'VaadinPlugin.createEngineConfiguration'
// Use NIO to walk through the directory
Files.walk(Paths.get(directoryPath))
Expand All @@ -192,12 +191,8 @@ Files.walk(Paths.get(directoryPath))
String updatedContent = content.replace(oldPackage, newPackage)
// Replace the old plugin class definition with the new one
updatedContent = updatedContent.replace(oldPluginClassDef, newPluginClassDef)
// Add import for getBooleanProperty
updatedContent = updatedContent.replace(importDef,importDef+'\nimport com.vaadin.gradle.getBooleanProperty')
// Collect hilla used property
updatedContent = updatedContent.replace(projectDef, projectDef + '\nval hillaUsed = project.getBooleanProperty("hilla.active") ?: true;')
// Do not apply tasks if hilla not used
updatedContent = updatedContent.replace(projectTaskDef,'if(hillaUsed) '+projectTaskDef)
// Replace the old plugin method calls definition with the new one
updatedContent = updatedContent.replace(oldPluginCreateEngineConf, newPluginCreateEngineConf)
// Write the updated content back to the file
Files.write(path, updatedContent.getBytes())
println "Updated package declaration in file: ${path}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@
<groupId>com.vaadin</groupId>
<artifactId>vaadin</artifactId>
<version>${project.version}</version>
<exclusions>
<exclusion>
<!--No point to have copilot, as copilot does not have public API-->
<groupId>com.vaadin</groupId>
<artifactId>copilot</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
Expand Down Expand Up @@ -103,6 +110,11 @@
<artifactId>spring-boot-devtools</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-loader-tools</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
Expand All @@ -117,6 +129,11 @@
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-oauth2-jose</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-oauth2-client</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
Expand Down
36 changes: 27 additions & 9 deletions vaadin-dev/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
<groupId>com.vaadin</groupId>
<artifactId>copilot</artifactId>
<exclusions>
<!-- io.projectreactor.netty:reactor-netty:jar:1.1.24 brings vulnerable dependencies
and also failed the dependency convergence test, as netty-* has different versions -->
<!-- io.projectreactor.netty:reactor-netty:jar:1.2.1 and netty-all:4.1.115.Final
failed the dependency convergence test, as netty-* has different versions -->
<exclusion>
<groupId>io.netty</groupId>
<artifactId>netty-common</artifactId>
Expand All @@ -67,6 +67,14 @@
<groupId>io.netty</groupId>
<artifactId>netty-codec</artifactId>
</exclusion>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>netty-codec-http</artifactId>
</exclusion>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>netty-codec-http2</artifactId>
</exclusion>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>netty-handler</artifactId>
Expand All @@ -89,37 +97,47 @@
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-common</artifactId>
<version>4.1.115.Final</version>
<version>4.1.116.Final</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-buffer</artifactId>
<version>4.1.115.Final</version>
<version>4.1.116.Final</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-codec</artifactId>
<version>4.1.115.Final</version>
<version>4.1.116.Final</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-codec-http</artifactId>
<version>4.1.116.Final</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-codec-http2</artifactId>
<version>4.1.116.Final</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-handler</artifactId>
<version>4.1.115.Final</version>
<version>4.1.116.Final</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport</artifactId>
<version>4.1.115.Final</version>
<version>4.1.116.Final</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-resolver</artifactId>
<version>4.1.115.Final</version>
<version>4.1.116.Final</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-unix-common</artifactId>
<version>4.1.115.Final</version>
<version>4.1.116.Final</version>
</dependency>
</dependencies>
<build>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
package com.vaadin.platform.react.test;

import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.TimeoutException;
import org.openqa.selenium.support.ui.ExpectedConditions;

import com.vaadin.flow.component.button.testbench.ButtonElement;
import com.vaadin.flow.component.html.testbench.AnchorElement;
import com.vaadin.flow.component.sidenav.testbench.SideNavItemElement;

@Ignore("This test is disable until https://github.com/vaadin/hilla/issues/3002 got fixed")
public class FlowMainLayoutIT extends AbstractPlatformTest {

@Test
Expand Down
6 changes: 6 additions & 0 deletions vaadin-platform-test/pom-dev.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin</artifactId>
<exclusions>
<exclusion>
<groupId>com.vaadin</groupId>
<artifactId>hilla-dev</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
Expand Down
Loading

0 comments on commit f759f03

Please sign in to comment.