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

Cloud Event Resource on pipeline completion #2053

Closed
shiyu-dong opened this issue Feb 14, 2020 · 7 comments
Closed

Cloud Event Resource on pipeline completion #2053

shiyu-dong opened this issue Feb 14, 2020 · 7 comments
Labels
kind/question Issues or PRs that are questions around the project or a particular feature triage/duplicate Indicates an issue is a duplicate of other open issue.

Comments

@shiyu-dong
Copy link

shiyu-dong commented Feb 14, 2020

Hello,

This is a follow up on #1922 . I was looking at Cloud Event Resource which can send a request to a target URI upon TaskRun completion.

Is there a similar mechanism for PipelineRun completion too? i,e. I want to receive some API call when a pipeline run completes. I could potentially send a cloud event at the end of the "last" task, but if the pipeline run fails in the middle there's no guarantee that the last task will be executed.

Thanks!

/kind question

@tekton-robot tekton-robot added the kind/question Issues or PRs that are questions around the project or a particular feature label Feb 14, 2020
@bobcatfish
Copy link
Collaborator

I could potentially send a cloud event at the end of the "last" task, but if the pipeline run fails in the middle there's no guarantee that the last task will be executed.

I think that's your best option right now unfortunately! But a couple things are on the way that will make this better:

@bobcatfish
Copy link
Collaborator

I've added #2082 about emitting events during execution!

@bobcatfish
Copy link
Collaborator

One more thought, @afrittoli created a demo with the functionality you are describing, and I think what he ended up doing was in the case of a failure, he didn't actually fail the Pipeline, he instead "passed" the pipeline but included information about the failure in the CloudEvent, and then the Pipeline that finally handled it (via triggers) was the one that looked at the data and decided whether to fail or not. Definitely not optimal tho!

@shiyu-dong
Copy link
Author

I could potentially send a cloud event at the end of the "last" task, but if the pipeline run fails in the middle there's no guarantee that the last task will be executed.

I think that's your best option right now unfortunately! But a couple things are on the way that will make this better:

Thanks for getting back! The demo that @afrittoli had seems to be a little bit hacky and doesn't seems to be a generalizable solution to apply for different pipelines. I think #1684 with a "finally" block will do the trick :)

@afrittoli
Copy link
Member

This will be addressed as part of #2082.
We won't be using the pipeline resource for that though.

@dibyom
Copy link
Member

dibyom commented Mar 30, 2020

I'm going to close this in favor of #2082
/triage duplicate
/close

@tekton-robot tekton-robot added the triage/duplicate Indicates an issue is a duplicate of other open issue. label Mar 30, 2020
@tekton-robot
Copy link
Collaborator

@dibyom: Closing this issue.

In response to this:

I'm going to close this in favor of #2082
/triage duplicate
/close

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Issues or PRs that are questions around the project or a particular feature triage/duplicate Indicates an issue is a duplicate of other open issue.
Projects
None yet
Development

No branches or pull requests

5 participants