Reduce occurrences of failed IT builds#17543
Merged
abhishekrb19 merged 5 commits intoapache:masterfrom Dec 6, 2024
Merged
Conversation
4 tasks
abhishekrb19
approved these changes
Dec 6, 2024
Contributor
abhishekrb19
left a comment
There was a problem hiding this comment.
Makes sense. Some of the standard ITs that were failing with the following error have not surfaced with this updated logic in at least a few CI retry runs on the PR, so this seems to be helping overall:
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
Error: Command execution failed.
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
at org.apache.commons.exec.DefaultExecutor.executeInternal (DefaultExecutor.java:404)
at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:166)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:1000)
Thanks, @GWphua!
cryptoe
reviewed
Dec 20, 2024
| 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; \ |
Contributor
There was a problem hiding this comment.
What happens to this script in case of error ?
Contributor
There was a problem hiding this 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
9 tasks
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Currently, Standard ITS integration tests fail on the command:
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: 4A brief online search shows that the exit code 4 signifies some network issues, probably due to the
wgetcommands inintegration-tests/docker/base-setup.sh. This PR aims to reduce the chances of failing due to these network issues, by rerunning the setup script.This PR has: