From c504149668977915686edaae8af8dbfcea3fafa7 Mon Sep 17 00:00:00 2001 From: Jose Date: Tue, 20 Jul 2021 08:26:24 +0200 Subject: [PATCH 1/3] Fix order format issue in module 014 --- .../src/main/java/io/quarkus/qe/rest/data/UserRepository.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/014-quarkus-panache-with-transactions-xa/src/main/java/io/quarkus/qe/rest/data/UserRepository.java b/014-quarkus-panache-with-transactions-xa/src/main/java/io/quarkus/qe/rest/data/UserRepository.java index 4d70a927..dce00c37 100644 --- a/014-quarkus-panache-with-transactions-xa/src/main/java/io/quarkus/qe/rest/data/UserRepository.java +++ b/014-quarkus-panache-with-transactions-xa/src/main/java/io/quarkus/qe/rest/data/UserRepository.java @@ -1,9 +1,8 @@ package io.quarkus.qe.rest.data; -import io.quarkus.hibernate.orm.panache.PanacheQuery; -import io.quarkus.panache.common.Sort; import javax.enterprise.context.ApplicationScoped; +import io.quarkus.hibernate.orm.panache.PanacheQuery; import io.quarkus.hibernate.orm.panache.PanacheRepositoryBase; @ApplicationScoped From cc3fe7348b9ae582890037ae27c83ce12ce9891b Mon Sep 17 00:00:00 2001 From: Jose Date: Tue, 20 Jul 2021 08:41:23 +0200 Subject: [PATCH 2/3] Fix naming of token live span property The behaviour of `@WithName` has changed in 2.1. I've reported https://github.com/quarkusio/quarkus/issues/18842 to clarify if the new behaviour is correct (I think it is) and to update the migration guide accordingly. --- .../main/java/io/quarkus/qe/vertx/web/config/AuthNConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/302-quarkus-vertx-jwt/src/main/java/io/quarkus/qe/vertx/web/config/AuthNConfig.java b/302-quarkus-vertx-jwt/src/main/java/io/quarkus/qe/vertx/web/config/AuthNConfig.java index 3ac7fe0f..94fabaa5 100644 --- a/302-quarkus-vertx-jwt/src/main/java/io/quarkus/qe/vertx/web/config/AuthNConfig.java +++ b/302-quarkus-vertx-jwt/src/main/java/io/quarkus/qe/vertx/web/config/AuthNConfig.java @@ -9,7 +9,7 @@ public interface AuthNConfig { String secret(); - @WithName("tokenLiveSpanMin") + @WithName("token-live-span-min") int liveSpan(); @WithName("jwt.claims") From 8c29af6f78f365ff17c9bea406a648b78ed5fa5c Mon Sep 17 00:00:00 2001 From: Jose Date: Tue, 20 Jul 2021 10:03:40 +0200 Subject: [PATCH 3/3] Run Native only for the changed modules in PRs This solution is based on the Jenkins script detection file and uses the https://github.com/marketplace/actions/get-all-changed-files step to get the changes for a PR. --- .github/workflows/pr.yaml | 70 ++++++++++++++++++++++++++++++++++----- 1 file changed, 61 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 01574aec..475bd778 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -33,8 +33,8 @@ jobs: with: name: maven-repo path: maven-repo.tgz - linux-build: - name: Linux - PR build + linux-build-jvm: + name: PR - Linux - JVM build runs-on: ubuntu-latest needs: quarkus-main-build strategy: @@ -66,20 +66,72 @@ jobs: - name: Test in JVM mode run: | mvn -fae -V -B -s .github/mvn-settings.xml -Dvalidate-format clean test - - name: Smoke Test in Native mode + - name: Zip Artifacts run: | - mvn -V -B -s .github/mvn-settings.xml -Dvalidate-format -fae clean verify -Dnative \ - -Dquarkus.native.container-build=true -Dquarkus.native.native-image-xmx=4g \ - -Dquarkus.native.builder-image=quay.io/quarkus/${{ matrix.image }} \ - -pl '003-quarkus-many-extensions' + zip -R artifacts-linux-jvm${{ matrix.java }}.zip '*-reports/*' + - name: Archive artifacts + uses: actions/upload-artifact@v1 + with: + name: ci-artifacts + path: artifacts-linux-jvm${{ matrix.java }}.zip + linux-build-native: + name: PR - Linux - Native build + runs-on: ubuntu-latest + needs: quarkus-main-build + 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: 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 ~ + - id: files + uses: jitterbit/get-changed-files@v1 + - name: Test in Native mode + run: | + MODULES=$(find -name pom.xml | sed -e 's|pom.xml| |' | sed -e 's|./| |') + # Always run the module 003-quarkus-many-extensions + CHANGED="003-quarkus-many-extensions" + MODULES_ARG="" + + for module in $MODULES + do + if [[ "${{ steps.files.outputs.all }}" =~ ("$module") ]] ; then + CHANGED=$(echo $CHANGED" "$module) + fi + done + + MODULES_ARG="${CHANGED// /,}" + mvn -fae -V -B -s .github/mvn-settings.xml -fae -pl $MODULES_ARG clean verify -Dnative \ + -Dquarkus.native.container-build=true -Dquarkus.native.native-image-xmx=4g - name: Zip Artifacts + if: failure() run: | - zip -R artifacts-linux${{ matrix.java }}.zip '*-reports/*' + zip -R artifacts-linux-native${{ matrix.java }}.zip '*-reports/*' - name: Archive artifacts + if: failure() uses: actions/upload-artifact@v1 with: name: ci-artifacts - path: artifacts-linux${{ matrix.java }}.zip + path: artifacts-linux-native${{ matrix.java }}.zip windows-build: name: Windows - PR build runs-on: windows-latest