From 7a9edce58c89150a9eb26b9acd18bd4a3de41cae Mon Sep 17 00:00:00 2001 From: Andrew Azores Date: Mon, 30 Sep 2024 12:12:04 -0400 Subject: [PATCH 1/3] auto-upgrade Quarkus to 3.15 --- pom.xml | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/pom.xml b/pom.xml index 184160f83..db6bc89fa 100644 --- a/pom.xml +++ b/pom.xml @@ -44,8 +44,8 @@ 1.20.1 quarkus-bom io.quarkus.platform - 3.8.6 - 2.3.10 + 3.15.1 + 2.4.9 3.6.0 3.4.1 3.7.1 @@ -144,7 +144,7 @@ io.quarkus - quarkus-resteasy-reactive-jackson + quarkus-rest-jackson io.quarkus @@ -181,7 +181,7 @@ io.quarkus - quarkus-rest-client-reactive-jackson + quarkus-rest-client-jackson io.quarkus @@ -219,6 +219,10 @@ org.apache.commons commons-lang3 + + org.flywaydb + flyway-database-postgresql + commons-codec commons-codec @@ -226,7 +230,6 @@ commons-io commons-io - ${org.apache.commons.io.version} org.apache.commons @@ -329,11 +332,6 @@ -parameters - - io.quarkus - quarkus-panache-common - ${quarkus.platform.version} - @@ -501,7 +499,8 @@ false - native + true + false From 3af055da1e685471c579547dc6e5804a16f072e3 Mon Sep 17 00:00:00 2001 From: Andrew Azores Date: Mon, 30 Sep 2024 12:23:26 -0400 Subject: [PATCH 2/3] graphql schema conflict resolution --- .../java/io/cryostat/graphql/RecordingLinks.java | 13 ------------- src/main/java/io/cryostat/graphql/TargetNodes.java | 8 ++++++-- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/src/main/java/io/cryostat/graphql/RecordingLinks.java b/src/main/java/io/cryostat/graphql/RecordingLinks.java index fbc732d55..d6e1684e3 100644 --- a/src/main/java/io/cryostat/graphql/RecordingLinks.java +++ b/src/main/java/io/cryostat/graphql/RecordingLinks.java @@ -17,7 +17,6 @@ import io.cryostat.recordings.ActiveRecording; import io.cryostat.recordings.RecordingHelper; -import io.cryostat.recordings.Recordings.ArchivedRecording; import jakarta.inject.Inject; import org.eclipse.microprofile.graphql.Description; @@ -40,16 +39,4 @@ public String downloadUrl(@Source ActiveRecording recording) { public String reportUrl(@Source ActiveRecording recording) { return recordingHelper.reportUrl(recording); } - - @Description("URL for GET request to retrieve the JFR binary file content of this recording") - public String downloadUrl(@Source ArchivedRecording recording) { - return recording.downloadUrl(); - } - - @Description( - "URL for GET request to retrieve a JSON formatted Automated Analysis Report of this" - + " recording") - public String reportUrl(@Source ArchivedRecording recording) { - return recording.reportUrl(); - } } diff --git a/src/main/java/io/cryostat/graphql/TargetNodes.java b/src/main/java/io/cryostat/graphql/TargetNodes.java index afe9eb9f8..4808eb99e 100644 --- a/src/main/java/io/cryostat/graphql/TargetNodes.java +++ b/src/main/java/io/cryostat/graphql/TargetNodes.java @@ -40,6 +40,7 @@ import org.apache.commons.lang3.StringUtils; import org.eclipse.microprofile.graphql.Description; import org.eclipse.microprofile.graphql.GraphQLApi; +import org.eclipse.microprofile.graphql.Ignore; import org.eclipse.microprofile.graphql.NonNull; import org.eclipse.microprofile.graphql.Query; import org.eclipse.microprofile.graphql.Source; @@ -131,8 +132,11 @@ public MBeanMetrics mbeanMetrics(@Source Target target) { @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") public static class Recordings { - public @NonNull ActiveRecordings active = new ActiveRecordings(); - public @NonNull ArchivedRecordings archived = new ArchivedRecordings(); + // @Ignore these two from the GraphQL schema generation because we override the definition + // in the ArchivedRecordings and ActiveRecordings classes so that we can apply input + // filtering, and those accessor overrides conflict with the schema generator + public @NonNull @Ignore ActiveRecordings active = new ActiveRecordings(); + public @NonNull @Ignore ArchivedRecordings archived = new ArchivedRecordings(); } @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") From 01929f067f1a2af04eb98aa4c334648eb3448ab3 Mon Sep 17 00:00:00 2001 From: Andrew Azores Date: Mon, 30 Sep 2024 13:23:02 -0400 Subject: [PATCH 3/3] fixup! graphql schema conflict resolution --- schema/schema.graphql | 2 +- src/main/java/io/cryostat/recordings/Recordings.java | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/schema/schema.graphql b/schema/schema.graphql index a3b06cc12..f471cf40e 100644 --- a/schema/schema.graphql +++ b/schema/schema.graphql @@ -212,7 +212,7 @@ type Target { } type ThreadMetrics { - allThreadIds: [BigInteger] + allThreadIds: [BigInteger!] currentThreadCpuTime: BigInteger! currentThreadCpuTimeSupported: Boolean! currentThreadUserTime: BigInteger! diff --git a/src/main/java/io/cryostat/recordings/Recordings.java b/src/main/java/io/cryostat/recordings/Recordings.java index bcd408129..e19a0f149 100644 --- a/src/main/java/io/cryostat/recordings/Recordings.java +++ b/src/main/java/io/cryostat/recordings/Recordings.java @@ -85,6 +85,7 @@ import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.tuple.Pair; import org.eclipse.microprofile.config.inject.ConfigProperty; +import org.eclipse.microprofile.graphql.Description; import org.jboss.logging.Logger; import org.jboss.resteasy.reactive.RestForm; import org.jboss.resteasy.reactive.RestPath; @@ -1119,8 +1120,14 @@ public record LinkedRecordingDescriptor( public record ArchivedRecording( String jvmId, String name, - String downloadUrl, - String reportUrl, + @Description( + "URL for GET request to retrieve the JFR binary file content of this" + + " recording") + String downloadUrl, + @Description( + "URL for GET request to retrieve a JSON formatted Automated Analysis" + + " Report of this recording") + String reportUrl, Metadata metadata, long size, long archivedTime) {