forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix 2 common Travis failures which happen when Travis has network issues #3003
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
Merged
Conversation
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
f7e575e to
670752c
Compare
This allows us to use travis_retry on these operations.
This avoids future confusion as we don't rely on curl anymore to properly retry downloads. curls does only retry on transient errors, while Travis might cause all kinds of errors which circumvent the retry logic of curl.
3324cfe to
41f46f5
Compare
Author
|
Luckily the currently running build now demonstrates the first fix: https://travis-ci.org/dashpay/dash/jobs/550641601#L647 |
UdjinM6
approved these changes
Jun 26, 2019
UdjinM6
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
codablock
added a commit
to codablock/dash
that referenced
this pull request
Jul 2, 2019
…ues (dashpay#3003) * Retry downloading of depends sources 3 times * Manually invoke apt-get update and install instead of using addon This allows us to use travis_retry on these operations. * Add exception for depends/Makefile in .gitignore * Remove --retry from curl call This avoids future confusion as we don't rely on curl anymore to properly retry downloads. curls does only retry on transient errors, while Travis might cause all kinds of errors which circumvent the retry logic of curl.
5 tasks
PastaPastaPasta
added a commit
that referenced
this pull request
Jul 19, 2024
bbc9957 fix: sidestep c++17 std::unary_function removal by compiling boost with c++11 (Kittywhiskers Van Gogh) 3c622a3 revert: partial dash#5610 (make depends compilable with Xcode 15 on macos) (Kittywhiskers Van Gogh) f15e1db fix: make `std::unary_function` suppression flag no longer contingent on `--enable-suppress-external-warnings` (Kittywhiskers Van Gogh) 5db84e2 revert: partial dash#3003 (Fix 2 common Travis failures which happen when Travis has network issues) (Kittywhiskers Van Gogh) Pull request description: ## Additional Information Despite builders for BSD-based platforms being backported as early as [dash#5362](#5362), they didn't work on account of using a `curl` flag, `--retry`, that was lopped off other builders in [dash#3003](#3003) as a way to mitigate aberrant Travis CI-specific behaviour. As the variable `$(DOWNLOAD_RETRIES)` was removed as part of that mitigation, the introduction of builders that rely on this variable caused failures as the flag was accompanied by nothing. As our CI host isn't based on FreeBSD, this went unnoticed. When deciding between extending the existing patch and reverting it, reverting it proved to be more attractive on account of us no longer using Travis CI and the revert bringing us closer to upstream. Additionally, the `std::unary_function` patch that was introduced in [dash#5610](#5610) proves to be necessary on BSD-based platforms as well (had to be extended for and tested on GhostBSD, based on FreeBSD 13.2-STABLE, Clang 16). Instead of conditionally patching based on platform and compiler, a more reliable patch would be to downgrade the C++ version used to build Boost at the last version to have `std::unary_function`, which would be C++11, albeit deprecated ([source](https://en.cppreference.com/w/cpp/utility/functional/unary_function)). Though it's likely this route wasn't taken originally due to compiler errors that happened despite downgrading to C++11. These errors were due to the compiler objecting to `std::unary_function` usage in Boost headers, despite the backport of [bitcoin#25436](bitcoin#25436), which should've solved this problem. The reason the errors were still persisting is because the necessary flag, `-DBOOST_NO_CXX98_FUNCTION_BASE`, was only applied if `--enable-suppress-external-warnings` was set. CI didn't catch this, as the flag is always set, to keep log lengths manageable. This has been rectified. All changes combined, one should be able to build non-Qt Dash binaries using `depends` though building the Qt client from `depends` unfortunately remains a problem, even upstream ([source](bitcoin#23955 (comment)), [source](bitcoin#23948 (comment))). ## Demo **Based on bbc9957** Built using: * **`depends` flags:** `NO_QT=1 ALLOW_HOST_PACKAGES=1 HOST=x86_64-unknown-freebsd13.2` * **`configure` flags :** `--prefix=$(pwd)/depends/x86_64-unknown-freebsd13.2 --enable-debug --enable-suppress-external-warnings --with-gui` * Qt installed using `pkg` (`qt5`)  ## Checklist: - [x] I have performed a self-review of my own code **(note: N/A)** - [x] I have commented my code, particularly in hard-to-understand areas **(note: N/A)** - [x] I have added or updated relevant unit/integration/functional/e2e tests **(note: N/A)** - [x] I have made corresponding changes to the documentation **(note: N/A)** - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: UdjinM6: light ACK bbc9957 PastaPastaPasta: utACK bbc9957 knst: ACK bbc9957 Tree-SHA512: b29d6775f42965d2f09307aff0192012aa192e39e06a83b800613831dc00fc7173201d496117fbe86850f5208a0b7688a376f2ee618881c062c28d694085efc9
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.
First fix is to retry downloading of depends sources when a non-transient error happens. This should fix build failures like https://travis-ci.org/dashpay/dash/jobs/550612633
The second fix is to retry
apt-get updateandapt-get installby calling them manually withtravis_retryinstead of relying on the apt addon (which does not do retries). This should fix build failures like https://travis-ci.org/dashpay/dash/jobs/550205215