Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: divyani-22 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
Hi @divyani-22. Thanks for your PR. I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with Tip We noticed you've done this a few times! Consider joining the org to skip this step and gain Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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-sigs/prow repository. |
…sion keys Signed-off-by: Divyani <divyanipapalkar22@gmail.com>
Description
In
pkg/functions/invoke.go, CloudEvent construction had three inconsistencies between HTTPPOST(sendEvent) andGET(sendGetEvent):GET:sendGetEventomittedm.Extensions, so CloudEventsGETinvocations silently lost all extension attributes.[a-z0-9]+or reserved CloudEvents context attributes such asid,source,type,datacontenttype,specversion) were not rejected at event creation time.sendEventdid not generate a default UUID whenm.ID == ""(unlikesendGetEvent), and both functions duplicatedclient.Requestresult handling.Changes
pkg/functions/invoke.go:newCloudEvent(m InvokeMessage)helper used by bothsendEventandsendGetEvent, ensuringm.Extensionsare applied for bothPOSTandGETrequests, emptym.IDdefaults to a UUID, and extension attribute names satisfy CloudEvents v1.0 naming rules without colliding with reserved context attributes.requestCloudEventhelper to eliminate duplicated CloudEvent request/error handling betweensendEventandsendGetEvent.pkg/functions/invoke_unit_test.go:Test_newCloudEventverifying UUID generation, extension assignment, and rejection of invalid or reserved extension keys.Test_sendCloudEventMethodsAndExtensionsverifying end-to-end HTTPPOSTandGETinvocations both deliverCe-*extension headers.Testing
Test_newCloudEventinpkg/functions/invoke_unit_test.goTest_sendCloudEventMethodsAndExtensionsinpkg/functions/invoke_unit_test.go