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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(renovate): use preset defined in renovate-config repository #23

Merged
merged 3 commits into from Mar 26, 2024
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 1 addition & 23 deletions .github/renovate.json
@@ -1,25 +1,3 @@
{
"extends": ["config:base", ":label(dependencies)"],
"rebaseWhen": "conflicted",
"packageRules": [
{
"matchDatasources": ["orb"],
"matchUpdateTypes": ["patch", "minor"],
"automerge": true,
"automergeType": "branch",
"semanticCommitType": "ci"
},
{
"matchDepTypes": ["provided", "test", "build", "import", "parent"],
"matchUpdateTypes": ["patch", "minor"],
"automerge": true,
"automergeType": "branch",
"semanticCommitType": "chore"
},
{
"matchDepTypes": ["provided", "test", "build", "import", "parent"],
"matchUpdateTypes": ["major"],
"semanticCommitType": "chore"
}
]
"extends": ["github>gravitee-io/renovate-config:lib"]
}
Expand Up @@ -68,7 +68,8 @@ public abstract class AbstractWebSocketChannel implements Channel {
private static final int PING_DELAY = 5_000;
protected final String id = UUID.randomUUID().toString();
protected final Map<String, CommandHandler<? extends Command<?>, ? extends Reply<?>>> commandHandlers = new ConcurrentHashMap<>();
protected final Map<String, CommandAdapter<? extends Command<?>, ? extends Command<?>, ? extends Reply<?>>> commandAdapters = new ConcurrentHashMap<>();
protected final Map<String, CommandAdapter<? extends Command<?>, ? extends Command<?>, ? extends Reply<?>>> commandAdapters =
new ConcurrentHashMap<>();
protected final Map<String, ReplyAdapter<? extends Reply<?>, ? extends Reply<?>>> replyAdapters = new ConcurrentHashMap<>();
protected final Vertx vertx;
protected final WebSocketBase webSocket;
Expand Down Expand Up @@ -169,9 +170,8 @@ private <C extends Command<?>> void receiveCommand(final CompletableEmitter emit
}

Single<? extends Command<?>> commandObs;
CommandAdapter<Command<?>, Command<?>, Reply<?>> commandAdapter = (CommandAdapter<Command<?>, Command<?>, Reply<?>>) commandAdapters.get(
command.getType()
);
CommandAdapter<Command<?>, Command<?>, Reply<?>> commandAdapter =
(CommandAdapter<Command<?>, Command<?>, Reply<?>>) commandAdapters.get(command.getType());
if (commandAdapter != null) {
commandObs = commandAdapter.adapt(command);
} else {
Expand Down
Expand Up @@ -62,10 +62,11 @@ protected void replyHello(
)
.subscribe();
} else if (command.getType().equals(io.gravitee.exchange.api.websocket.protocol.legacy.hello.HelloCommand.COMMAND_TYPE)) {
io.gravitee.exchange.api.websocket.protocol.legacy.hello.HelloReply helloReply = new io.gravitee.exchange.api.websocket.protocol.legacy.hello.HelloReply(
command.getId(),
new io.gravitee.exchange.api.websocket.protocol.legacy.hello.HelloReplyPayload("targetId")
);
io.gravitee.exchange.api.websocket.protocol.legacy.hello.HelloReply helloReply =
new io.gravitee.exchange.api.websocket.protocol.legacy.hello.HelloReply(
command.getId(),
new io.gravitee.exchange.api.websocket.protocol.legacy.hello.HelloReplyPayload("targetId")
);
serverWebSocket
.writeBinaryMessage(
protocolAdapter.write(
Expand Down
Expand Up @@ -45,7 +45,8 @@ public class EmbeddedChannel implements ControllerChannel, ConnectorChannel {
private final String id = UUID.randomUUID().toString();
private final String targetId;
private final Map<String, CommandHandler<? extends Command<?>, ? extends Reply<?>>> commandHandlers = new ConcurrentHashMap<>();
protected final Map<String, CommandAdapter<? extends Command<?>, ? extends Command<?>, ? extends Reply<?>>> commandAdapters = new ConcurrentHashMap<>();
protected final Map<String, CommandAdapter<? extends Command<?>, ? extends Command<?>, ? extends Reply<?>>> commandAdapters =
new ConcurrentHashMap<>();
protected final Map<String, ReplyAdapter<? extends Reply<?>, ? extends Reply<?>>> replyAdapters = new ConcurrentHashMap<>();
private boolean active = false;

Expand Down
Expand Up @@ -29,7 +29,6 @@
import io.gravitee.exchange.api.controller.ExchangeController;
import io.gravitee.exchange.api.websocket.command.ExchangeSerDe;
import io.gravitee.exchange.api.websocket.protocol.ProtocolVersion;
import io.gravitee.exchange.controller.core.channel.primary.PrimaryChannelManager;
import io.gravitee.exchange.controller.websocket.auth.WebSocketControllerAuthentication;
import io.gravitee.exchange.controller.websocket.channel.WebSocketControllerChannel;
import io.vertx.rxjava3.core.Vertx;
Expand Down Expand Up @@ -66,17 +65,12 @@ public void handle(final RoutingContext routingContext) {
request
.toWebSocket()
.flatMapCompletable(webSocket -> {
List<CommandHandler<? extends Command<?>, ? extends Reply<?>>> commandHandlers = controllerCommandHandlersFactory.buildCommandHandlers(
controllerContext
);
List<CommandAdapter<? extends Command<?>, ? extends Command<?>, ? extends Reply<?>>> commandAdapters = controllerCommandHandlersFactory.buildCommandAdapters(
controllerContext,
protocolVersion
);
List<ReplyAdapter<? extends Reply<?>, ? extends Reply<?>>> replyAdapters = controllerCommandHandlersFactory.buildReplyAdapters(
controllerContext,
protocolVersion
);
List<CommandHandler<? extends Command<?>, ? extends Reply<?>>> commandHandlers =
controllerCommandHandlersFactory.buildCommandHandlers(controllerContext);
List<CommandAdapter<? extends Command<?>, ? extends Command<?>, ? extends Reply<?>>> commandAdapters =
controllerCommandHandlersFactory.buildCommandAdapters(controllerContext, protocolVersion);
List<ReplyAdapter<? extends Reply<?>, ? extends Reply<?>>> replyAdapters =
controllerCommandHandlersFactory.buildReplyAdapters(controllerContext, protocolVersion);

ControllerChannel websocketControllerChannel = new WebSocketControllerChannel(
commandHandlers,
Expand Down
10 changes: 4 additions & 6 deletions pom.xml
Expand Up @@ -146,7 +146,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<version>${maven-compiler-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -156,12 +156,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.6.3</version>
<version>${maven-javadoc-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.3.0</version>
<version>${maven-source-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
Expand Down Expand Up @@ -198,10 +198,8 @@
<plugin>
<groupId>com.hubspot.maven.plugins</groupId>
<artifactId>prettier-maven-plugin</artifactId>
<version>0.22</version>
<configuration>
<nodeVersion>16.16.0</nodeVersion>
<prettierJavaVersion>1.6.1</prettierJavaVersion>
<prettierJavaVersion>${prettier-maven-plugin.prettierJavaVersion}</prettierJavaVersion>
<skip>${skip.validation}</skip>
</configuration>
<executions>
Expand Down