tektoncd / cli

A CLI for interacting with Tekton!
Apache License 2.0
431 stars 250 forks source link

Logs of regular taskruns appear after logs of finally tasksruns #1146

Closed VeereshAradhya closed 3 years ago

VeereshAradhya commented 4 years ago

Versions and Operating System

Expected Behavior

Logs of regular taskruns should appear before logs of finally taskruns

Actual Behavior

Logs of regular taskruns appear after logs of finally tasksruns

Steps to Reproduce the Problem

  1. Create a pipeline run with the spec https://github.com/tektoncd/cli/blob/master/test/resources/pipelinerun-with-finally.yaml
  2. Run tkn pr logs -f exit-handler

Additional Info

Command Execution logs

[varadhya@localhost cli]$ cat  cli/test/resources/pipelinerun-with-finally.yaml
# Copyright 2020 The Tekton Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
  name: exit-handler
spec:
  pipelineSpec:
    finally:
      - name: echo-on-exit
        taskSpec:
          steps:
            - args:
                - echo "finally"
              command:
                - sh
                - -c
              image: library/bash:4.4.23
              name: main
    tasks:
      - name: print-msg
        taskSpec:
          steps:
            - args:
                - echo "printing a message"
              command:
                - sh
                - -c
              image: library/bash:4.4.23
              name: main
[varadhya@localhost cli]$ 
[varadhya@localhost cli]$ kubectl apply -f cli/test/resources/pipelinerun-with-finally.yaml
pipelinerun.tekton.dev/exit-handler created
[varadhya@localhost cli]$ 
[varadhya@localhost cli]$ ./tkn pr logs -f exit-handler
[echo-on-exit : main] finally

[print-msg : main] printing a message

Note: It is not reproducible all the times. Need to run steps multiple times to reproduce the issue

pradeepitm12 commented 4 years ago

/assign

vdemeester commented 4 years ago

@pradeepitm12 what is the status here ?

tekton-robot commented 3 years ago

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale with a justification. Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with /close with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle stale

Send feedback to tektoncd/plumbing.

tekton-robot commented 3 years ago

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten with a justification. Rotten issues close after an additional 30d of inactivity. If this issue is safe to close now please do so with /close with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle rotten

Send feedback to tektoncd/plumbing.

nikhil-thomas commented 3 years ago

/remove-lifecycle rotten looks like this is still valid. this should be fixed as part ofhttps://github.com/tektoncd/cli/pull/1385

nikhil-thomas commented 3 years ago

This could be closed as this is handled in https://github.com/tektoncd/cli/pull/1385

tekton-robot commented 3 years ago

@nikhil-thomas: You can't close an active issue/PR unless you authored it or you are a collaborator.

In response to [this](https://github.com/tektoncd/cli/issues/1146#issuecomment-887485720): >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
pradeepitm12 commented 3 years ago

This could be closed as this is handled in #1385

/close

tekton-robot commented 3 years ago

@pradeepitm12: Closing this issue.

In response to [this](https://github.com/tektoncd/cli/issues/1146#issuecomment-887656390): >> This could be closed as this is handled in #1385 > >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.