Skip to content

Re-try Minisat download (up to two times) in case it fails #3139

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
merged 1 commit into from
Oct 12, 2018

Conversation

tautschnig
Copy link
Collaborator

Running in CI we do see transient network access errors from time to time, which
should not result in task failures (as long as they are genuinely transient).

  • Each commit message has a non-empty body, explaining why the change was made.
  • n/a My contribution is formatted in line with CODING_STANDARD.md.
  • n/a Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • n/a My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • n/a White-space or formatting changes outside the feature-related changed lines are in commits of their own.

Copy link
Collaborator

@martin-cs martin-cs left a comment

Choose a reason for hiding this comment

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

It's a fudge but ... I can see why it's useful.

src/Makefile Outdated
@@ -89,7 +89,12 @@ TAR = tar

minisat2-download:
@echo "Downloading Minisat 2.2.1"
@$(DOWNLOADER) http://ftp.debian.org/debian/pool/main/m/minisat2/minisat2_2.2.1.orig.tar.gz
@for i in `seq 1 3` ; do \
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick: prefer $(cmd) to backticks

Copy link
Contributor

@chrisr-diffblue chrisr-diffblue left a comment

Choose a reason for hiding this comment

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

I can see the desire to have this, but I have the feeling it's possibly implemented in the wrong place... Would this actually be better done in the .travis.yml, etc? As it stands this also does nothing for CMake based builds, but I appreciate that they handle the minisat download in a different way which is probably more annoying to fix up.

Copy link
Contributor

@allredj allredj left a comment

Choose a reason for hiding this comment

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

Passed Diffblue compatibility checks (cbmc commit: f03a2ca).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/87498958

Copy link
Member

@peterschrammel peterschrammel left a comment

Choose a reason for hiding this comment

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

I agree with @chrisr-diffblue that this should be done in .travis.yml. travis_retry cmd is probably the way to do it: https://docs.travis-ci.com/user/common-build-problems/#timeouts-installing-dependencies

@tautschnig
Copy link
Collaborator Author

My reason for not putting it in the Travis config file was to avoid duplication: the very same code would also go in the CodeBuild specs for both Linux and Windows and (at least in my use case) a number of build rules living outside the repository. All of which currently invoke make minisat2-download, so I figured I'd just put it right in the Makefile. Hence, unless I hear further objections, I'd plan to implement @smowton's suggestions but otherwise leave it in the Makefile. I am, however, happy to replicate this for CMake as well.

Running in CI we do see transient network access errors from time to time, which
should not result in task failures (as long as they are genuinely transient).

For CMake we could do the same once upgrading to >= 3.7 (else it would be very
clumsy to implement).
Copy link
Contributor

@allredj allredj left a comment

Choose a reason for hiding this comment

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

This PR failed Diffblue compatibility checks (cbmc commit: b223bfe).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/87819761
Status will be re-evaluated on next push.
Please contact @peterschrammel, @thk123, or @allredj for support.

Common spurious failures:

  • the cbmc commit has disappeared in the mean time (e.g. in a force-push)
  • the author is not in the list of contributors (e.g. first-time contributors).

The incompatibility may have been introduced by an earlier PR. In that case merging this
PR should be avoided unless it fixes the current incompatibility.

Copy link
Contributor

@allredj allredj left a comment

Choose a reason for hiding this comment

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

Passed Diffblue compatibility checks (cbmc commit: cc4347d).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/87820352

@tautschnig tautschnig merged commit 163bc94 into diffblue:develop Oct 12, 2018
@tautschnig tautschnig deleted the retry-minisat branch October 12, 2018 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants