You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "GWphua (via GitHub)" <gi...@apache.org> on 2024/12/06 03:18:24 UTC

[PR] Fix IT build fails (druid)

GWphua opened a new pull request, #17543:
URL: https://github.com/apache/druid/pull/17543

   ### Description
   
   Currently, Standard ITS integration tests fail on the command:
   ```
   RUN APACHE_ARCHIVE_MIRROR_HOST=${APACHE_ARCHIVE_MIRROR_HOST} /root/base-setup.sh && rm -f /root/base-setup.sh
   ```
   
   We will see the following error logged when this happens:
   `ERROR: failed to solve: process "/bin/sh -c APACHE_ARCHIVE_MIRROR_HOST=${APACHE_ARCHIVE_MIRROR_HOST} /root/base-setup.sh && rm -f /root/base-setup.sh" did not complete successfully: exit code: 4`
   
   
   A [brief online search](https://forums.docker.com/t/failed-build-with-dockerfile-returned-a-non-zero-code-4/9189) shows that the exit code 4 signifies some network issues, probably due to the `wget` commands in `integration-tests/docker/base-setup.sh`. This PR aims to reduce the chances of failing due to these network issues, by rerunning the setup script.
   
   
   <hr>
   
   This PR has:
   
   - [x] been self-reviewed.
   


-- 
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: commits-unsubscribe@druid.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] Reduce occurrences of failed IT builds (druid)

Posted by "cryptoe (via GitHub)" <gi...@apache.org>.
cryptoe commented on code in PR #17543:
URL: https://github.com/apache/druid/pull/17543#discussion_r1893564095


##########
integration-tests/docker/Dockerfile:
##########
@@ -25,7 +25,17 @@ ARG KAFKA_VERSION
 # This is passed in by maven at build time to align with the client version we depend on in the pom file
 ARG ZK_VERSION
 ARG APACHE_ARCHIVE_MIRROR_HOST=https://archive.apache.org
-RUN APACHE_ARCHIVE_MIRROR_HOST=${APACHE_ARCHIVE_MIRROR_HOST} /root/base-setup.sh && rm -f /root/base-setup.sh
+ARG SETUP_RETRIES=3
+# Retry mechanism for running the setup script up to limit of 3 times.
+RUN set -e; \

Review Comment:
   What happens to this script in case of error ?



-- 
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: commits-unsubscribe@druid.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] Reduce occurrences of failed IT builds (druid)

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


-- 
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: commits-unsubscribe@druid.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] Reduce occurrences of failed IT builds (druid)

Posted by "Akshat-Jain (via GitHub)" <gi...@apache.org>.
Akshat-Jain commented on code in PR #17543:
URL: https://github.com/apache/druid/pull/17543#discussion_r1893632630


##########
integration-tests/docker/Dockerfile:
##########
@@ -25,7 +25,17 @@ ARG KAFKA_VERSION
 # This is passed in by maven at build time to align with the client version we depend on in the pom file
 ARG ZK_VERSION
 ARG APACHE_ARCHIVE_MIRROR_HOST=https://archive.apache.org
-RUN APACHE_ARCHIVE_MIRROR_HOST=${APACHE_ARCHIVE_MIRROR_HOST} /root/base-setup.sh && rm -f /root/base-setup.sh
+ARG SETUP_RETRIES=3
+# Retry mechanism for running the setup script up to limit of 3 times.
+RUN set -e; \

Review Comment:
   It continues running the test even after 3 failed attempts, instead of erroring out:
   ```
   #7 834.3 Set up script attempt 3/3 failed.
   
   
   #7 DONE 836.4s
   
   #8 [stage-1  1/21] RUN java -version
   #8 0.153 openjdk version "17.0.2" 2022-01-18
   #8 0.153 OpenJDK Runtime Environment (build 17.0.2+8-86)
   #8 0.153 OpenJDK 64-Bit Server VM (build 17.0.2+8-86, mixed mode, sharing)
   #8 DONE 0.2s
   
   #9 [stage-1  2/21] RUN echo "[mysqld]\ncharacter-set-server=utf8\ncollation-server=utf8_bin\n" >> /etc/mysql/my.cnf
   #9 DONE 0.2s
   
   #10 [stage-1  3/21] RUN find /var/lib/mysql -type f -exec touch {} ; && /etc/init.d/mysql start       && echo "CREATE USER 'druid'@'%' IDENTIFIED BY 'diurd'; GRANT ALL ON druid.* TO 'druid'@'%'; CREATE database druid DEFAULT CHARACTER SET utf8mb4;" | mysql -u root       && /etc/init.d/mysql stop
   #10 0.654 Starting MariaDB database server: mysqld.
   #10 1.699 Stopping MariaDB database server: mysqldERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
   #10 2.721 .
   #10 DONE 2.8s
   ```



-- 
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: commits-unsubscribe@druid.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org