-
Hi, Below is the closest I can come to 3.1.0.Final with a POM that actually allows a build to work: <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>tech.tofel</groupId>
<artifactId>trino</artifactId>
<name>trino</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
<compiler-plugin.version>3.8.1</compiler-plugin.version>
<maven.compiler.parameters>true</maven.compiler.parameters>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<fabric8-client.version>6.6.2</fabric8-client.version>
<quarkus-sdk.version>6.0.3</quarkus-sdk.version>
<quarkus-operator-sdk-csv-generator>3.0.5</quarkus-operator-sdk-csv-generator>
<quarkus.version>3.0.3.Final</quarkus.version>
<!-- <quarkus.jib.jvm-arguments>-Djava.util.logging.manager=org.jboss.logmanager.LogManager,-Dvertx.cacheDirBase=/home/jboss/vertx-cache</quarkus.jib.jvm-arguments>-->
<!-- <quarkus.jib.base-jvm-image>registry.access.redhat.com/ubi8/openjdk-17@sha256:e2c7f23132ef04d94b735d58f7dd544088cf46cb23415e902ae446c45fc9268a</quarkus.jib.base-jvm-image>-->
</properties>
<repositories>
<repository>
<id>Central</id>
<name>Central</name>
<url>https://repo1.maven.org/maven2/</url>
</repository>
</repositories>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-client-bom</artifactId>
<version>${fabric8-client.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-bom</artifactId>
<version>${quarkus.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>io.quarkiverse.operatorsdk</groupId>
<artifactId>quarkus-operator-sdk</artifactId>
<version>${quarkus-sdk.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.quarkiverse.operatorsdk/quarkus-operator-sdk-deployment -->
<dependency>
<groupId>io.quarkiverse.operatorsdk</groupId>
<artifactId>quarkus-operator-sdk-deployment</artifactId>
<version>${quarkus-sdk.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.quarkiverse.operatorsdk/quarkus-operator-sdk-csv-generator -->
<!--TODO CSV generation is failing post move to Quarkus 3.0.3-->
<!-- <dependency>-->
<!-- <groupId>io.quarkiverse.operatorsdk</groupId>-->
<!-- <artifactId>quarkus-operator-sdk-csv-generator</artifactId>-->
<!-- <version>${quarkus-operator-sdk-csv-generator}</version>-->
<!-- </dependency>-->
</dependencies>
<build>
<plugins>
<plugin>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-maven-plugin</artifactId>
<version>${quarkus.version}</version>
<executions>
<execution>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${compiler-plugin.version}</version>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>native</id>
<properties>
<quarkus.package.type>native</quarkus.package.type>
</properties>
</profile>
</profiles>
</project>
I'd appreciate any comments ranging from "What a bozo, what the heck are you trying to achieve?" to "Just tweak this and you'll be all set." This was a working 2.x project that I want to move to 3.x. Note to commented out CSV generation. That errors with the current POM settings. Also weirdly, if I build this, I get a warning about the fabric8 and JOSDK versions: Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 10 replies
-
/cc @Sgitario (kubernetes), @geoand (jib,kubernetes), @iocanel (kubernetes) |
Beta Was this translation helpful? Give feedback.
-
Please show the actual output generated. Easier to match up with what you describe. The recommendations between 2.x and 3.x is expected to be different as operator sdk is aligned with the platform bom now. Remember Recommendations does not mean requirements. If you have a reason for using different versions than what is in the bom that is upto you just like you did for 2.x. |
Beta Was this translation helpful? Give feedback.
-
The last comment you have about mismatches is operator sdk trying to detect mismatches. I've recommended before that gets removed to avoid confusions like this. |
Beta Was this translation helpful? Give feedback.
-
Ah, yep. I had tried putting them all in BOMs, should have shown that. <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>tech.tofel</groupId>
<artifactId>trino</artifactId>
<name>trino</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
<compiler-plugin.version>3.8.1</compiler-plugin.version>
<maven.compiler.parameters>true</maven.compiler.parameters>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<fabric8-client.version>6.1.1</fabric8-client.version>
<quarkus-sdk.version>6.1.1</quarkus-sdk.version>
<quarkus-operator-sdk-csv-generator>3.0.5</quarkus-operator-sdk-csv-generator>
<quarkus.version>3.1.0.Final</quarkus.version>
<!-- <quarkus.jib.jvm-arguments>-Djava.util.logging.manager=org.jboss.logmanager.LogManager,-Dvertx.cacheDirBase=/home/jboss/vertx-cache</quarkus.jib.jvm-arguments>-->
<!-- <quarkus.jib.base-jvm-image>registry.access.redhat.com/ubi8/openjdk-17@sha256:e2c7f23132ef04d94b735d58f7dd544088cf46cb23415e902ae446c45fc9268a</quarkus.jib.base-jvm-image>-->
</properties>
<repositories>
<repository>
<id>Central</id>
<name>Central</name>
<url>https://repo1.maven.org/maven2/</url>
</repository>
</repositories>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-client-bom</artifactId>
<version>${fabric8-client.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-bom</artifactId>
<version>${quarkus.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.quarkiverse.operatorsdk</groupId>
<artifactId>quarkus-operator-sdk-bom</artifactId>
<version>${quarkus-sdk.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies> But that yields errors around Fabric8 (perhaps compatible version related?) that I haven't been able to work out so far. $ make docker-build
mvn clean package -Dquarkus.container-image.build=true -Dquarkus.container-image.image=localhost:5000/trino-operator:0.0.1-SNAPSHOT
[INFO] Scanning for projects...
[INFO]
[INFO] --------------------------< tech.tofel:trino >--------------------------
[INFO] Building trino 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ trino ---
[INFO] Deleting /Users/btofel/workspace/trino-operator/target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ trino ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ trino ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 4 source files to /Users/btofel/workspace/trino-operator/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /Users/btofel/workspace/trino-operator/src/main/java/tech/tofel/TrinoOperatorController.java:[4,44] package io.fabric8.kubernetes.api.model.apps does not exist
[ERROR] /Users/btofel/workspace/trino-operator/src/main/java/tech/tofel/TrinoOperatorController.java:[6,36] package io.fabric8.kubernetes.client does not exist
[ERROR] /Users/btofel/workspace/trino-operator/src/main/java/tech/tofel/TrinoOperatorController.java:[8,50] package io.javaoperatorsdk.operator.api.reconciler does not exist
[ERROR] /Users/btofel/workspace/trino-operator/src/main/java/tech/tofel/TrinoOperatorController.java:[9,59] package io.javaoperatorsdk.operator.processing.event.source does not exist
[ERROR] /Users/btofel/workspace/trino-operator/src/main/java/tech/tofel/TrinoOperatorController.java:[10,17] package org.slf4j does not exist
[ERROR] /Users/btofel/workspace/trino-operator/src/main/java/tech/tofel/TrinoOperatorController.java:[11,17] package org.slf4j does not exist
[ERROR] /Users/btofel/workspace/trino-operator/src/main/java/tech/tofel/TrinoOperatorController.java:[19,49] cannot find symbol
symbol: class Reconciler
[ERROR] /Users/btofel/workspace/trino-operator/src/main/java/tech/tofel/TrinoOperatorController.java:[18,2] cannot find symbol
symbol: class ControllerConfiguration
<snip> Errors were same when I chose 6.6.2 for the Fabric8 BOM as well. Is there a big compatibility matrix hiding somewhere? :-) |
Beta Was this translation helpful? Give feedback.
-
Chris & Max, <properties>
<compiler-plugin.version>3.8.1</compiler-plugin.version>
<maven.compiler.parameters>true</maven.compiler.parameters>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<fabric8-client.version>6.6.2</fabric8-client.version>
<quarkus-sdk.version>6.1.1</quarkus-sdk.version>
<quarkus-operator-sdk-csv-generator>3.0.9</quarkus-operator-sdk-csv-generator>
<quarkus.version>3.1.0.Final</quarkus.version>
<!-- <quarkus.jib.jvm-arguments>-Djava.util.logging.manager=org.jboss.logmanager.LogManager,-Dvertx.cacheDirBase=/home/jboss/vertx-cache</quarkus.jib.jvm-arguments>-->
<!-- <quarkus.jib.base-jvm-image>registry.access.redhat.com/ubi8/openjdk-17@sha256:e2c7f23132ef04d94b735d58f7dd544088cf46cb23415e902ae446c45fc9268a</quarkus.jib.base-jvm-image>-->
</properties>
<repositories>
<repository>
<id>Central</id>
<name>Central</name>
<url>https://repo1.maven.org/maven2/</url>
</repository>
</repositories>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-bom</artifactId>
<version>${quarkus.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.quarkiverse.operatorsdk</groupId>
<artifactId>quarkus-operator-sdk-bom</artifactId>
<version>${quarkus-sdk.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>io.quarkiverse.operatorsdk</groupId>
<artifactId>quarkus-operator-sdk</artifactId>
</dependency>
<dependency>
<groupId>io.quarkiverse.operatorsdk</groupId>
<artifactId>quarkus-operator-sdk-deployment</artifactId>
</dependency>
<dependency>
<groupId>io.quarkiverse.operatorsdk</groupId>
<artifactId>quarkus-operator-sdk-csv-generator</artifactId>
<version>${quarkus-operator-sdk-csv-generator}</version>
</dependency>
<!-- This dependency is needed only to ensure proper building order so that this module is build after the CSV extension -->
<!-- https://mvnrepository.com/artifact/io.quarkiverse.operatorsdk/quarkus-operator-sdk-csv-generator-deployment -->
<dependency>
<groupId>io.quarkiverse.operatorsdk</groupId>
<artifactId>quarkus-operator-sdk-csv-generator-deployment</artifactId>
<version>${quarkus-operator-sdk-csv-generator}</version>
<scope>provided</scope>
</dependency>
</dependencies> Errors like this: [INFO] [io.quarkiverse.operatorsdk.deployment.QuarkusControllerConfigurationBuilder] Processed 'tech.tofel.TrinoOperatorController' reconciler named 'trinooperatorcontroller' for 'trino-operators.trino-group.tofel.tech' resource (version 'trino-group.tofel.tech/v1alpha1')
[INFO] Generating 'trino-operators.trino-group.tofel.tech' version 'v1alpha1' with tech.tofel.TrinoOperator (spec: tech.tofel.TrinoOperatorSpec / status tech.tofel.TrinoOperatorStatus)...
[INFO] [io.quarkiverse.operatorsdk.deployment.OperatorSDKProcessor] Generated trino-operators.trino-group.tofel.tech CRD:
[INFO] [io.quarkiverse.operatorsdk.deployment.OperatorSDKProcessor] - v1 -> /Users/btofel/workspace/trino-operator/target/kubernetes/trino-operators.trino-group.tofel.tech-v1.yml
[INFO] [io.quarkiverse.operatorsdk.deployment.OperatorSDKProcessor] Registered 'io.javaoperatorsdk.operator.processing.retry.GenericRetry' for reflection
[INFO] [io.quarkiverse.operatorsdk.deployment.OperatorSDKProcessor] Registered 'io.javaoperatorsdk.operator.processing.event.rate.LinearRateLimiter' for reflection
[INFO] [io.quarkiverse.operatorsdk.deployment.OperatorSDKProcessor] Registered 'tech.tofel.TrinoOperator' for reflection
[INFO] [io.quarkiverse.operatorsdk.deployment.OperatorSDKProcessor] Registered 'tech.tofel.TrinoOperatorStatus' for reflection
[INFO] [io.quarkiverse.operatorsdk.deployment.OperatorSDKProcessor] Registered 'io.javaoperatorsdk.operator.processing.dependent.kubernetes.KubernetesDependentResourceConfig' for reflection
[INFO] [io.quarkiverse.operatorsdk.deployment.OperatorSDKProcessor] Registered 'tech.tofel.TrinoOperatorSpec' for reflection
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.992 s
[INFO] Finished at: 2023-06-05T16:45:23+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:3.1.0.Final:build (default) on project trino: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[ERROR] [error]: Build step io.quarkiverse.operatorsdk.csv.deployment.ManifestsProcessor#gatherCSVMetadata threw an exception: java.lang.ClassCastException: class io.quarkiverse.operatorsdk.common.ReconcilerAugmentedClassInfo cannot be cast to class org.jboss.jandex.ClassInfo (io.quarkiverse.operatorsdk.common.ReconcilerAugmentedClassInfo and org.jboss.jandex.ClassInfo are in unnamed module of loader io.quarkus.bootstrap.classloading.QuarkusClassLoader @73ccdfc1)
[ERROR] at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
[ERROR] at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
[ERROR] at java.base/java.util.stream.ReferencePipeline$11$1.accept(ReferencePipeline.java:442)
[ERROR] at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
[ERROR] at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
[ERROR] at java.base/java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1603)
[ERROR] at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
[ERROR] at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
[ERROR] at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
[ERROR] at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
[ERROR] at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
[ERROR] at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
[ERROR] at io.quarkiverse.operatorsdk.csv.deployment.ManifestsProcessor.gatherCSVMetadata(ManifestsProcessor.java:62)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[ERROR] at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:909)
[ERROR] at io.quarkus.builder.BuildContext.run(BuildContext.java:282)
[ERROR] at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
[ERROR] at java.base/java.lang.Thread.run(Thread.java:834)
[ERROR] at org.jboss.threads.JBossThread.run(JBossThread.java:501)
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
make: *** [docker-build] Error 1 |
Beta Was this translation helpful? Give feedback.
-
ah thanks @metacosm ! I have a whole bundle now. Very nice indeed. |
Beta Was this translation helpful? Give feedback.
The CSV generator has indeed been replaced by the bundle generator, which is also available through the QOSDK BOM: