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

Added URL field to WebhookInterceptor #1002

Merged
merged 1 commit into from
Mar 29, 2021
Merged

Added URL field to WebhookInterceptor #1002

merged 1 commit into from
Mar 29, 2021

Conversation

mpetason
Copy link
Contributor

@mpetason mpetason commented Mar 16, 2021

Changes

Added URL field to WebhookInterceptor in trigger_types

Fixes #270

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

Added URL field to WebhookInterceptor

@tekton-robot tekton-robot added do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 16, 2021
@tekton-robot
Copy link

Hi @mpetason. 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.

@tekton-robot tekton-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Mar 16, 2021
@dibyom
Copy link
Member

dibyom commented Mar 16, 2021

/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 Mar 16, 2021
@afrittoli
Copy link
Member

@mpetason Thank you for this PR!
You will need a release notes section in the PR body.

@tekton-robot tekton-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Mar 16, 2021
@dibyom
Copy link
Member

dibyom commented Mar 18, 2021

Thanks @mpetason

1We should also ensure that this new field can be used to resolve the Webhook URL i.e. if the URL field is present we should use that instead of trying to resolve using the Service name. The change should be around here: https://github.com/tektoncd/triggers/blob/main/pkg/interceptors/webhook/webhook.go#L88

@mpetason
Copy link
Contributor Author

Thanks for the update. I'll take a look and see if I can fix that and submit an update to the PR.

@tekton-robot tekton-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 20, 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/apis/triggers/v1alpha1/trigger_types.go Do not exist 100.0%
pkg/interceptors/webhook/webhook.go 89.7% 90.3% 0.7

@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/apis/triggers/v1alpha1/trigger_types.go Do not exist 100.0%
pkg/interceptors/webhook/webhook.go 89.7% 90.0% 0.3

@mpetason
Copy link
Contributor Author

/test pull-tekton-triggers-integration-tests

@dibyom
Copy link
Member

dibyom commented Mar 25, 2021

Nice. Thanks @mpetason One small thing - could you please squash up the commits into one? Otherwise good to go/

/approve

@tekton-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dibyom

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 Mar 25, 2021
Updated with update-codgen.sh

Updated webhook.go to use the URL if defined in the WebhookInterceptor

Changed if/elseif/else to switch based on test feedback
@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/interceptors/webhook/webhook.go 89.7% 90.0% 0.3

@dibyom
Copy link
Member

dibyom commented Mar 29, 2021

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 29, 2021
@mpetason
Copy link
Contributor Author

mpetason commented Mar 29, 2021

I think some of the tests are stuck, maybe I don't have permissions to force a retest on all? It doesn't look like /test or /retest triggered it. When I look at "Details" it doesn't link to anything valid.

@mpetason
Copy link
Contributor Author

/retest

@tekton-robot tekton-robot merged commit 1965f62 into tektoncd:main Mar 29, 2021
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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FR: Add URL option to WebhookInterceptor
4 participants