Skip to content

Commit

Permalink
build(deps): update Quarkus to 3.8 LTS
Browse files Browse the repository at this point in the history
Clean up labels/annotations internal representation using KeyValue type
for better uniformity across API. Fix up some misuse of Blocking
annotation and some bad transaction handling at startup.
  • Loading branch information
andrewazores committed Aug 15, 2024
1 parent 8f86147 commit 4cfb601
Show file tree
Hide file tree
Showing 26 changed files with 378 additions and 340 deletions.
21 changes: 8 additions & 13 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,8 @@
<org.testcontainers.bom.version>1.20.1</org.testcontainers.bom.version>
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
<quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id>
<quarkus.platform.version>3.2.12.Final</quarkus.platform.version>
<quarkus-quinoa.version>2.2.5</quarkus-quinoa.version>
<io.netty.version>4.1.108.Final</io.netty.version>
<quarkus.platform.version>3.8.5</quarkus.platform.version>
<quarkus-quinoa.version>2.3.10</quarkus-quinoa.version>
<org.codehaus.mojo.build.helper.plugin.version>3.6.0</org.codehaus.mojo.build.helper.plugin.version>
<assembly-plugin.version>3.7.1</assembly-plugin.version>

Expand All @@ -59,19 +58,12 @@
<com.google.java-format.version>1.23.0</com.google.java-format.version>
<com.mycila.license.maven.plugin.version>4.5</com.mycila.license.maven.plugin.version>
<surefire-plugin.version>3.3.1</surefire-plugin.version>
<surefire.rerunFailingTestsCount>2</surefire.rerunFailingTestsCount>
<failsafe-plugin.version>3.3.1</failsafe-plugin.version>
<failsafe.rerunFailingTestsCount>${surefire.rerunFailingTestsCount}</failsafe.rerunFailingTestsCount>
<!-- <surefire.rerunFailingTestsCount>2</surefire.rerunFailingTestsCount> -->
<!-- <failsafe.rerunFailingTestsCount>${surefire.rerunFailingTestsCount}</failsafe.rerunFailingTestsCount> -->
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-bom</artifactId>
<version>${io.netty.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>${quarkus.platform.group-id}</groupId>
<artifactId>${quarkus.platform.artifact-id}</artifactId>
Expand Down Expand Up @@ -160,6 +152,10 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-vertx</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-netty</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-smallrye-openapi</artifactId>
Expand Down Expand Up @@ -538,7 +534,6 @@
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
<version>${io.netty.version}</version>
<classifier>${io.netty.netty-transport-native-epoll.classifier}</classifier>
<scope>${io.netty.netty-transport-native-epoll.scope}</scope>
</dependency>
Expand Down
48 changes: 26 additions & 22 deletions schema/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ components:
Annotations:
properties:
cryostat:
additionalProperties:
type: string
type: object
items:
$ref: '#/components/schemas/KeyValue'
type: array
platform:
additionalProperties:
type: string
type: object
items:
$ref: '#/components/schemas/KeyValue'
type: array
type: object
ArchivedRecording:
properties:
Expand Down Expand Up @@ -66,9 +66,9 @@ components:
format: int64
type: integer
labels:
additionalProperties:
type: string
type: object
items:
$ref: '#/components/schemas/KeyValue'
type: array
name:
pattern: \S
type: string
Expand All @@ -85,6 +85,7 @@ components:
DiscoveryPlugin:
properties:
builtin:
readOnly: true
type: boolean
callback:
format: uri
Expand Down Expand Up @@ -124,6 +125,13 @@ components:
value: {}
type: object
type: array
KeyValue:
properties:
key:
type: string
value:
type: string
type: object
LinkedRecordingDescriptor:
properties:
continuous:
Expand Down Expand Up @@ -296,6 +304,7 @@ components:
Target:
properties:
agent:
readOnly: true
type: boolean
alias:
pattern: \S
Expand All @@ -311,9 +320,9 @@ components:
jvmId:
type: string
labels:
additionalProperties:
type: string
type: object
items:
$ref: '#/components/schemas/KeyValue'
type: array
required:
- connectUrl
- alias
Expand Down Expand Up @@ -347,11 +356,6 @@ components:
meta:
$ref: '#/components/schemas/Meta'
type: object
securitySchemes:
SecurityScheme:
description: Authentication
scheme: basic
type: http
info:
contact:
email: [email protected]
Expand Down Expand Up @@ -913,7 +917,7 @@ paths:
type: string
requestBody:
content:
application/json:
text/plain:
schema:
type: string
responses:
Expand Down Expand Up @@ -1906,7 +1910,7 @@ paths:
responses:
"200":
content:
application/json:
text/plain:
schema:
type: string
description: OK
Expand Down Expand Up @@ -2393,13 +2397,13 @@ paths:
type: integer
requestBody:
content:
application/json:
text/plain:
schema:
type: string
responses:
"200":
content:
application/json:
text/plain:
schema:
type: string
description: OK
Expand Down Expand Up @@ -2429,7 +2433,7 @@ paths:
responses:
"200":
content:
application/json:
text/plain:
schema:
type: string
description: OK
Expand Down
5 changes: 5 additions & 0 deletions schema/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ type Entry_String_String {
value: String
}

type KeyValue {
key: String
value: String
}

type MBeanMetrics {
jvmId: String
memory: MemoryMetrics
Expand Down
83 changes: 0 additions & 83 deletions src/main/java/io/cryostat/ObjectMapperCustomization.java

This file was deleted.

3 changes: 0 additions & 3 deletions src/main/java/io/cryostat/credentials/Credentials.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import io.cryostat.expressions.MatchExpression;
import io.cryostat.expressions.MatchExpression.TargetMatcher;

import io.smallrye.common.annotation.Blocking;
import jakarta.annotation.security.RolesAllowed;
import jakarta.inject.Inject;
import jakarta.transaction.Transactional;
Expand Down Expand Up @@ -113,7 +112,6 @@ static Map<String, Object> notificationResult(Credential credential) throws Scri
return result;
}

@Blocking
static Map<String, Object> safeResult(Credential credential, TargetMatcher matcher)
throws ScriptException {
Map<String, Object> result = new HashMap<>();
Expand All @@ -124,7 +122,6 @@ static Map<String, Object> safeResult(Credential credential, TargetMatcher match
return result;
}

@Blocking
static Map<String, Object> safeMatchedResult(Credential credential, TargetMatcher matcher)
throws ScriptException {
Map<String, Object> result = new HashMap<>();
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/io/cryostat/credentials/CredentialsFinder.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import io.cryostat.targets.Target.TargetDiscovery;

import io.quarkus.vertx.ConsumeEvent;
import io.smallrye.common.annotation.Blocking;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.inject.Inject;
import org.apache.commons.collections4.BidiMap;
Expand Down Expand Up @@ -52,7 +51,6 @@ void onMessage(TargetDiscovery event) {
}
}

@Blocking
public Optional<Credential> getCredentialsForTarget(Target target) {
return Optional.ofNullable(
cache.computeIfAbsent(
Expand All @@ -73,7 +71,6 @@ public Optional<Credential> getCredentialsForTarget(Target target) {
.orElse(null)));
}

@Blocking
public Optional<Credential> getCredentialsForConnectUrl(URI connectUrl) {
return Target.find("connectUrl", connectUrl)
.<Target>singleResultOptional()
Expand Down
Loading

0 comments on commit 4cfb601

Please sign in to comment.