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

Send EL response before Triggers finish processing #1132

Merged

Conversation

dibyom
Copy link
Member

@dibyom dibyom commented Jun 17, 2021

Changes

Note: This is @jmcshane 's PR #1077 that I rebased.

In the current version of the product, the HTTP request to the EventListener
endpoint waits for all triggers to process to determine if a resource was
created. This is not in line with the suggestion by the source control
systems for webhook endpoints. This change updates the endpoint to respond
as soon as the triggers have been selected for processing.

Submitter Checklist

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

  • Includes tests (if functionality changed/added)
  • Includes docs (if user facing)
  • Commit messages follow commit message best practices
  • Release notes block has been filled in or deleted (only if no user facing changes)

See the contribution guide for more details.

Release Notes

BREAKING CHANGE: With this change the EventListener will stop responding with `201 Created` status code when it creates resources. Instead it will always respond with a `202 Accepted` response code.

@tekton-robot tekton-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Jun 17, 2021
@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 17, 2021
@tekton-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-tekton-triggers-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/sink/sink.go 79.5% 74.7% -4.9

@dibyom
Copy link
Member Author

dibyom commented Jun 17, 2021

/assign @wlynch

@dibyom
Copy link
Member Author

dibyom commented Jun 17, 2021

/assign @savitaashture

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

@wlynch wlynch left a comment

Choose a reason for hiding this comment

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

We should update the commit + PR description to be more git blame friendly.

Otherwise LGTM!.

pkg/sink/sink.go Outdated Show resolved Hide resolved
@dibyom dibyom force-pushed the feature/update-status-code-handling branch from fb2064e to 2f8fbf4 Compare June 24, 2021 15:33
In the current version of the product, the HTTP request to the
EventListener endpoint waits for all triggers to process to determine if
a resource was created. This is not in line with the suggestion by the
source control systems for webhook endpoints. This change updates the
endpoint to respond as soon as the triggers have been selected for
processing.

BREAKING CHANGE: With this change the EventListener will stop responding
with `201 Created` status code when it creates resources. Instead it
will always respond with a `202 Accepted` response code.

Fixes tektoncd#931
@dibyom dibyom force-pushed the feature/update-status-code-handling branch from 2f8fbf4 to 2ce9b99 Compare June 24, 2021 15:34
@tekton-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-tekton-triggers-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/sink/sink.go 79.5% 74.7% -4.9

@tekton-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-tekton-triggers-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/sink/sink.go 79.5% 74.7% -4.9

@dibyom dibyom changed the title Update status code handling Send EL response before Triggers finish processing Jun 24, 2021
@dibyom dibyom mentioned this pull request Jun 24, 2021
4 tasks
Copy link
Member

@wlynch wlynch left a comment

Choose a reason for hiding this comment

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

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 25, 2021
@tekton-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: savitaashture, wlynch

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:
  • OWNERS [savitaashture,wlynch]

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 merged commit c8a6cd4 into tektoncd:main Jun 25, 2021
@dibyom dibyom deleted the feature/update-status-code-handling branch June 25, 2021 15:06
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. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants