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

Emit pipelinerun event when it is cancelled #1230

Merged
merged 1 commit into from
Sep 18, 2019

Conversation

Letty5411
Copy link
Contributor

@Letty5411 Letty5411 commented Aug 22, 2019

Fixes #1229

Changes

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

See the contribution guide for more details.

Double check this list of stuff that's easy to miss:

Reviewer Notes

If API changes
are included, additive changes
must be approved by at least two OWNERS
and backwards incompatible changes
must be approved by more than 50% of the OWNERS,
and they must first be added
in a backwards compatible way.

Release Notes

Describe any user facing changes here, or delete this block.

Examples of user facing changes:
- API changes
- Bug fixes
- Any changes in behavior

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@tekton-robot tekton-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 22, 2019
@tekton-robot
Copy link
Collaborator

Hi @Letty5411. Thanks for your PR.

I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@Letty5411
Copy link
Contributor Author

@googlebot I signed it!

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: yes Trying to make the CLA bot happy with ppl from different companies work on one commit and removed cla: no labels Aug 22, 2019
@Letty5411
Copy link
Contributor Author

/assign @bobcatfish

@Letty5411 Letty5411 changed the title Emit pipelinerun event when it is canceled Emit pipelinerun event when it is cancelled Aug 23, 2019
@bobcatfish
Copy link
Collaborator

Thanks for finding this problem and fixing it this @Letty5411 !

Would you mind adding a test for this as well?

It looks like the best place to add it would be in our cancel tests: https://github.com/tektoncd/pipeline/blob/master/test/cancel_test.go

You can see an example of another end to end test that tests the events in https://github.com/tektoncd/pipeline/blob/master/test/pipelinerun_test.go#L203

@tekton-robot tekton-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Sep 3, 2019
@Letty5411
Copy link
Contributor Author

Letty5411 commented Sep 3, 2019

Thanks for finding this problem and fixing it this @Letty5411 !

Would you mind adding a test for this as well?

It looks like the best place to add it would be in our cancel tests: https://github.com/tektoncd/pipeline/blob/master/test/cancel_test.go

You can see an example of another end to end test that tests the events in https://github.com/tektoncd/pipeline/blob/master/test/pipelinerun_test.go#L203

Thanks for your suggestion, I have added the test.

@dibyom
Copy link
Member

dibyom commented Sep 5, 2019

/ok-to-test

@tekton-robot tekton-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 5, 2019
@tekton-robot
Copy link
Collaborator

The following is the coverage report on pkg/.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/pipelinerun/pipelinerun.go Do not exist 82.5%

@dibyom
Copy link
Member

dibyom commented Sep 16, 2019

hey @Letty5411 looks like the build test is failing with a lint error:

I0905 22:16:49.542] test/cancel_test.go:190: File is not gofmt-ed with -s (gofmt)

Could you run gofmt -s -w test/cancel_test.go? Otherwise, this change looks good 👍

Fixes tektoncd#1229

Signed-off-by: letty <letty.ll@alibaba-inc.com>
@Letty5411
Copy link
Contributor Author

hey @Letty5411 looks like the build test is failing with a lint error:

I0905 22:16:49.542] test/cancel_test.go:190: File is not gofmt-ed with -s (gofmt)

Could you run gofmt -s -w test/cancel_test.go? Otherwise, this change looks good 👍

Thanks for your review, I have fixed it.

@tekton-robot
Copy link
Collaborator

The following is the coverage report on pkg/.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/pipelinerun/pipelinerun.go 82.1% 82.4% 0.3

@Letty5411
Copy link
Contributor Author

hi @dibyom , if this PR is OK, could you help merge it, thanks~

@afrittoli afrittoli added this to the Pipelines 0.7 🐱 milestone Sep 18, 2019
@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dibyom, Letty5411

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 18, 2019
Copy link
Member

@afrittoli afrittoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your PR and fix!
The change looks good to me.

@afrittoli
Copy link
Member

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 18, 2019
@afrittoli
Copy link
Member

/test pull-tekton-pipeline-integration-tests

@tekton-robot tekton-robot merged commit 11c95a0 into tektoncd:master Sep 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cla: yes Trying to make the CLA bot happy with ppl from different companies work on one commit lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cancel pipelinerun should emit pipelinerun event
6 participants