4

We are using Travis-CI to test our project (Speedy Net). A test failed and I want to rebuild it. I checked this answer but it doesn't work for me. This changed recently. I'm the owner of this organization on GitHub but on Travis CI I'm not a member of any organization. On this build's page I don't have any rebuild button. What can I do to be able to rebuild this test?

Travis CI for Open Source

Uri
  • 2,992
  • 8
  • 43
  • 86
  • What is the point of rebuilding if the failure is not fixed/committed/pushed to the repo? If there was a failed test, that means that there has to be a bug in the code that is tested or a bug in the code that performs the test. If you have fixed the bug/issue, then just commit and push those changes and Travis-CI will run all tests for the new commit again. – Christos Lytras Feb 20 '20 at 12:24
  • @ChristosLytras In some cases a test can fail, but when run again it will pass. I think this is the case in this case, since the test failed only with one version of Python (3.5) and I also think it passed with the same commit on another branch. – Uri Feb 20 '20 at 17:12
  • I've had a [similar problem](https://travis-ci.org/clytras/afm-python/builds/631595682) in the past and it wasn't a TravisCI fault. Python has some differences from version to version. But I see in your case that there is a `ProtocolError: ("Connection broken: ConnectionResetError(104, 'Connection reset by peer')"` error which may be related to packages versions but it could be also related to CI server network failures for some rare cases. – Christos Lytras Feb 20 '20 at 17:21
  • @ChristosLytras In this case you can see for example here https://travis-ci.org/speedy-net/speedy-net/builds/639409564 that this test with the same commit passed. Sometimes tests fail because of random reasons but when running the test again it passes. – Uri Feb 20 '20 at 19:35

2 Answers2

1

It works now (after my login expired and I logged in again). When Travis CI login via GitHub expires, it's not possible to rebuild tests.

Uri
  • 2,992
  • 8
  • 43
  • 86
-1

It depends, if the test is triggered via a pull request then it is as simple as closing then reopening that pull request.

If you are triggering the test in another way then do that thing again, e.g. push --force-with-lease, commit --allow-empty, etc. to restart the process.

Basically if a build fails because for example, a host is unreachable temporarily in the test/build setup rather than any issue with the code, then trigger the build again in the same way you did originally.

Fraser
  • 15,275
  • 8
  • 53
  • 104
  • Rebuilding a test should not require changes in the repository (such as committing or pushing). There is no pull request related to this test. – Uri Feb 24 '20 at 06:08
  • That depends on how the build is triggered. If the test is set up to run via a commit/push - then performing that action *may be* (pragmatically) the only viable option even if it *should not* (intuitively, from the point of best practice) be the desired one. e.g. git commit --allow-empty – Fraser Feb 24 '20 at 10:15