Fokko commented on code in PR #11705:
URL: https://github.com/apache/iceberg/pull/11705#discussion_r1873897394


##########
docker/iceberg-rest-fixture/Dockerfile:
##########
@@ -36,6 +39,10 @@ ENV CATALOG_JDBC_USER=user
 ENV CATALOG_JDBC_PASSWORD=password
 ENV REST_PORT=8181
 
+# Healthcheck for the iceberg rest service
+HEALTHCHECK --start-period=30s --retries=3 \
+  CMD curl --fail http://localhost:$REST_PORT || exit 1

Review Comment:
   I know that the JVM has a bit of a slow start, but 30 seconds seems a bit 
excessive for me. I would just start probing right away, and do this every 
second, for up to 10 seconds.
   ```suggestion
   HEALTHCHECK --retries=10 --interval=1s \
     CMD curl --fail http://localhost:$REST_PORT/v1/config || exit 1
   ```
   
   Reference: https://docs.docker.com/reference/dockerfile/#healthcheck
   
   Checked this locally:
   ```
   ➜  iceberg-python git:(fd-use-load-catalog) curl --fail 
http://localhost:8181      
   curl: (22) The requested URL returned error: 400
   ➜  iceberg-python git:(fd-use-load-catalog) curl --fail 
http://localhost:8181/v1/config
   {"defaults":{},"overrides":{}}%                 
   ```



-- 
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-unsubscr...@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to