-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
If an init container in a TaskRun fails, entire TaskRun should fail #682
Comments
Looking at this a bit more, the problem might be a bit deeper than I thought, I'm seeing the same behaviour even when it's a step that fails, i.e. the status stays at:
🤔 |
/assign |
Reproduced by the following
|
Awwwwwesome @vdemeester , can confirm that the problem I was having yesterday isn't happening anymore today!! - lastTransitionTime: "2019-03-27T18:22:02Z"
message: 'build step "build-step-build-push-base-images" exited with code 1
(image: "docker-pullable://gcr.io/kaniko-project/executor@sha256:d9fe474f80b73808dc12b54f45f5fc90f7856d9fc699d4a5e79d968a1aef1a72");
for logs run: kubectl -n default logs publish-run-pod-200eff -c build-step-build-push-base-images'
status: "False"
type: Succeeded Thanks for the fix - so fast!!!! 🏎️ |
Expected Behavior
If an init container in the
Pod
created for aTaskRun
fails, then the subsequent steps/containers will not be able to run. Therefore in this case, the entireTaskRun
should be marked as failed.Actual Behavior
If an init container fails, the
TaskRun
status makes it look like it is still executing (i.e. the status of the init containers is not taken into account when determining if theTaskRun
has failed), e.g. this is thestatus
of aTaskRun
I created where the init container that tried to checkout a GCS storage resource failed:The condition is:
Yet the init container failed:
(Note I ran into this because I tried to run our release Task and ran into #646)
Steps to Reproduce the Problem
Task
that takes a PipelineResource, e.g. a GCS storage resourceTaskRun
that points at aPipelineResource
which will have an error, e.g. reproduce Fetching empty GCS storage bucket of typedir
fails #646 by providing an empty bucket but usingdir
typeAdditional Info
When we switched away from using init containers for steps, the status was briefly completely broken. In #634 we updated this logic to look at container statuses instead of init containers - but it looks like we need to look at both (and our integration tests need to cover this).
The text was updated successfully, but these errors were encountered: