You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@polaris.apache.org by "MonkeyCanCode (via GitHub)" <gi...@apache.org> on 2025/02/17 06:08:58 UTC

[PR] Fix inconsistent image build issue [polaris]

MonkeyCanCode opened a new pull request, #1010:
URL: https://github.com/apache/polaris/pull/1010

   This PR fixed inconsistent image build issue after a successful build is made already. It contains two changes:
   1. add `clean` to the build command
   2. disable gradle build cache when building image
   
   Here are the test:
   
   # Happy path (first time building)
   ```
   ➜  polaris git:(main) docker images
   REPOSITORY   TAG       IMAGE ID   CREATED   SIZE
   ➜  polaris git:(main) ./gradlew :polaris-quarkus-server:assemble :polaris-quarkus-admin:assemble \
       -Dquarkus.container-image.build=true \
       -PeclipseLinkDeps=org.postgresql:postgresql:42.7.4 \
   ...
   BUILD SUCCESSFUL in 38s
   115 actionable tasks: 98 executed, 17 up-to-date
   ➜  polaris git:(main) docker images
   REPOSITORY                  TAG                         IMAGE ID       CREATED          SIZE
   apache/polaris-admin-tool   1.0.0-incubating-SNAPSHOT   4162495a3d93   29 seconds ago   535MB
   apache/polaris-admin-tool   latest                      4162495a3d93   29 seconds ago   535MB
   apache/polaris              1.0.0-incubating-SNAPSHOT   1d48a4908017   29 seconds ago   633MB
   apache/polaris              latest                      1d48a4908017   29 seconds ago   633MB
   ```
   
   # Un-happy paths
   ## users removed the images then reran the same command to get images back
   ```
   ➜  polaris git:(main) ./gradlew :polaris-quarkus-server:assemble :polaris-quarkus-admin:assemble \
       -Dquarkus.container-image.build=true \
       -PeclipseLinkDeps=org.postgresql:postgresql:42.7.4
   ...
   BUILD SUCCESSFUL in 2s
   96 actionable tasks: 96 up-to-date
   ➜  polaris git:(main) docker images
   REPOSITORY   TAG       IMAGE ID   CREATED   SIZE
   ```
   
   ## users removed the images then reran the same command to get images back with clean option
   ```
   ➜  polaris git:(main) ./gradlew clean :polaris-quarkus-server:assemble :polaris-quarkus-admin:assemble \
       -Dquarkus.container-image.build=true \
       -PeclipseLinkDeps=org.postgresql:postgresql:42.7.4
   ...
   BUILD SUCCESSFUL in 13s
   115 actionable tasks: 72 executed, 26 from cache, 17 up-to-date
   ➜  polaris git:(main) docker images
   REPOSITORY   TAG       IMAGE ID   CREATED   SIZE
   ➜  polaris git:(main)
   ```
   
   ## users removed the images then reran the same command to get images back with no-cache option
   ```
   ➜  polaris git:(main) ./gradlew :polaris-quarkus-server:assemble :polaris-quarkus-admin:assemble \
       -Dquarkus.container-image.build=true \
       -PeclipseLinkDeps=org.postgresql:postgresql:42.7.4 \
       --no-build-cache
   ...
   BUILD SUCCESSFUL in 2s
   96 actionable tasks: 96 up-to-date
   ➜  polaris git:(main) docker images
   REPOSITORY   TAG       IMAGE ID   CREATED   SIZE
   ```
   
   # With the purposed change:
   ```
   ➜  polaris git:(main) ./gradlew clean :polaris-quarkus-server:assemble :polaris-quarkus-admin:assemble \
       -Dquarkus.container-image.build=true \
       -PeclipseLinkDeps=org.postgresql:postgresql:42.7.4 \
       --no-build-cache
   ...
   BUILD SUCCESSFUL in 32s
   115 actionable tasks: 98 executed, 17 up-to-date
   ➜  polaris git:(main) docker images
   REPOSITORY                  TAG                         IMAGE ID       CREATED          SIZE
   apache/polaris-admin-tool   1.0.0-incubating-SNAPSHOT   e771063a0c2b   10 seconds ago   535MB
   apache/polaris-admin-tool   latest                      e771063a0c2b   10 seconds ago   535MB
   apache/polaris              1.0.0-incubating-SNAPSHOT   78de7f511dcd   16 seconds ago   633MB
   apache/polaris              latest                      78de7f511dcd   16 seconds ago   633MB
   ```
   


-- 
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: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix inconsistent image build issue [polaris]

Posted by "MonkeyCanCode (via GitHub)" <gi...@apache.org>.
MonkeyCanCode merged PR #1010:
URL: https://github.com/apache/polaris/pull/1010


-- 
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: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix inconsistent image build issue [polaris]

Posted by "MonkeyCanCode (via GitHub)" <gi...@apache.org>.
MonkeyCanCode commented on PR #1010:
URL: https://github.com/apache/polaris/pull/1010#issuecomment-2663364741

   > The changes look good to me, but it would be good to change also the following places:
   > 
   > ```
   > regtests/README.md
   > quarkus/server/README.md
   > 
   > site/content/in-dev/unreleased/metastores.md
   > site/content/in-dev/unreleased/quickstart.md
   > 
   > getting-started/eclipselink/README.md
   > getting-started/spark/README.md
   > getting-started/telemetry/README.md
   > getting-started/trino/README.md
   > ```
   
   Good catch. Will do it today. 


-- 
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: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix inconsistent image build issue [polaris]

Posted by "adutra (via GitHub)" <gi...@apache.org>.
adutra commented on PR #1010:
URL: https://github.com/apache/polaris/pull/1010#issuecomment-2662621661

   The changes look good to me, but it would be good to change also the following places:
   
   ```
   regtests/README.md
   quarkus/server/README.md
   
   site/content/in-dev/unreleased/metastores.md
   site/content/in-dev/unreleased/quickstart.md
   
   getting-started/eclipselink/README.md
   getting-started/spark/README.md
   getting-started/telemetry/README.md
   getting-started/trino/README.md
   ```


-- 
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: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix inconsistent image build issue [polaris]

Posted by "MonkeyCanCode (via GitHub)" <gi...@apache.org>.
MonkeyCanCode commented on PR #1010:
URL: https://github.com/apache/polaris/pull/1010#issuecomment-2663825454

   > > The changes look good to me, but it would be good to change also the following places:
   > > ```
   > > regtests/README.md
   > > quarkus/server/README.md
   > > 
   > > site/content/in-dev/unreleased/metastores.md
   > > site/content/in-dev/unreleased/quickstart.md
   > > 
   > > getting-started/eclipselink/README.md
   > > getting-started/spark/README.md
   > > getting-started/telemetry/README.md
   > > getting-started/trino/README.md
   > > ```
   > 
   > Good catch. Will do it today.
   
   @adutra found couple more places with a quick grep commands. All of the image build commands should have this fix now (except github action as it is stateless)


-- 
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: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org