Skip to content

Conversation

@obastemur
Copy link
Collaborator

We have tooling build failures on xplat, due to issues with clang source files network. This PR implements retry like tooling around clang source downloader

@obastemur obastemur requested a review from MSLaguana January 9, 2018 19:24
DOWNLOAD_HELPER() {
WGET_CTR=1
while [ 1 ]; do
wget --no-dns-cache --tries=3 --retry-connrefused --waitretry=3 $1 >/dev/null 2>&1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason you have omitted --quiet?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because it's not used.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I would imagine that we either use wget --quiet or wget > /dev/null 2>&1, we have just opted for the latter here?

tar -xf "llvm-${LLVM_VERSION}.src.tar.xz"
DOWNLOAD_HELPER "http://llvm.org/releases/${LLVM_VERSION}/llvm-${LLVM_VERSION}.src.tar.xz"

tar xf "llvm-${LLVM_VERSION}.src.tar.xz"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why go from -xf to just xf?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no particular reason

exit 1
fi
WGET_CTR=$($WGET_CTR + 1)
echo "${WGET_CTR}. try...."
Copy link
Contributor

@jackhorton jackhorton Jan 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: "wget $1 failed (attempt $WGET_CTR). Retrying..." ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

currently it prints 3. try... well, it must have failed right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++ we are not interested for whatever reason the download was failed. (as long as it works eventually)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, but I would argue theres no reason to not have a more descriptive sentence here if it helps future trouble shooting or general developer experience.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be. IMHO the output from WGET is more useful than anything we might say here.

FWIW, after this PR, this tool will exit with the right exit code in case one of the packages above wasn't downloaded properly. Package creator will recognize the issue now.

We have tooling build failures on xplat, due to issues with clang source files network. This PR implements retry like tooling around clang source downloading
@obastemur
Copy link
Collaborator Author

@MSLaguana @jackhorton anything that you feel strong or good to go?

@jackhorton
Copy link
Contributor

:shipit:

@chakrabot chakrabot merged commit 01c23fe into chakra-core:release/1.7 Jan 12, 2018
chakrabot pushed a commit that referenced this pull request Jan 12, 2018
Merge pull request #4518 from obastemur:down_fix

We have tooling build failures on xplat, due to issues with clang source files network. This PR implements retry like tooling around clang source downloader
chakrabot pushed a commit that referenced this pull request Jan 12, 2018
Merge pull request #4518 from obastemur:down_fix

We have tooling build failures on xplat, due to issues with clang source files network. This PR implements retry like tooling around clang source downloader
chakrabot pushed a commit that referenced this pull request Jan 12, 2018
…twork

Merge pull request #4518 from obastemur:down_fix

We have tooling build failures on xplat, due to issues with clang source files network. This PR implements retry like tooling around clang source downloader
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants