I have auto_cancellation enabled, and if I add an empty commit and push, when older commit fails to build
You can see it here:
https://cirrus-ci.com/github/eksperimental/elixir/v3.0
to work
HEAD is at af7f811e402304f5d5ff0af26c7fd929cbb6b2d6.
Hard resetting to 76bc7d41105b853f9eff94ad09aa9af763421ab5...
Failed to force reset to 76bc7d41105b853f9eff94ad09aa9af763421ab5: object not found!
it happened here with a commit that wasn't empty
https://cirrus-ci.com/task/5095508086882304
Task you referring too failed to clone (probably because you force pushed over?) and as far as I can see the auto cancelation worked as expected: you pushed to v3.0 "branch" which has auto cancelation disabled and Cirrus did not cancel previous build as expected.
I don't remember doing that, but even if I did, the commit ids were not changed. Anyway, just to be on the safe side, I reproduced it here, the tasks were delayed, and you can see they failed.
https://cirrus-ci.com/github/eksperimental/elixir/v6.0
I think the issue is that you set CIRRUS_CLONE_DEPTH to 1 and therefore when Cirrus agent clones the branch it only has the last commit and cannot reset to the previous one. I'd recommend to set CIRRUS_CLONE_DEPTH to something bigger.
resource wise, how much the removal of this setting affects your side?
I don't think removing it completely will make sense since Cirrus will need to receive all 16k commits Elixir repository and then the clone times will be longer for you. But also having it only clone a single commit seems like an over optimization. Travis, for example always clones 50 latest commits (equal to setting CIRRUS_CLONE_DEPTH to 50).
I've just checked and cloning 50 and 1 commit is about a second for for the full clone it will be around 9 seconds: https://cirrus-ci.com/build/6695765623177216
50 sounds like a good compromise,
I will submit two new commits and see if it works, and close the issue if it does
@fkorotkov yes it worked, Thank you so much
https://cirrus-ci.com/github/eksperimental/elixir/v6.0