New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LatentDockerWorker: Fail if image is not found and cannot be pulled #3572

Closed
btaidm opened this Issue Sep 1, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@btaidm
Contributor

btaidm commented Sep 1, 2017

For LatentDockerWorker, it would make sense if the build would fail if an image isn't found or can't be downloaded instead on continually retrying.

This could be used in tandem of #3071, so that is the image is not there, it tries a pull, and then if that fails, the build should fail or retry a couples times.

I have looked at the code for latent workers, and I don't really see a way to make it stop retrying.

@btaidm btaidm changed the title from LatentDockerWorker: Fail if image is not found or cannot be pulled to LatentDockerWorker: Fail if image is not found and cannot be pulled Sep 1, 2017

@tardyp

This comment has been minimized.

Show comment
Hide comment
@tardyp

tardyp Sep 5, 2017

Member

I did not realize #3578 did not fix this.

I think we can do this by adding a special case here:

https://github.com/buildbot/buildbot/blob/master/master/buildbot/process/build.py#L322

        if ready_or_failure is not True:
            yield self.buildPreparationFailure(ready_or_failure, "worker_prepare")
            if self.stopped:
                self.buildFinished(["worker", "cancelled"], self.results)
+           elif ready_or_failure.check([interfaces.LatentWorkerCannotToSubstantiate]):
+                self.buildFinished(["worker", "cannot", "substanciate"], RETRY)
            else:
                self.buildFinished(["worker", "not", "available"], RETRY)
            return

We would add a LatentWorkerCannotToSubstantiate Exception, which would tell the core that it is not worth to retry the substantiation.

Member

tardyp commented Sep 5, 2017

I did not realize #3578 did not fix this.

I think we can do this by adding a special case here:

https://github.com/buildbot/buildbot/blob/master/master/buildbot/process/build.py#L322

        if ready_or_failure is not True:
            yield self.buildPreparationFailure(ready_or_failure, "worker_prepare")
            if self.stopped:
                self.buildFinished(["worker", "cancelled"], self.results)
+           elif ready_or_failure.check([interfaces.LatentWorkerCannotToSubstantiate]):
+                self.buildFinished(["worker", "cannot", "substanciate"], RETRY)
            else:
                self.buildFinished(["worker", "not", "available"], RETRY)
            return

We would add a LatentWorkerCannotToSubstantiate Exception, which would tell the core that it is not worth to retry the substantiation.

@btaidm

This comment has been minimized.

Show comment
Hide comment
@btaidm

btaidm Sep 5, 2017

Contributor

I could do that. Not sure on how I would do the unit tests.

Brainstorming here:
Would the worker tell the build process that it should give up, or should that be inherent to the
build process itself?

Contributor

btaidm commented Sep 5, 2017

I could do that. Not sure on how I would do the unit tests.

Brainstorming here:
Would the worker tell the build process that it should give up, or should that be inherent to the
build process itself?

@btaidm btaidm referenced this issue Sep 6, 2017

Merged

Latent Worker Stops when it cannot Substantiate #3587

2 of 2 tasks complete

@tardyp tardyp closed this in #3587 Sep 26, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment