git-resource icon indicating copy to clipboard operation
git-resource copied to clipboard

Ability to specify maximum number of retries?

Open EduardoAC opened this issue 6 years ago • 2 comments

Recently, I have this problem during rebase that it's causing an infinite loop

Is there a way to specify a "max retry" count? Or some other way to have the job fail after a certain amount of time?

Screenshot 2019-07-11 at 10 15 45

Thank you for your time, I appreciate it.

EduardoAC avatar Jul 11 '19 10:07 EduardoAC

Experiencing the same issue

Identity added: /tmp/git-resource-private-key (/tmp/git-resource-private-key)
rebasing...
From github.com:cloudfoundry/bosh-deployment
 * branch            develop    -> FETCH_HEAD
 * [new branch]      develop    -> push-target/develop
Already up to date.
Successfully rebased and updated refs/heads/develop.
Updated tag '270.5.0' (was 942d6dc)
To github.com:cloudfoundry/bosh-deployment
 ! [rejected]        270.5.0 -> 270.5.0 (already exists)
error: failed to push some refs to '[email protected]:cloudfoundry/bosh-deployment'
hint: Updates were rejected because the tag already exists in the remote.
rebasing and trying again...
rebasing...
From github.com:cloudfoundry/bosh-deployment
 * branch            develop    -> FETCH_HEAD
Already up to date.
Successfully rebased and updated refs/heads/develop.
To github.com:cloudfoundry/bosh-deployment
 ! [rejected]        270.5.0 -> 270.5.0 (already exists)
error: failed to push some refs to '[email protected]:cloudfoundry/bosh-deployment'
hint: Updates were rejected because the tag already exists in the remote.
rebasing and trying again...
rebasing...
From github.com:cloudfoundry/bosh-deployment
 * branch            develop    -> FETCH_HEAD
Already up to date.
Successfully rebased and updated refs/heads/develop.
To github.com:cloudfoundry/bosh-deployment
 ! [rejected]        270.5.0 -> 270.5.0 (already exists)
error: failed to push some refs to '[email protected]:cloudfoundry/bosh-deployment'
hint: Updates were rejected because the tag already exists in the remote.
rebasing and trying again...
rebasing...
From github.com:cloudfoundry/bosh-deployment
 * branch            develop    -> FETCH_HEAD
Already up to date.
Successfully rebased and updated refs/heads/develop.
To github.com:cloudfoundry/bosh-deployment
 ! [rejected]        270.5.0 -> 270.5.0 (already exists)
error: failed to push some refs to '[email protected]:cloudfoundry/bosh-deployment'
hint: Updates were rejected because the tag already exists in the remote.
rebasing and trying again...

I am wary of using force in order to force the tag push.

h4xnoodle avatar Aug 26 '19 18:08 h4xnoodle

We have the same issue. It really should fail after a few retries (there should be a default max number of retries).

ukabu avatar Dec 18 '19 13:12 ukabu

After submitting a PR for this, I realized concourse already has a timeout option which will stop the step after some time. In the absence of retries I think that should do the trick.

spion avatar Jan 18 '23 12:01 spion

Workaround provided by @spion to use the timeout step modifier. Closing this issue since it's not worth fixing since timeout will get you the same behaviour, albeit slightly less robust.

taylorsilva avatar Mar 16 '24 23:03 taylorsilva

@taylorsilva It makes sense; thanks for letting me know

EduardoAC avatar Mar 17 '24 06:03 EduardoAC