Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kie-issues#2659: [SonataFlow] Migrate DBMigration Image from SonataFlow operator repository to kie-tools #2697
base: main
Are you sure you want to change the base?
kie-issues#2659: [SonataFlow] Migrate DBMigration Image from SonataFlow operator repository to kie-tools #2697
Changes from all commits
911dc62
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have built the image locally and executed the migration, it worked well 💪 :
see: https://gist.github.com/wmedvede/549ecb613e2c27d09f4978624c43253b
The only weird thing is that in the logs I can see this:
2024-12-17 17:24:01,255 WARN [io.qua.run.con.ConfigRecorder] (main) Build time property cannot be changed at runtime:
2024-12-17 17:24:01,476 INFO [io.quarkus] (main) sonataflow-db-migrator on JVM (powered by Quarkus 3.8.6) started in 0.443s.
The quarkus.platform.version should never have been 999-SNAPSHOT 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This indicates some issue with the env you may have used. May be some old image is lingering there. The latest logs can be found here and it nowhere refers to
999-SNAPSHOT
.https://gist.github.com/rhkp/bbee2c6654068ad7009cff1319280312
I built the image using:
pnpm --stream=true -F kogito-db-migrator-tool-image... build:prod
And executed with (please change params based on your needs)
docker run --network=host --env MIGRATE_DB_DATAINDEX=true --env QUARKUS_DATASOURCE_DATAINDEX_JDBC_URL=jdbc:postgresql://127.0.0.1:5432/di --env QUARKUS_DATASOURCE_DATAINDEX_USERNAME=postgres --env QUARKUS_DATASOURCE_DATAINDEX_PASSWORD=postgres --env QUARKUS_FLYWAY_DATAINDEX_SCHEMAS=di --env MIGRATE_DB_JOBSSERVICE=true --env QUARKUS_DATASOURCE_JOBSSERVICE_JDBC_URL=jdbc:postgresql://127.0.0.1:5432/js --env QUARKUS_DATASOURCE_JOBSSERVICE_USERNAME=postgres --env QUARKUS_DATASOURCE_JOBSSERVICE_PASSWORD=postgres --env QUARKUS_FLYWAY_JOBSSERVICE_SCHEMAS=js docker.io/apache/incubator-kie-kogito-db-migrator-tool:main
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took the latest commits
I have deleted previous image
I have re-build this image
I can still see:
2024-12-18 11:39:32,878 WARN [io.qua.run.con.ConfigRecorder] (main) Build time property cannot be changed at runtime:
https://gist.github.com/wmedvede/aff0a7afa3ed948bce894fdc6e9f5854
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what I found, when building the DB Migrator Image:
if the
QUARKUS_PLATFORM_VERSION
env var in terminal is not set, the 999-SNAPSHOT version appears.However when the
QUARKUS_PLATFORM_VERSION
env var in terminal is set when the image is built with a value such as3.8.6
this does not appear.However not sure where and why the
999-SNAPSHOT
version is being specifically picked up, as the DB migrator tool and/or image do not specifically use these versions.A quick search of this string in sources shows
999-SNAPSHOT
is not used in the tool e.g.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @wmedvede and @ricardozanini,
I spent more time on this one.
EXECUTE DB MIGRATOR JAVA JAR IN TERMINAL(WITHOUT IMAGE I MEAN)
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.[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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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:
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?