-
Notifications
You must be signed in to change notification settings - Fork 425
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
Slack interceptor 1542 #1548
Slack interceptor 1542 #1548
Conversation
Hi @ilan-pinto. 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 Once the patch is verified, the new status will be reflected by the 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/ok-to-test
The following is the coverage report on the affected files.
|
@khrm how can i fix the failing test ? It seems to be coming from the framework |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you are using go1.18 or go1.20. While using scripts in hack folder, you need to use go1.19 version because test scripts uses go1.19 version.
0193bb1
to
500f0ca
Compare
The following is the coverage report on the affected files.
|
500f0ca
to
698e9df
Compare
The following is the coverage report on the affected files.
|
698e9df
to
2d89d9f
Compare
The following is the coverage report on the affected files.
|
2d89d9f
to
f34dcf5
Compare
The following is the coverage report on the affected files.
|
f34dcf5
to
b2f5c92
Compare
The following is the coverage report on the affected files.
|
b2f5c92
to
a66d1fe
Compare
The following is the coverage report on the affected files.
|
|
||
```yaml | ||
annotations: | ||
tekton.dev/payload-validation: "false" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should update our payload validation to allow json and form/urlencoded content types and return invalid for anything else
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @khrm
kubectl get eventlisteners | ||
} | ||
|
||
ignoreExamples=( cron trigger-ref triggergroups ) | ||
|
||
port_forward_and_curl() { | ||
|
||
sleep 10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need a sleep 10?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I faced issues on my local when using kind. it took more than 3 sec for the event listener to be available
// the Requested fields to be extracted from data form | ||
|
||
// +listType=atomic | ||
RequestedFields []string `json:"requestedFields,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this a mandatory field? or do we extract all fields by default if no requestedFields is specifed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We extract only the requested fields.
it wont do any work if nothing is specified
pkg/sink/sink.go
Outdated
@@ -554,7 +558,24 @@ func (r Sink) ExecuteInterceptors(trInt []*triggersv1.TriggerInterceptor, in *ht | |||
} | |||
// Clear interceptorParams for the next interceptor in chain | |||
request.InterceptorParams = map[string]interface{}{} | |||
|
|||
// check if string is urlencoded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic here looks fine but shouldn't we call it when we first create the request object around line 467?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fc16165
to
564a1a8
Compare
The following is the coverage report on the affected files.
|
/test pull-tekton-triggers-integration-tests |
The test is failing because resources don't exist in 0.46. We need to update the getting started pipeline. So it's not an issue with this pr. |
/test pull-tekton-triggers-integration-tests |
/approve Thanks so much @ilan-pinto |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dibyom, khrm 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 |
564a1a8
to
ccbc807
Compare
ccbc807
to
2f0d660
Compare
The following is the coverage report on the affected files.
|
/retest |
…ommand payload A Slack allows you to extract fields from a slack slash command [payload](https://api.slack.com/interactivity/slash-commands#app _command_handling) which are sent in the http form-data section. Closes tektoncd#1542 added generic urlencode handling modified go mod file
2f0d660
to
65b1d92
Compare
The following is the coverage report on the affected files.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/kind feature
Changes
Added a Slack
Interceptor
that allows you to extract fields from a slack slash command payload which are sent in the http form-data section.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.
Release Notes