From aec321a54527a3089abeaf31a0b12324598c4a7d Mon Sep 17 00:00:00 2001 From: Jose Date: Wed, 8 Sep 2021 15:12:47 +0200 Subject: [PATCH] Adapt main to Quarkus 999-SNAPSHOT This change is caused by https://github.com/quarkusio/quarkus/issues/19875 which as far I understood, it's not going to be reverted or fixed. Guides updates in https://github.com/quarkusio/quarkus/pull/19995 --- .github/quarkus-ecosystem-test | 4 +- .github/workflows/ci.yml | 112 +++++++++++++----- .github/workflows/daily.yaml | 8 +- lifecycle-application/pom.xml | 2 +- pom.xml | 2 +- scheduling/quartz/pom.xml | 2 +- spring/spring-data/pom.xml | 6 +- .../data/primitivetypes/SessionResource.java | 15 --- .../data/primitivetypes/CommonsHeadersIT.java | 2 + sql-db/panache-flyway/pom.xml | 2 +- .../qe/sqldb/panacheflyway/DataSourceIT.java | 5 +- 11 files changed, 97 insertions(+), 63 deletions(-) delete mode 100644 spring/spring-data/src/main/java/io/quarkus/ts/spring/data/primitivetypes/SessionResource.java diff --git a/.github/quarkus-ecosystem-test b/.github/quarkus-ecosystem-test index e59d69087..d60710143 100755 --- a/.github/quarkus-ecosystem-test +++ b/.github/quarkus-ecosystem-test @@ -2,7 +2,7 @@ set -e # run the tests on JVM -mvn -fae -V -B -s .github/mvn-settings.xml -fae clean verify -P $MAVEN_PROFILES -Dquarkus.platform.version=999-SNAPSHOT +mvn -fae -V -B -s .github/mvn-settings.xml -fae clean verify -P $MAVEN_PROFILES # run the tests on Native -mvn -fae -V -B -s .github/mvn-settings.xml -fae clean verify -P $MAVEN_PROFILES -Dnative -Dquarkus.native.container-build=true -Dquarkus.native.native-image-xmx=5g -Dquarkus.platform.version=999-SNAPSHOT \ No newline at end of file +mvn -fae -V -B -s .github/mvn-settings.xml -fae clean verify -P $MAVEN_PROFILES -Dnative -Dquarkus.native.container-build=true -Dquarkus.native.native-image-xmx=5g \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 61777bda4..a9131e83f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,9 +2,41 @@ name: "Pull Request CI" on: - pull_request jobs: + build-dependencies: + name: Build Dependencies + runs-on: ubuntu-latest + strategy: + matrix: + java: [ 11 ] + steps: + - uses: actions/checkout@v1 + - uses: actions/cache@v1 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - name: Reclaim Disk Space + run: .github/ci-prerequisites.sh + - name: Install JDK {{ matrix.java }} + uses: joschi/setup-jdk@e87a7cec853d2dd7066adf837fe12bf0f3d45e52 + with: + java-version: ${{ matrix.java }} + - name: Build Quarkus main + run: | + git clone https://github.com/quarkusio/quarkus.git && cd quarkus && ./mvnw -B -s .github/mvn-settings.xml clean install -Dquickly + - name: Tar Maven Repo + shell: bash + run: tar -I 'pigz -9' -cf maven-repo.tgz -C ~ .m2/repository + - name: Persist Maven Repo + uses: actions/upload-artifact@v1 + with: + name: maven-repo + path: maven-repo.tgz linux-validate-format: name: Linux - Validate format runs-on: ubuntu-latest + needs: build-dependencies strategy: matrix: java: [ 11 ] @@ -20,13 +52,21 @@ jobs: uses: joschi/setup-jdk@e87a7cec853d2dd7066adf837fe12bf0f3d45e52 with: java-version: ${{ matrix.java }} + - name: Download Maven Repo + uses: actions/download-artifact@v1 + with: + name: maven-repo + path: . + - name: Extract Maven Repo + shell: bash + run: tar -xzf maven-repo.tgz -C ~ - name: Build with Maven run: | mvn -V -B -s .github/mvn-settings.xml verify -Dall-modules -Dvalidate-format -DskipTests -DskipITs - linux-build-jvm-released: - name: PR - Linux - JVM build - Released Version + linux-build-jvm-latest: + name: PR - Linux - JVM build - Latest Version runs-on: ubuntu-latest - needs: linux-validate-format + needs: [ build-dependencies, linux-validate-format ] strategy: matrix: java: [ 11 ] @@ -45,19 +85,22 @@ jobs: uses: joschi/setup-jdk@e87a7cec853d2dd7066adf837fe12bf0f3d45e52 with: java-version: openjdk${{ matrix.java }} + - name: Download Maven Repo + uses: actions/download-artifact@v1 + with: + name: maven-repo + path: . + - name: Extract Maven Repo + shell: bash + run: tar -xzf maven-repo.tgz -C ~ - name: Build Quarkus CLI run: | - git clone https://github.com/quarkusio/quarkus.git - cd quarkus - git checkout 2.2 - mvn versions:set -DnewVersion=2.2.2.Final -DgenerateBackupPoms=false -pl .,build-parent,devtools/cli - cd devtools/cli - mvn -B -s ../../../.github/mvn-settings.xml clean install -Dquickly + git clone https://github.com/quarkusio/quarkus.git && cd quarkus/devtools/cli && mvn -B -s ../../../.github/mvn-settings.xml clean install -Dquickly - name: Install Quarkus CLI run: | cat < ./quarkus-dev-cli #!/bin/bash - java -jar $PWD/quarkus/devtools/cli/target/quarkus-cli-2.2.2.Final-runner.jar "\$@" + java -jar $PWD/quarkus/devtools/cli/target/quarkus-cli-999-SNAPSHOT-runner.jar "\$@" EOF chmod +x ./quarkus-dev-cli - name: Build with Maven @@ -65,16 +108,16 @@ jobs: - name: Zip Artifacts if: failure() run: | - zip -R artifacts-released-linux-jvm${{ matrix.java }}.zip '*-reports/*' + zip -R artifacts-latest-linux-jvm${{ matrix.java }}.zip '*-reports/*' - uses: actions/upload-artifact@v1 if: failure() with: name: ci-artifacts - path: artifacts-released-linux-jvm${{ matrix.java }}.zip - linux-build-native-released: - name: PR - Linux - Native build - Released Version + path: artifacts-latest-linux-jvm${{ matrix.java }}.zip + linux-build-native-latest: + name: PR - Linux - Native build - Latest Version runs-on: ubuntu-latest - needs: linux-validate-format + needs: [ build-dependencies, linux-validate-format ] strategy: matrix: java: [ 11 ] @@ -93,19 +136,22 @@ jobs: uses: joschi/setup-jdk@e87a7cec853d2dd7066adf837fe12bf0f3d45e52 with: java-version: openjdk${{ matrix.java }} + - name: Download Maven Repo + uses: actions/download-artifact@v1 + with: + name: maven-repo + path: . + - name: Extract Maven Repo + shell: bash + run: tar -xzf maven-repo.tgz -C ~ - name: Build Quarkus CLI run: | - git clone https://github.com/quarkusio/quarkus.git - cd quarkus - git checkout 2.2 - mvn versions:set -DnewVersion=2.2.2.Final -DgenerateBackupPoms=false -pl .,build-parent,devtools/cli - cd devtools/cli - mvn -B -s ../../../.github/mvn-settings.xml clean install -Dquickly + git clone https://github.com/quarkusio/quarkus.git && cd quarkus/devtools/cli && mvn -B -s ../../../.github/mvn-settings.xml clean install -Dquickly - name: Install Quarkus CLI run: | cat < ./quarkus-dev-cli #!/bin/bash - java -jar $PWD/quarkus/devtools/cli/target/quarkus-cli-2.2.2.Final-runner.jar "\$@" + java -jar $PWD/quarkus/devtools/cli/target/quarkus-cli-999-SNAPSHOT-runner.jar "\$@" EOF chmod +x ./quarkus-dev-cli - id: files @@ -133,16 +179,16 @@ jobs: - name: Zip Artifacts if: failure() run: | - zip -R artifacts-released-linux-native${{ matrix.java }}.zip '*-reports/*' + zip -R artifacts-latest-linux-native${{ matrix.java }}.zip '*-reports/*' - uses: actions/upload-artifact@v1 if: failure() with: name: ci-artifacts - path: artifacts-released-linux-native${{ matrix.java }}.zip - windows-build-jvm-released: - name: PR - Windows - JVM build - Released Version + path: artifacts-latest-linux-native${{ matrix.java }}.zip + windows-build-jvm-latest: + name: PR - Windows - JVM build - Latest Version runs-on: windows-latest - needs: linux-validate-format + needs: [ build-dependencies, linux-validate-format ] strategy: matrix: java: [ 11 ] @@ -158,6 +204,14 @@ jobs: uses: joschi/setup-jdk@e87a7cec853d2dd7066adf837fe12bf0f3d45e52 with: java-version: ${{ matrix.java }} + - name: Download Maven Repo + uses: actions/download-artifact@v1 + with: + name: maven-repo + path: . + - name: Extract Maven Repo + shell: bash + run: tar -xzf maven-repo.tgz -C ~ - name: Build in JVM mode shell: bash run: | @@ -167,10 +221,10 @@ jobs: if: failure() run: | # Disambiguate windows find from cygwin find - /usr/bin/find . -name '*-reports/*' -type d | tar -czf artifacts-released-windows-jvm${{ matrix.java }}.tar -T - + /usr/bin/find . -name '*-reports/*' -type d | tar -czf artifacts-latest-windows-jvm${{ matrix.java }}.tar -T - - name: Archive artifacts if: failure() uses: actions/upload-artifact@v1 with: name: ci-artifacts - path: artifacts-released-windows-jvm${{ matrix.java }}.tar \ No newline at end of file + path: artifacts-latest-windows-jvm${{ matrix.java }}.tar \ No newline at end of file diff --git a/.github/workflows/daily.yaml b/.github/workflows/daily.yaml index 934e704d3..b03e46b4c 100644 --- a/.github/workflows/daily.yaml +++ b/.github/workflows/daily.yaml @@ -76,7 +76,7 @@ jobs: chmod +x ./quarkus-dev-cli - name: Test in JVM mode run: | - mvn -fae -V -B -s .github/mvn-settings.xml -fae clean verify -Dall-modules -Dinclude.quarkus-cli-tests -Dts.quarkus.cli.cmd="${PWD}/quarkus-dev-cli" -Dquarkus.platform.version=999-SNAPSHOT + mvn -fae -V -B -s .github/mvn-settings.xml -fae clean verify -Dall-modules -Dinclude.quarkus-cli-tests -Dts.quarkus.cli.cmd="${PWD}/quarkus-dev-cli" - name: Zip Artifacts if: failure() run: | @@ -134,7 +134,7 @@ jobs: chmod +x ./quarkus-dev-cli - name: Test in Native mode run: | - mvn -fae -V -B -s .github/mvn-settings.xml -P ${{ matrix.profiles }} -fae clean verify -Dquarkus.platform.version=999-SNAPSHOT -Dnative \ + mvn -fae -V -B -s .github/mvn-settings.xml -P ${{ matrix.profiles }} -fae clean verify -Dnative \ -Dquarkus.native.builder-image=quay.io/quarkus/${{ matrix.image }} \ -Dinclude.quarkus-cli-tests -Dts.quarkus.cli.cmd="${PWD}/quarkus-dev-cli" - name: Zip Artifacts @@ -177,7 +177,7 @@ jobs: - name: Build in JVM mode shell: bash run: | - mvn -fae -s .github/mvn-settings.xml clean verify -Dquarkus.platform.version=999-SNAPSHOT + mvn -fae -s .github/mvn-settings.xml clean verify - name: Zip Artifacts shell: bash if: failure() @@ -237,7 +237,7 @@ jobs: shell: bash run: | # Running only http/http-minimum as after some time, it gives disk full in Windows when running on Native. - mvn -fae -s .github/mvn-settings.xml clean verify -Dall-modules -Dquarkus.platform.version=999-SNAPSHOT -Dnative -Dquarkus.native.container-build=false -pl http/http-minimum + mvn -fae -s .github/mvn-settings.xml clean verify -Dall-modules -Dnative -Dquarkus.native.container-build=false -pl http/http-minimum - name: Zip Artifacts shell: bash if: failure() diff --git a/lifecycle-application/pom.xml b/lifecycle-application/pom.xml index dc5fd88de..2c656dbe6 100644 --- a/lifecycle-application/pom.xml +++ b/lifecycle-application/pom.xml @@ -39,7 +39,7 @@ - 2.2.2.Final + 999-SNAPSHOT diff --git a/pom.xml b/pom.xml index d0745c0f8..aec41cfb4 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 2.22.2 quarkus-bom io.quarkus - 2.2.2.Final + 999-SNAPSHOT ${quarkus.platform.version} 0.0.9 0.27.0 diff --git a/scheduling/quartz/pom.xml b/scheduling/quartz/pom.xml index 442e819eb..a7422e30b 100644 --- a/scheduling/quartz/pom.xml +++ b/scheduling/quartz/pom.xml @@ -12,7 +12,7 @@ io.quarkus - quarkus-resteasy-jackson + quarkus-resteasy-reactive-jackson io.quarkus diff --git a/spring/spring-data/pom.xml b/spring/spring-data/pom.xml index e6ecb0893..945cf15a1 100644 --- a/spring/spring-data/pom.xml +++ b/spring/spring-data/pom.xml @@ -11,10 +11,6 @@ jar Quarkus QE TS: Spring: Spring Data - - io.quarkus - quarkus-undertow - io.quarkus quarkus-spring-di @@ -33,7 +29,7 @@ io.quarkus - quarkus-resteasy-jackson + quarkus-resteasy-reactive-jackson io.quarkus diff --git a/spring/spring-data/src/main/java/io/quarkus/ts/spring/data/primitivetypes/SessionResource.java b/spring/spring-data/src/main/java/io/quarkus/ts/spring/data/primitivetypes/SessionResource.java deleted file mode 100644 index df1a1a2f2..000000000 --- a/spring/spring-data/src/main/java/io/quarkus/ts/spring/data/primitivetypes/SessionResource.java +++ /dev/null @@ -1,15 +0,0 @@ -package io.quarkus.ts.spring.data.primitivetypes; - -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.core.Context; - -@Path("/session") -public class SessionResource { - @PUT - @Path("/invalidate") - public void invalidate(final @Context HttpServletRequest req) { - req.getSession().invalidate(); - } -} diff --git a/spring/spring-data/src/test/java/io/quarkus/ts/spring/data/primitivetypes/CommonsHeadersIT.java b/spring/spring-data/src/test/java/io/quarkus/ts/spring/data/primitivetypes/CommonsHeadersIT.java index 25ae508a8..7ee52e455 100644 --- a/spring/spring-data/src/test/java/io/quarkus/ts/spring/data/primitivetypes/CommonsHeadersIT.java +++ b/spring/spring-data/src/test/java/io/quarkus/ts/spring/data/primitivetypes/CommonsHeadersIT.java @@ -8,6 +8,7 @@ import java.util.HashSet; import java.util.Set; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; @@ -62,6 +63,7 @@ public void testRequestScope() { //This is for regression test for https://github.com/quarkusio/quarkus/pull/12234 @Test + @Disabled("Session ID is not supported in Reactive Resteasy. Reported https://github.com/quarkusio/quarkus/issues/20003") @DisplayName("session scope") public void testSessionScope() { final Response first = app.given().get("/cat/customFindDistinctivePrimitive/2"); diff --git a/sql-db/panache-flyway/pom.xml b/sql-db/panache-flyway/pom.xml index 6af23b4e5..a7a38cb6b 100644 --- a/sql-db/panache-flyway/pom.xml +++ b/sql-db/panache-flyway/pom.xml @@ -17,7 +17,7 @@ io.quarkus - quarkus-resteasy-jackson + quarkus-resteasy-reactive-jackson io.quarkus diff --git a/sql-db/panache-flyway/src/test/java/io/quarkus/qe/sqldb/panacheflyway/DataSourceIT.java b/sql-db/panache-flyway/src/test/java/io/quarkus/qe/sqldb/panacheflyway/DataSourceIT.java index 3b0b3ad66..b7963631c 100644 --- a/sql-db/panache-flyway/src/test/java/io/quarkus/qe/sqldb/panacheflyway/DataSourceIT.java +++ b/sql-db/panache-flyway/src/test/java/io/quarkus/qe/sqldb/panacheflyway/DataSourceIT.java @@ -3,13 +3,10 @@ import static io.restassured.RestAssured.given; import static org.hamcrest.Matchers.is; -import javax.ws.rs.core.MediaType; - import org.apache.http.HttpStatus; import org.junit.jupiter.api.Test; import io.quarkus.test.scenarios.QuarkusScenario; -import io.restassured.http.ContentType; import io.restassured.specification.RequestSpecification; @QuarkusScenario @@ -27,6 +24,6 @@ public void shouldDataSourceBeProperlyConfigured() { } private static final RequestSpecification dataSourcePath() { - return given().accept(MediaType.APPLICATION_JSON).contentType(ContentType.JSON).when().basePath(DATA_SOURCE_PATH); + return given().when().basePath(DATA_SOURCE_PATH); } }