Skip to content
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

Return value of tkn pipeline start with --showlog does not depend on state of started pipeline #1820

Open
anetbnd opened this issue Dec 7, 2022 · 29 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Milestone

Comments

@anetbnd
Copy link

anetbnd commented Dec 7, 2022

Versions and Operating System

  • Kubernetes version:
Server Version: version.Info{Major:"1", Minor:"24", GitVersion:"v1.24.6+5157800", GitCommit:"eddac29feb4bb46b99fb570999324e582d761a66", GitTreeState:"clean", BuildDate:"2022-10-11T13:02:03Z", GoVersion:"go1.18.7", Compiler:"gc", Platform:"linux/amd64"}
  • Tekton Pipeline version:

    Output of tkn version or kubectl get pods -n tekton-pipelines -l app=tekton-pipelines-controller -o=jsonpath='{.items[0].metadata.labels.version}'

Client version: 0.24.1
Pipeline version: v0.37.5
Triggers version: v0.20.2
Operator version: v0.60.1
  • Operating System:
Linux

Expected Behavior

When I run a pipeline with tkn pipeline start <pipeline-name> --showlog and the pipeline fails, I expect the return value of the tkn command is also non 0. In this way it is possible to start a pipeline from another pipeline and fail the first one, if the second one has failed.

Actual Behavior

The return value of tkn pipeline start <pipeline-name> --showlog is 0, if the started pipeline fails.

Steps to Reproduce the Problem

  1. tkn pipeline start <pipeline-name> --showlog || echo "run failed"

The "run failed" string is never shown, even if the started pipeline failed.

Additional Info

...

@anetbnd anetbnd added the kind/bug Categorizes issue or PR as related to a bug. label Dec 7, 2022
@avinal
Copy link
Member

avinal commented Jan 9, 2023

/assign

avinal added a commit to avinal/cli that referenced this issue Feb 2, 2023
- this change fixes an issue where using --showlog with tkn start pipeline/task does not return a non-zero value when  created taskrun/pipelinerun fails.
- refer tektoncd#1820

Signed-off-by: Avinal Kumar <avinal@redhat.com>
@tekton-robot
Copy link
Contributor

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 tekton-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 9, 2023
@avinal
Copy link
Member

avinal commented Apr 9, 2023

/remove-lifecycle stale Work in Progress

@tekton-robot
Copy link
Contributor

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.

@tekton-robot tekton-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels May 9, 2023
@anetbnd
Copy link
Author

anetbnd commented May 10, 2023

/remove-lifecycle rotten Please don't give up the implementation here, it is an important feature for us!

@avinal
Copy link
Member

avinal commented May 11, 2023

Looks like I need some help here. Apology for delay. I will start working again.

@tekton-robot
Copy link
Contributor

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen with a justification.
Mark the issue as fresh with /remove-lifecycle rotten with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/close

Send feedback to tektoncd/plumbing.

@tekton-robot
Copy link
Contributor

@tekton-robot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen with a justification.
Mark the issue as fresh with /remove-lifecycle rotten with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/close

Send feedback to tektoncd/plumbing.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@anetbnd
Copy link
Author

anetbnd commented Jun 12, 2023

/reopen This is a really important feature in order to trigger a pipeline from another pipeline. Please don't let it die!

@anetbnd
Copy link
Author

anetbnd commented Jun 12, 2023

/remove-lifecycle rotten This is a really important feature in order to trigger a pipeline from another pipeline. Please don't let it die!

@avinal
Copy link
Member

avinal commented Jun 12, 2023

I have asked for help on the channel, so far, there is no significant progress.

@ileixe
Copy link

ileixe commented Jul 3, 2023

+1 for this feature to use tkn cli for CI runner. Now, it's completely inconsistent just to rely on "tkn start --showlog" for the job. We're very happy to have this.

@avinal
Copy link
Member

avinal commented Jul 3, 2023

/reopen

@tekton-robot
Copy link
Contributor

@avinal: You can't reopen an issue/PR unless you authored it or you are a collaborator.

In response to this:

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@piyush-garg piyush-garg reopened this Jul 11, 2023
@tekton-robot
Copy link
Contributor

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen with a justification.
Mark the issue as fresh with /remove-lifecycle rotten with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/close

Send feedback to tektoncd/plumbing.

@tekton-robot
Copy link
Contributor

@tekton-robot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen with a justification.
Mark the issue as fresh with /remove-lifecycle rotten with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/close

Send feedback to tektoncd/plumbing.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@anetbnd
Copy link
Author

anetbnd commented Aug 11, 2023

/reopen Please don't forget this issue here. It is not solved yet but very important for triggering tekton pipelines from other pipelines.

@anetbnd
Copy link
Author

anetbnd commented Aug 11, 2023

/remove-lifecycle rotten Please don't forget this issue here. It is not solved yet but very important for triggering tekton pipelines from other pipelines.

avinal added a commit to avinal/cli that referenced this issue Sep 6, 2023
- this change fixes an issue where using --showlog with tkn start pipeline/task does not return a non-zero value when  created taskrun/pipelinerun fails.
- refer tektoncd#1820

Signed-off-by: Avinal Kumar <avinal@redhat.com>
@avinal
Copy link
Member

avinal commented Sep 6, 2023

/reopen

@tekton-robot
Copy link
Contributor

@avinal: You can't reopen an issue/PR unless you authored it or you are a collaborator.

In response to this:

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@piyush-garg piyush-garg reopened this Sep 6, 2023
avinal added a commit to avinal/cli that referenced this issue Sep 6, 2023
- this change fixes an issue where using --showlog with tkn start pipeline/task does not return a non-zero value when  created taskrun/pipelinerun fails.
- refer tektoncd#1820

Signed-off-by: Avinal Kumar <avinal@redhat.com>
@tekton-robot
Copy link
Contributor

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen with a justification.
Mark the issue as fresh with /remove-lifecycle rotten with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/close

Send feedback to tektoncd/plumbing.

@tekton-robot
Copy link
Contributor

@tekton-robot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen with a justification.
Mark the issue as fresh with /remove-lifecycle rotten with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/close

Send feedback to tektoncd/plumbing.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@anetbnd
Copy link
Author

anetbnd commented Oct 6, 2023

Please do not close this. It is a very important feature. Without this feature, it is not possible to start a pipeline from another pipeline and track the state.

@ileixe
Copy link

ileixe commented Oct 24, 2023

Hi @avinal , can I try your branch? Is it completed?

@avinal
Copy link
Member

avinal commented Oct 24, 2023

Hi @avinal , can I try your branch? Is it completed?

Hey @ileixe, yes the fix is completed and tested manually but I couldn't figure out the tests and got busy elsewhere. Please feel free to continue. Thank You

@ileixe
Copy link

ileixe commented Oct 24, 2023

Ok, I will give it a try. Let me update if there's any problem. Thanks.

ileixe pushed a commit to ileixe/cli that referenced this issue Oct 24, 2023
- this change fixes an issue where using --showlog with tkn start pipeline/task does not return a non-zero value when  created taskrun/pipelinerun fails.
- refer tektoncd#1820

Signed-off-by: Avinal Kumar <avinal@redhat.com>
@ileixe
Copy link

ileixe commented Oct 24, 2023

@avinal Unfortunately, code have subtle bug now. It checks right after pod log tailing, but status of PipelineRun can be not updated until then.

I think we may have to add small loop to check PR is actually completed, but not sure it's completely safe. Let me give a shot.

It seems actually not working at all, as status field is is not fetched via API. (I was confused since the failed task emits non-zero after the change, but it was always failed.) I'm not sure it's right approach but we may have to call API (not local view) to check status.

ileixe pushed a commit to ileixe/cli that referenced this issue Oct 24, 2023
- this change fixes an issue where using --showlog with tkn start pipeline/task does not return a non-zero value when  created taskrun/pipelinerun fails.
- refer tektoncd#1820

Signed-off-by: Avinal Kumar <avinal@redhat.com>
Signed-off-by: Youseok Yang <yan@furiosa.ai>
ileixe pushed a commit to ileixe/cli that referenced this issue Oct 24, 2023
- this change fixes an issue where using --showlog with tkn start pipeline/task does not return a non-zero value when  created taskrun/pipelinerun fails.
- refer tektoncd#1820

Signed-off-by: Avinal Kumar <avinal@redhat.com>
Signed-off-by: Youseok Yang <yan@furiosa.ai>
@ileixe
Copy link

ileixe commented Oct 24, 2023

PR updated: #2155

It ran as expected from our simple cases.

@vdemeester vdemeester reopened this Oct 24, 2023
ileixe pushed a commit to ileixe/cli that referenced this issue Oct 25, 2023
- this change fixes an issue where using --showlog with tkn start pipeline/task does not return a non-zero value when  created taskrun/pipelinerun fails.
- refer tektoncd#1820

Signed-off-by: Avinal Kumar <avinal@redhat.com>
Signed-off-by: Youseok Yang <yan@furiosa.ai>
ileixe pushed a commit to ileixe/cli that referenced this issue Oct 25, 2023
- this change fixes an issue where using --showlog with tkn start pipeline/task does not return a non-zero value when  created taskrun/pipelinerun fails.
- refer tektoncd#1820

Signed-off-by: Avinal Kumar <avinal@redhat.com>
Signed-off-by: Youseok Yang <yan@furiosa.ai>
ileixe pushed a commit to ileixe/cli that referenced this issue Oct 25, 2023
- this change fixes an issue where using --showlog with tkn start pipeline/task does not return a non-zero value when  created taskrun/pipelinerun fails.
- refer tektoncd#1820

Signed-off-by: Avinal Kumar <avinal@redhat.com>
Signed-off-by: Youseok Yang <yan@furiosa.ai>
@piyush-garg piyush-garg added this to the 0.36.0 milestone Feb 27, 2024
@piyush-garg piyush-garg modified the milestones: 0.36.0, 0.37.0, 0.38.0 May 8, 2024
@piyush-garg piyush-garg modified the milestones: 0.38.0, 0.37.0 May 21, 2024
@piyush-garg
Copy link
Contributor

@avinal This seems should be done with #2298 can you please check and close this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

6 participants