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

Update 2.7 branch to use Quarkus 2.7.6 #686

Merged
merged 4 commits into from
Jun 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

import org.jboss.resteasy.reactive.MultipartForm;
import org.jboss.resteasy.reactive.RestResponse;

import io.quarkus.logging.Log;
import io.smallrye.mutiny.Uni;
Expand Down Expand Up @@ -51,10 +51,10 @@ public Uni<String> uploadMultipart(@MultipartForm FileWrapper body) {
@GET
@Produces(MediaType.MULTIPART_FORM_DATA)
@Path("/download-multipart")
public Response downloadMultipart() {
public RestResponse<FileWrapper> downloadMultipart() {
FileWrapper wrapper = new FileWrapper();
wrapper.file = FILE;
return Response.ok(wrapper).build();
return RestResponse.ok(wrapper);
}

@GET
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

import org.eclipse.microprofile.rest.client.annotation.RegisterClientHeaders;
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
Expand All @@ -22,7 +23,7 @@ public interface ProxyClient {
@GET
@Path("/example.txt")
@Produces(MediaType.TEXT_PLAIN)
Uni<String> getText();
Uni<Response> getText();

@GET
@Path("/auth")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

import org.eclipse.microprofile.rest.client.inject.RestClient;

Expand All @@ -27,7 +28,7 @@ public Uni<String> getRoot() {
@GET
@Path("/banned")
@Produces(MediaType.TEXT_PLAIN)
public Uni<String> getBanned() {
public Uni<Response> getBanned() {
return client.getText();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ quarkus.rest-client."io.quarkus.ts.http.restclient.reactive.proxy.ProxyClient".p
quarkus.rest-client."io.quarkus.ts.http.restclient.reactive.proxy.ProxyClient".proxy-user=proxyuser
quarkus.rest-client."io.quarkus.ts.http.restclient.reactive.proxy.ProxyClient".proxy-password=proxypassword
quarkus.rest-client.logging.scope=request-response
quarkus.log.category."org.jboss.resteasy.reactive.client.logging".level=DEBUG
quarkus.log.category."org.jboss.resteasy.reactive.client.logging".level=INFO
microprofile.rest.client.disable.default.mapper=true
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void getThrough() {
@Test
void banned() {
Response banned = proxyApp.given().with().get("/proxied/banned");
Assertions.assertEquals(HttpStatus.SC_OK, banned.statusCode());
Assertions.assertEquals(HttpStatus.SC_FORBIDDEN, banned.statusCode());
Assertions.assertEquals("Reading is prohibited by corporate policy!",
banned.body().asString());
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
FROM nginx:1.21
EXPOSE 8090
COPY nginx.conf /etc/nginx/nginx.conf
3 changes: 3 additions & 0 deletions http/rest-client-reactive/src/test/resources/proxy/deploy.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
VERSION=1.0.1
docker build -t nginx-proxy .
docker tag nginx-proxy quay.io/quarkusqeteam/proxy:latest
docker tag nginx-proxy quay.io/quarkusqeteam/proxy:$VERSION
docker push quay.io/quarkusqeteam/proxy:latest
docker push quay.io/quarkusqeteam/proxy:$VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ http {
proxy_pass http://$host;
}
location ~ \.(txt)$ {
return 203 "Reading is prohibited by corporate policy!";
return 403 "Reading is prohibited by corporate policy!";
}
location /auth {
return 200 $http_proxy_authorization;
Expand Down
2 changes: 1 addition & 1 deletion lifecycle-application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</property>
</activation>
<properties>
<quarkus.platform.version>2.7.5.Final</quarkus.platform.version>
<quarkus.platform.version>2.7.6.Final</quarkus.platform.version>
</properties>
<repositories>
<repository>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<failsafe-plugin.version>2.22.2</failsafe-plugin.version>
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
<quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
<quarkus.platform.version>2.7.5.Final</quarkus.platform.version>
<quarkus.platform.version>2.7.6.Final</quarkus.platform.version>
<quarkus.qe.framework.version>1.1.0.Final</quarkus.qe.framework.version>
<quarkus-qpid-jms.version>0.32.0</quarkus-qpid-jms.version>
<quarkus-ide-config.version>2.6.1.Final</quarkus-ide-config.version>
Expand Down
7 changes: 3 additions & 4 deletions quarkus-cli/src/test/java/io/quarkus/ts/quarkus/cli/QuarkusCliExtensionsIT.java
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import io.quarkus.test.scenarios.QuarkusScenario;
import io.quarkus.test.scenarios.annotations.DisabledOnQuarkusSnapshot;
import io.quarkus.test.scenarios.annotations.DisabledOnQuarkusVersion;
import io.quarkus.test.scenarios.annotations.EnabledOnQuarkusVersion;
import io.quarkus.test.services.quarkus.model.QuarkusProperties;

/**
Expand All @@ -29,6 +30,7 @@
@QuarkusScenario
@DisabledOnQuarkusVersion(version = "1\\..*", reason = "Quarkus CLI has been reworked in 2.x")
@DisabledIfSystemProperty(named = "profile.id", matches = "native", disabledReason = "Only for JVM verification")
@EnabledOnQuarkusVersion(version = ".*redhat.*", reason = "There is no stream 2.7 in code.quarkus.io anymore")
michalvavrik marked this conversation as resolved.
Show resolved Hide resolved
public class QuarkusCliExtensionsIT {

static final String AGROAL_EXTENSION_NAME = "Agroal - Database connection pool";
Expand Down Expand Up @@ -87,9 +89,6 @@ public void shouldListExtensionsUsingPlatformBom() {
}

@DisabledOnQuarkusSnapshot(reason = "999-SNAPSHOT is not pushed into the platform site")
@DisabledOnQuarkusVersion(version = "2.7.5.Final", reason = "Quarkus 2.7 stream was removed from code.quarkus.io")
//TODO Currently code.quarkus and quarkusCli are pointing to the same set of defined streams.
// ZULIP ref: https://quarkusio.zulipchat.com/#narrow/stream/191168-core-team/topic/streams.20on.20registry.20.2F.20code.2Equarkus/near/280456392
@Test
public void shouldListExtensionsUsingStream() {
String streamVersion = getCurrentStreamVersion();
Expand Down Expand Up @@ -158,4 +157,4 @@ private void assertListFullOptionOutput() {
private void assertResultIsSuccessful() {
assertTrue(result.isSuccessful(), "Extensions list command didn't work. Output: " + result.getOutput());
}
}
}