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

Duplicate 'pipelinerun.successful' cloudevent #3336

Closed
ghost opened this issue Oct 6, 2020 · 1 comment · Fixed by #3353
Closed

Duplicate 'pipelinerun.successful' cloudevent #3336

ghost opened this issue Oct 6, 2020 · 1 comment · Fixed by #3353
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@ghost
Copy link

ghost commented Oct 6, 2020

Expected Behavior

A single 'dev.tekton.event.pipelinerun.successful.v1' event after a successfull pipelinerun.

Actual Behavior

Two 'dev.tekton.event.pipelinerun.successful.v1' events with different id's and different timestamps referencing the same run:

First:

"ce-type": "dev.tekton.event.pipelinerun.successful.v1"
"ce-time": "2020-10-06T05:19:26.898238287Z",
"ce-subject": "tekton-builds-wwu-p2v8b-r-7bgc4",
"ce-id": "c7a26faa-a825-4a0f-8c2d-9ce192a9a5b8",
"ce-source": "/apis/tekton.dev/v1beta1/namespaces/tekton-builds/pipelineruns/tekton-builds-wwu-p2v8b-r-7bgc4",

Second:

"ce-type": "dev.tekton.event.pipelinerun.successful.v1",
"ce-time": "2020-10-06T05:19:26.952135384Z",
"ce-subject": "tekton-builds-wwu-p2v8b-r-7bgc4",
"ce-id": "fe652d4a-53fc-4bd7-9bbc-cc41f6953f86",
"ce-source": "/apis/tekton.dev/v1beta1/namespaces/tekton-builds/pipelineruns/tekton-builds-wwu-p2v8b-r-7bgc4",

Steps to Reproduce the Problem

  1. Create a Listener for the CloudEvents
  2. Filter for header.match('ce-type', 'dev.tekton.event.pipelinerun.successful.v1')
  3. Log the invocations

Additional Info

  • Kubernetes version:
Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.2", GitCommit:"f5743093fd1c663cb0cbc89748f730662345d44d", GitTreeState:"clean", BuildDate:"2020-09-16T21:51:49Z", GoVersion:"go1.15.2", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.8", GitCommit:"9f2892aab98fe339f3bd70e3c470144299398ace", GitTreeState:"clean", BuildDate:"2020-08-13T16:04:18Z", GoVersion:"go1.13.15", Compiler:"gc", Platform:"linux/amd64"}
  • Tekton Pipeline version:
Client version: 0.12.1
Pipeline version: v0.16.3
Triggers version: v0.8.1
@ghost ghost added the kind/bug Categorizes issue or PR as related to a bug. label Oct 6, 2020
@afrittoli
Copy link
Member

Hello @wwu-cx, thanks for this bug report.
I was able to reproduce the issue and I'm working on a fix

@afrittoli afrittoli self-assigned this Oct 6, 2020
@afrittoli afrittoli added this to the Pipelines v0.17 milestone Oct 7, 2020
afrittoli added a commit to afrittoli/pipeline that referenced this issue Oct 7, 2020
Change the logic for cloud events to be sent only if a change is
detected in the condition, specifically in state, message or reason.

Fixes tektoncd#3336

Signed-off-by: Andrea Frittoli <[email protected]>
tekton-robot pushed a commit that referenced this issue Oct 7, 2020
Change the logic for cloud events to be sent only if a change is
detected in the condition, specifically in state, message or reason.

Fixes #3336

Signed-off-by: Andrea Frittoli <[email protected]>
vdemeester pushed a commit to vdemeester/tektoncd-pipeline that referenced this issue Oct 12, 2020
Change the logic for cloud events to be sent only if a change is
detected in the condition, specifically in state, message or reason.

Fixes tektoncd#3336

Signed-off-by: Andrea Frittoli <[email protected]>
(cherry picked from commit 3d35b87)
Signed-off-by: Vincent Demeester <[email protected]>
tekton-robot pushed a commit that referenced this issue Oct 12, 2020
Change the logic for cloud events to be sent only if a change is
detected in the condition, specifically in state, message or reason.

Fixes #3336

Signed-off-by: Andrea Frittoli <[email protected]>
(cherry picked from commit 3d35b87)
Signed-off-by: Vincent Demeester <[email protected]>
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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant