wmedvede commented on code in PR #2697:
URL: 
https://github.com/apache/incubator-kie-tools/pull/2697#discussion_r1893871189


##########
packages/kogito-db-migrator-tool-image/README.md:
##########
@@ -0,0 +1,116 @@
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+     http://www.apache.org/licenses/LICENSE-2.0
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.
+-->
+
+# Kogito Postgres DB Migrator Tool Image
+
+This package contains the `Containerfile/Dockerfile` and scripts to build a 
container image for Kogito Postgres DB Migrator Tool. Details about the Kogito 
Postgres DB Migrator Tool can be found 
[here](../kogito-db-migrator-tool/README.md).
+
+## Additional requirements
+
+- docker
+
+## Build
+
+_NOTE_: Before performing this step, be sure that the Kogito Postgres DB 
Migrator Tool jar has been built and available for inclusion in the image.
+
+- Enable the image to be built:
+
+  ```bash
+  export KIE_TOOLS_BUILD__buildContainerImages=true
+  ```
+
+Run the following in the root folder of the repository to build the package:
+
+```bash
+pnpm -F @kie-tools/kogito-db-migrator-tool-image... build:prod
+```
+
+- Then check if the image is correctly stored:
+
+  ```bash
+  docker images
+  ```
+
+## Run
+
+- Start up a clean container with:
+
+  ```bash
+    docker run 
docker.io/apache/incubator-kie-kogito-service-db-migration-postgresql:latest

Review Comment:
   > Hi @wmedvede and @ricardozanini, I spent more time on this one.
   > 
   > **EXECUTE DB MIGRATOR JAVA JAR IN TERMINAL(WITHOUT IMAGE I MEAN)**
   > 
   > * The execution of the DB migrator with `java -jar 
target/quarkus-app/quarkus-run.jar` gives identical results whether the export 
QUARKUS_PLATFORM_VERSION=3.8.6 variable is set or not.
   > * Meaning in any of the situation above I am not seeing 999-SNAPSHOTS log.
   > * Please note the WARN message for 999-SNAPSHOT comes from 
`[io.qua.run.con.ConfigRecorder]` package, when we are using image and I do not 
at all see this package in the logs in these scenarios.
   > 
   > **COMPARE DB MIGRATOR IMAGE build FOLDERS**
   > 
   > * I compared TWO directories one built with env vars set and another 
without setting one.
   > * The files are identical in this case too.
   > * And not sure where the 999-SNAPSHOT appears from in the logs when the 
image is built without setting export QUARKUS_PLATFORM_VERSION=3.8.6.
   
   I have built again locally and executed both scenarios:
   
   **java -jar target/quarkus-app/quarkus-run.jar:** 
   
   **Produce NO Warnings:**
   
   see full execution log here: 
https://gist.github.com/wmedvede/b3631a99b041bd66afdda5e9cb3120b1
   
    --/ __ \/ / / / _ | / _ \/ //_/ / / / __/ 
    -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \   
   --\___\_\____/_/ |_/_/|_/_/|_|\____/___/   
   2024-12-20 13:03:31,609 INFO  [io.quarkus] (main) kogito-db-migrator-tool 
0.0.0 on JVM (powered by Quarkus 3.8.6) started in 0.469s. 
   2024-12-20 13:03:31,615 INFO  [io.quarkus] (main) Profile prod activated. 
   2024-12-20 13:03:31,615 INFO  [io.quarkus] (main) Installed features: 
[agroal, cdi, flyway, jdbc-postgresql, narayana-jta, 
smallrye-context-propagation]
   2024-12-20 13:03:31,626 INFO  [org.kie.kog.pos.mig.DBConnectionChecker] 
(main) Checking DB connection: jdbc:postgresql://localhost:5432/data-index - 
success
   
   
   **Image execution:**  **docker run  
docker.io/apache/incubator-kie-kogito-db-migrator-tool:main bla bla**
   
   **Produce warnings**
   
   see full execution log here: 
https://gist.github.com/wmedvede/f7ad4a7ca9df7201438ab053b96dd38b
   
   __  ____  __  _____   ___  __ ____  ______ 
    --/ __ \/ / / / _ | / _ \/ //_/ / / / __/ 
    -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \   
   --\___\_\____/_/ |_/_/|_/_/|_|\____/___/   
   2024-12-20 12:07:29,367 WARN  [io.qua.run.con.ConfigRecorder] (main) Build 
time property cannot be changed at runtime:
    - **quarkus.platform.version is set to '3.8.6' but it is build time fixed 
to '999-SNAPSHOT'. Did you change the property quarkus.platform.version after 
building the application?**
   2024-12-20 12:07:29,599 INFO  [io.quarkus] (main) kogito-db-migrator-tool 
0.0.0 on JVM (powered by Quarkus 3.8.6) started in 0.476s. 
   
   
   
   @rhkp @ricardozanini I conclude that the issue is introduced during the 
image build process, while the quarkus-run.jar is fine. Apart of doing the 
review, I have spent some time trying to see where issue comes from, but 
couldn't find.
   
   Maybe someone else with fresh eyes can take a look and identify, I think it 
should be a silly nitpick.
   
   @rgdoliveira @domhanak or maybe @fantonangeli , would you mind guys take 
look?
    
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to