Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.15] Backports for PRs before 7.9.2024 #1989

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
0863af9
Bump Quarkus QE FW to 1.5.1
michalvavrik Sep 7, 2024
c398b51
Test coverage for backport 3.8.6-41411
jcarranzan Aug 28, 2024
b55e35c
Finish test coverage for quarkusio/quarkus#41411
jedla97 Sep 2, 2024
d8ccfc2
Reduce log size in CI runs
gtroitsk Sep 2, 2024
dd6aef6
Ensure abstract jakarta.ws.rs.core.Application is ignored
rsvoboda Sep 2, 2024
3edf058
Test Quarkus REST abstract resources with @Path
rsvoboda Sep 2, 2024
84efc14
Make sure AsyncFile gets closed
rsvoboda Sep 3, 2024
c1b0fb6
Ensure Kafka version is visible in metrics, especially in native mode
rsvoboda Sep 3, 2024
9eade2b
Verify fault tolerance retry logic with rest client reactive
gtroitsk Sep 3, 2024
d548f7f
Adapt TS for breeaking changes in 1.6.0.Beta2
michalvavrik Sep 4, 2024
2e82db7
Dont configure HTTPS in security Vert.X JWT tests
michalvavrik Sep 4, 2024
e7f7374
Migrate gRPC same server TLS test to new API
michalvavrik Sep 4, 2024
7d197e6
Test TLS Registry integration with gRPC
michalvavrik Sep 5, 2024
2130575
Disable podman build on Openshift runs
fedinskiy Sep 4, 2024
ce3bcc2
Add Quarkus CLI TLS command test coverage
michalvavrik Sep 5, 2024
6f99a14
Properly disable the build of podman on openshift
fedinskiy Sep 5, 2024
dd6ac92
Update lifecycle-applicatio to be more robust and independent
rsvoboda Sep 6, 2024
e89f020
Test TLS Registry with Management interface & cert reloading
michalvavrik Sep 6, 2024
f4d7563
Test OpenShift certificate serving with REST client
michalvavrik Sep 6, 2024
3d6b1fb
Test OpenTelemetry integration with TLS registry
michalvavrik Sep 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
check-latest: true
- name: Build Quarkus 3.14
run: |
git clone -b 3.14 https://github.com/quarkusio/quarkus.git && cd quarkus && ./mvnw -B -s .github/mvn-settings.xml clean install -Dquickly -Dno-test-modules -Prelocations
git clone -b 3.14 https://github.com/quarkusio/quarkus.git && cd quarkus && ./mvnw -B --no-transfer-progress -s .github/mvn-settings.xml clean install -Dquickly -Dno-test-modules -Prelocations
- name: Tar Maven Repo
shell: bash
run: tar -I 'pigz -9' -cf maven-repo.tgz -C ~ .m2/repository
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
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 -Dquarkus.container-image.build=false -Dquarkus.container-image.push=false
mvn -V -B --no-transfer-progress -s .github/mvn-settings.xml verify -Dall-modules -Dvalidate-format -DskipTests -DskipITs -Dquarkus.container-image.build=false -Dquarkus.container-image.push=false
detect-test-suite-modules:
name: Detect Modules in PR
runs-on: ubuntu-latest
Expand Down Expand Up @@ -156,7 +156,7 @@ jobs:
./quarkus-dev-cli version
- name: Build with Maven
run: |
mvn -fae -V -B -s .github/mvn-settings.xml clean verify -Dinclude.quarkus-cli-tests -Dts.quarkus.cli.cmd="${PWD}/quarkus-dev-cli"${{ matrix.module-mvn-args }} -am -DexcludedGroups=long-running
mvn -fae -V -B --no-transfer-progress -s .github/mvn-settings.xml clean verify -Dinclude.quarkus-cli-tests -Dts.quarkus.cli.cmd="${PWD}/quarkus-dev-cli"${{ matrix.module-mvn-args }} -am -DexcludedGroups=long-running
- name: Detect flaky tests
id: flaky-test-detector
if: ${{ hashFiles('**/flaky-run-report.json') != '' }}
Expand Down Expand Up @@ -210,7 +210,7 @@ jobs:
./quarkus-dev-cli version
- name: Build with Maven
run: |
mvn -fae -V -B -s .github/mvn-settings.xml -fae \
mvn -fae -V -B --no-transfer-progress -s .github/mvn-settings.xml -fae \
-Dquarkus.native.native-image-xmx=5g \
-Dinclude.quarkus-cli-tests -Dts.quarkus.cli.cmd="${PWD}/quarkus-dev-cli" \
${{ matrix.module-mvn-args }} clean verify -Dnative -am -DexcludedGroups=long-running
Expand Down Expand Up @@ -264,7 +264,7 @@ jobs:
MODULES_MAVEN_PARAM="-pl ${MODULES_ARG}"
fi

mvn -B -fae -s .github/mvn-settings.xml clean verify -Dall-modules $MODULES_MAVEN_PARAM -am -DexcludedGroups=long-running
mvn -B --no-transfer-progress -fae -s .github/mvn-settings.xml clean verify -Dall-modules $MODULES_MAVEN_PARAM -am -DexcludedGroups=long-running
- name: Detect flaky tests
id: flaky-test-detector
if: ${{ hashFiles('**/flaky-run-report.json') != '' }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/daily.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
check-latest: true
- 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 -Dno-test-modules -Prelocations
git clone https://github.com/quarkusio/quarkus.git && cd quarkus && ./mvnw -B --no-transfer-progress -s .github/mvn-settings.xml clean install -Dquickly -Dno-test-modules -Prelocations
- name: Tar Maven Repo
shell: bash
run: tar -I 'pigz -9' -cf maven-repo.tgz -C ~ .m2/repository
Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
./quarkus-dev-cli version
- name: Test in JVM mode
run: |
mvn -fae -V -B -s .github/mvn-settings.xml -fae clean verify -P ${{ matrix.profiles }} -Dinclude.quarkus-cli-tests -Dts.quarkus.cli.cmd="${PWD}/quarkus-dev-cli"
mvn -fae -V -B --no-transfer-progress -s .github/mvn-settings.xml -fae clean verify -P ${{ matrix.profiles }} -Dinclude.quarkus-cli-tests -Dts.quarkus.cli.cmd="${PWD}/quarkus-dev-cli"
- name: Zip Artifacts
if: failure()
run: |
Expand Down Expand Up @@ -127,7 +127,7 @@ jobs:
./quarkus-dev-cli version
- name: Test in Native mode
run: |
mvn -fae -V -B -s .github/mvn-settings.xml -P ${{ matrix.profiles }} -fae clean verify -Dnative \
mvn -fae -V -B --no-transfer-progress -s .github/mvn-settings.xml -P ${{ matrix.profiles }} -fae clean verify -Dnative \
-Dquarkus.native.builder-image=quay.io/quarkus/${{ matrix.image }} \
-Dquarkus.native.native-image-xmx=5g \
-Dinclude.quarkus-cli-tests -Dts.quarkus.cli.cmd="${PWD}/quarkus-dev-cli"
Expand Down Expand Up @@ -168,7 +168,7 @@ jobs:
- name: Build in JVM mode
shell: bash
run: |
mvn -B -fae -s .github/mvn-settings.xml clean verify
mvn -B --no-transfer-progress -fae -s .github/mvn-settings.xml clean verify
- name: Zip Artifacts
shell: bash
if: failure()
Expand Down Expand Up @@ -222,7 +222,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 -B -fae -s .github/mvn-settings.xml clean verify -Dall-modules -Dnative -Dquarkus.native.container-build=false -pl http/http-minimum
mvn -B --no-transfer-progress -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()
Expand Down
32 changes: 32 additions & 0 deletions build/podman/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,37 @@
</plugins>
</build>
</profile>
<profile>
<id>openshift</id>
<activation>
<property>
<name>openshift</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>${quarkus.platform.group-id}</groupId>
<artifactId>quarkus-maven-plugin</artifactId>
<version>${quarkus.platform.version}</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
import java.util.List;

public final class GrpcReflectionResponse {
private final int serviceCount;
private final List<String> serviceList;
private int serviceCount;
private List<String> serviceList;

public GrpcReflectionResponse() {
}

public GrpcReflectionResponse(int serviceCount, List<String> serviceList) {
this.serviceCount = serviceCount;
Expand All @@ -19,4 +22,11 @@ public int getServiceCount() {
return serviceCount;
}

public void setServiceCount(int serviceCount) {
this.serviceCount = serviceCount;
}

public void setServiceList(List<String> serviceList) {
this.serviceList = serviceList;
}
}
32 changes: 25 additions & 7 deletions http/grpc/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,31 @@ quarkus.grpc.server.enable-reflection-service=true
quarkus.grpc.clients.reflection-service.port=${quarkus.grpc.clients.plain.port}
quarkus.grpc.clients.streaming.port=${quarkus.grpc.clients.plain.port}

%ssl.quarkus.grpc.clients.plain.ssl.trust-store=tls/ca.pem
%ssl.quarkus.grpc.clients.reflection-service.ssl.trust-store=${quarkus.grpc.clients.plain.ssl.trust-store}
%ssl.quarkus.grpc.clients.streaming.ssl.trust-store=${quarkus.grpc.clients.plain.ssl.trust-store}
%ssl.quarkus.grpc.clients.plain.ssl.trust-store=${grpc.client.ca-cert}
%ssl.quarkus.grpc.clients.reflection-service.ssl.trust-store=${grpc.client.ca-cert}
%ssl.quarkus.grpc.clients.streaming.ssl.trust-store=${grpc.client.ca-cert}

# See https://github.com/quarkusio/quarkus/issues/38965 to learn, why we use these parameters
%ssl.quarkus.grpc.clients.plain.port=${quarkus.http.ssl-port}
%ssl.quarkus.http.ssl.certificate.files=tls/server.pem
%ssl.quarkus.http.ssl.certificate.key-files=tls/server.key
%ssl.quarkus.grpc.server.ssl.certificate=tls/server.pem
%ssl.quarkus.grpc.server.ssl.key=tls/server.key
%ssl.quarkus.http.ssl.certificate.files=${grpc.server.cert}
%ssl.quarkus.http.ssl.certificate.key-files=${grpc.server.key}
%ssl.quarkus.grpc.server.ssl.certificate=${grpc.server.cert}
%ssl.quarkus.grpc.server.ssl.key=${grpc.server.key}

%mtls.quarkus.http.insecure-requests=disabled
%mtls.quarkus.grpc.server.plain-text=false
%mtls.quarkus.grpc.clients.plain.tls-configuration-name=mtls-client
%mtls.quarkus.grpc.clients.reflection-service.tls-configuration-name=mtls-client
%mtls.quarkus.grpc.clients.streaming.tls-configuration-name=mtls-client
%mtls.quarkus.grpc.clients.plain.tls.enabled=true
%mtls.quarkus.grpc.clients.reflection-service.tls.enabled=true
%mtls.quarkus.grpc.clients.streaming.tls.enabled=true
%mtls.quarkus.grpc.clients.plain.plain-text=false
%mtls.quarkus.grpc.clients.reflection-service.plain-text=false
%mtls.quarkus.grpc.clients.streaming.plain-text=false
%mtls.quarkus.grpc.clients.reflection-service.use-quarkus-grpc-client=true
%mtls.quarkus.grpc.clients.streaming.use-quarkus-grpc-client=true
%mtls.quarkus.grpc.clients.plain.port=${quarkus.http.ssl-port}
%mtls.quarkus.tls.mtls-client.key-store.pem.0.cert=${grpc.client.crt}
%mtls.quarkus.tls.mtls-client.key-store.pem.0.key=${grpc.client.key}
%mtls.quarkus.tls.mtls-client.trust-store.pem.certs=${grpc.client.ca-crt}
6 changes: 0 additions & 6 deletions http/grpc/src/main/resources/tls/ca.cnf

This file was deleted.

21 changes: 0 additions & 21 deletions http/grpc/src/main/resources/tls/ca.pem

This file was deleted.

28 changes: 0 additions & 28 deletions http/grpc/src/main/resources/tls/server.key

This file was deleted.

20 changes: 0 additions & 20 deletions http/grpc/src/main/resources/tls/server.pem

This file was deleted.

44 changes: 24 additions & 20 deletions http/grpc/src/test/java/io/quarkus/ts/http/grpc/GRPCIT.java
Original file line number Diff line number Diff line change
@@ -1,51 +1,55 @@
package io.quarkus.ts.http.grpc;

import static org.hamcrest.CoreMatchers.is;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;

import java.util.Iterator;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.atomic.AtomicInteger;

import org.apache.http.HttpStatus;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

import io.grpc.Channel;
import io.quarkus.test.bootstrap.RestService;
import io.quarkus.test.bootstrap.CloseableManagedChannel;
import io.quarkus.ts.grpc.GreeterGrpc;
import io.quarkus.ts.grpc.HelloReply;
import io.quarkus.ts.grpc.HelloRequest;
import io.quarkus.ts.grpc.StreamingGrpc;
import io.vertx.mutiny.ext.web.client.WebClient;

public interface GRPCIT {

RestService app();
CloseableManagedChannel getChannel();

Channel getChannel();
WebClient getWebClient();

@Test
default void grpcClient() {
app().given().get("/http/grpc").then()
.statusCode(HttpStatus.SC_OK)
.body(is("Hello grpc"));
var response = getWebClient().get("/http/grpc").sendAndAwait();
assertEquals(HttpStatus.SC_OK, response.statusCode());
assertTrue(response.bodyAsString().startsWith("Hello grpc"));
}

@Test
default void grpcServer() throws ExecutionException, InterruptedException {
HelloRequest request = HelloRequest.newBuilder().setName("server").build();
HelloReply response = GreeterGrpc.newFutureStub(getChannel()).sayHello(request).get();
Assertions.assertEquals("Hello server", response.getMessage());
try (var channel = getChannel()) {
HelloRequest request = HelloRequest.newBuilder().setName("server").build();
HelloReply response = GreeterGrpc.newFutureStub(channel).sayHello(request).get();
assertEquals("Hello server", response.getMessage());
}
}

@Test
default void serverStream() {
HelloRequest request = HelloRequest.newBuilder().setName("ServerStream").build();
Iterator<HelloReply> stream = StreamingGrpc.newBlockingStub(getChannel()).serverStream(request);
AtomicInteger counter = new AtomicInteger(0);
stream.forEachRemaining((reply) -> {
Assertions.assertEquals("Hello ServerStream", reply.getMessage());
counter.incrementAndGet();
});
Assertions.assertEquals(GrpcStreamingService.SERVER_STREAM_MESSAGES_COUNT, counter.get());
try (var channel = getChannel()) {
HelloRequest request = HelloRequest.newBuilder().setName("ServerStream").build();
Iterator<HelloReply> stream = StreamingGrpc.newBlockingStub(channel).serverStream(request);
AtomicInteger counter = new AtomicInteger(0);
stream.forEachRemaining((reply) -> {
assertEquals("Hello ServerStream", reply.getMessage());
counter.incrementAndGet();
});
assertEquals(GrpcStreamingService.SERVER_STREAM_MESSAGES_COUNT, counter.get());
}
}
}
Loading