Clone fails occasionally
This sometimes happens:
Build started
hg clone -r my_changeset_id my_repo_url
adding changesets
adding manifests
adding file changes
transaction abort!
rollback completed
abort: stream ended unexpectedly (got 0 bytes, expected 4)
Command exited with code 255
Is there any way to retry a build when this happens?
Liam
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
| ? | Show this help |
|---|---|
| ESC | Blurs the current field |
Comment Form
| r | Focus the comment reply box |
|---|---|
| ^ + ↩ | Submit the comment |
You can use Command ⌘ instead of Control ^ on Mac

1 Posted by liam.kennedy on 11 May, 2017 01:06 PM
Guess I could use the on_failure tag in the yml, download the build log and check for 'Command exited with code 255' and create a new build via the api. Is this the best way to do this?
2 Posted by Ilya Finkelshte... on 11 May, 2017 04:52 PM
Hi Liam,
I see couple of options for you.
You can write custom clone script (which does basically the same as AppVeyor does), wrap it into
If you prefer to restart new build, then it is easier for you to use.cmdor.batfile and run withappveyor-retryas custom clone script (clone_scriptin YAML). Command might look like this:$lastexitcodeenvironment variable. However I suggest to do some measures to prevent infinite look. With variableAPPVEYOR_FORCED_BUILDyou can detect that build started from API, so do not start new build on error ifAPPVEYOR_FORCED_BUILDistrueeven if$lastexitcodeis255. If you don't like it because you, need more attempts than 2, you can pass custom environment variable to new build with API, and use it as count.Ilya.
3 Posted by liam.kennedy on 16 May, 2017 03:26 PM
I really don't like the idea of having to write a custom clone script. Can I make a feature request for something that handles this AppVeyor side?
Liam
Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:16 AM.