Clone fails occasionally

liam.kennedy's Avatar

liam.kennedy

11 May, 2017 12:47 PM

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

  1. 1 Posted by liam.kennedy on 11 May, 2017 01:06 PM

    liam.kennedy's Avatar

    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. Support Staff 2 Posted by Ilya Finkelshte... on 11 May, 2017 04:52 PM

    Ilya Finkelshteyn's Avatar

    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 .cmd or .bat file and run with appveyor-retry as custom clone script (clone_script in YAML). Command might look like this:

      - appveyor-retry myClone.cmd
    
    If you prefer to restart new build, then it is easier for you to use $lastexitcode environment variable. However I suggest to do some measures to prevent infinite look. With variable APPVEYOR_FORCED_BUILD you can detect that build started from API, so do not start new build on error if APPVEYOR_FORCED_BUILD is true even if $lastexitcode is 255. 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. 3 Posted by liam.kennedy on 16 May, 2017 03:26 PM

    liam.kennedy's Avatar

    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

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

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