Skip to content
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

travis_retry for dev-tools install #4550

Open
wants to merge 1 commit into
base: 2.15
from

Conversation

@ktomk
Copy link
Contributor

commented Sep 9, 2019

in Travis seeing errors like:

gpg: keyserver timed out
gpg: keyserver receive failed: keyserver error
The command "./dev-tools/install.sh" failed and exited with 2 during .

which is doing GPG verification of the downloaded Phive utility and then
failing due to network failures w/ GPG key-servers.

a work-around is to retry done by travis_retry (retries 3 times by default
on failure).

this is also true for other network operations during dev-tools install.

as the install.sh script only installs by testing for files if already
installed the installation of each utility forms a transaction of its own.

to establish transaction behavior for the Phive installation, files are
now re-downloaded (unless Phive was already installed) and only after
successful GPG verification the Phive utility is installed as bin/phive.

for better verification of each utility installation per potential retry,
the installation check is done always (most often by invoking each utility
and displaying the version information). previously this was not necessary
as the script was not expected to be called over and over again.

change for all wget operations having the --no-clobber argument while
using the --output-document with a pathname to a regular file are not safe
any longer as wget exits w/ non-zero status when the file already exists.
therefore wget writes the file to stdout that is redirected to the target
file to make the operation fail-safe in context of an unattended build
that re-tries on failure.

utilities are now tested for being executable as only testing for being a
file as done previously is not enough as installation requires modifying
the execution bit.

additionally a minor improvement in extracting the single shellcheck file
from the tar archive by directly extracting the file removing the
management of the temporary directory that previously was an intermediate
temporary result of tar-file extraction.

these changes should also benefit calling the script again in interactive
use (e.g. $ ./install.sh).

@ktomk

This comment has been minimized.

Copy link
Contributor Author

commented Sep 13, 2019

Just a bit more context here. When filing #4517 I experienced Travis build errors on the new 2.15 base branch (was previously filing against 2.12 w/o this problem).

This is what fixed the build problems for me. After a short exchange on gitter w/ @keradus I extracted the fix and made it a PR of it's own.

@ktomk ktomk force-pushed the ktomk:2.15-devtools-travis-retry branch 2 times, most recently from a485645 to 28200a4 Sep 13, 2019

travis_retry for dev-tools install
in Travis seeing errors like:

	gpg: keyserver timed out
	gpg: keyserver receive failed: keyserver error
	The command "./dev-tools/install.sh" failed and exited with 2 during .

which is doing GPG verification of the downloaded Phive utility and then
failing due to network failures w/ GPG key-servers.

a work-around is to retry done by travis_retry (retries 3 times by default
on failure).

this is also true for other network operations during dev-tools install.

as the install.sh script only installs by testing for files if already
installed the installation of each utility forms a transaction of its own.

to establish transaction behavior for the Phive installation, files are
now re-downloaded (unless Phive was already installed) and only after
successful GPG verification the Phive utility is installed as bin/phive.

for better verification of each utility installation per potential retry,
the installation check is done always (most often by invoking each utility
and displaying the version information). previously this was not necessary
as the script was not expected to be called over and over again.

change for all wget operations having the --no-clobber argument while
using the --output-document with a pathname to a regular file are not safe
any longer as wget exits w/ non-zero status when the file already exists.
therefore wget writes the file to stdout that is redirected to the target
file to make the operation fail-safe in context of an unattended build
that re-tries on failure.

utilities are now tested for being executable as only testing for being a
file as done previously is not enough as installation requires modifying
the execution bit.

additionally a minor improvement in extracting the single shellcheck file
from the tar archive by directly extracting the file removing the
management of the temporary directory that previously was an intermediate
temporary result of tar-file extraction.

these changes should also benefit calling the script again in interactive
use (e.g. $ ./install.sh).

@ktomk ktomk force-pushed the ktomk:2.15-devtools-travis-retry branch from 28200a4 to 4122d06 Sep 13, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.