Repository navigation
Doing base64 encode in channel's responseBody - #6542
knative-prow[bot] merged 3 commits into
Conversation
Codecov ReportBase: 81.94% // Head: 81.89% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #6542 +/- ##
==========================================
- Coverage 81.94% 81.89% -0.06%
==========================================
Files 235 235
Lines 11738 11756 +18
==========================================
+ Hits 9619 9627 +8
- Misses 1646 1652 +6
- Partials 473 477 +4
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
|
Could I suggest to also create an issue for this? It is at least related to the issue fixed here: knative-extensions/eventing-kafka-broker#2604 Also, it would be nice to have some rekt-test for this, again like in here: https://github.com/knative-sandbox/eventing-kafka-broker/pull/2604/files#diff-0de2d5afb422b7e648e6a13010e4331ecad2c15de240dcea0e8177e263e73e10 |
Sure, I will open an issue and add some rekt-test for this PR |
| body := make([]byte, attributes.KnativeErrorDataExtensionMaxLength) | ||
| readLen, err := response.Body.Read([]byte(body)) | ||
|
|
||
| // encodeBase64 encodes response body as base64 for the resulting length. |
There was a problem hiding this comment.
I think if to long, we reduce it to first 1024
also this might need some reflection on some of the rekt/e2e tests (see failures)
1a933dd to
a258baf
Compare
|
/retest |
| func TestChannelSubscriptionReturnedErrorData(t *testing.T) { | ||
| t.Parallel() | ||
|
|
||
| ctx, env := global.Environment( | ||
| knative.WithKnativeNamespace(system.Namespace()), | ||
| knative.WithLoggingConfig, | ||
| knative.WithTracingConfig, | ||
| k8s.WithEventListener, | ||
| environment.Managed(t), | ||
| ) | ||
|
|
||
| createSubscriberFn := func(ref *duckv1.KReference, uri string) manifest.CfgFn { | ||
| return subscription.WithSubscriber(ref, uri) | ||
| } | ||
|
|
||
| env.Test(ctx, t, channel.ChannelSubscriptionReturnedErrorData(createSubscriberFn)) | ||
| } |
There was a problem hiding this comment.
Should we additionally add a similar test that used the Broker/Trigger API?
There was a problem hiding this comment.
The extensions is not added in Broker/Trigger, I am working on this PR #6541
There was a problem hiding this comment.
Oh, I missed your comment #6541 (comment), thanks!
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: liuchangyan, pierDipi The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Sanitizing the HTTP body was added as a measure to try to handle as many HTTP body as possible, now that we're base64 encoding the error body [1], it is not necessary anymore. [1] knative#6542 Signed-off-by: Pierangelo Di Pilato <[email protected]>
Sanitizing the HTTP body was added as a measure to try to handle as many HTTP body as possible, now that we're base64 encoding the error body [1], it is not necessary anymore. [1] knative#6542 Signed-off-by: Pierangelo Di Pilato <[email protected]>
Sanitizing the HTTP body was added as a measure to try to handle as many HTTP body as possible, now that we're base64 encoding the error body [1], it is not necessary anymore. [1] knative#6542 Signed-off-by: Pierangelo Di Pilato <[email protected]>
Sanitizing the HTTP body was added as a measure to try to handle as many HTTP body as possible, now that we're base64 encoding the error body [1], it is not necessary anymore, it just breaks any consumer trying to use such info. [1] #6542 Signed-off-by: Pierangelo Di Pilato <[email protected]>
) Sanitizing the HTTP body was added as a measure to try to handle as many HTTP body as possible, now that we're base64 encoding the error body [1], it is not necessary anymore, it just breaks any consumer trying to use such info. [1] knative#6542 Signed-off-by: Pierangelo Di Pilato <[email protected]>
) (#203) Sanitizing the HTTP body was added as a measure to try to handle as many HTTP body as possible, now that we're base64 encoding the error body [1], it is not necessary anymore, it just breaks any consumer trying to use such info. [1] knative#6542 Signed-off-by: Pierangelo Di Pilato <[email protected]>
) Sanitizing the HTTP body was added as a measure to try to handle as many HTTP body as possible, now that we're base64 encoding the error body [1], it is not necessary anymore, it just breaks any consumer trying to use such info. [1] knative#6542 Signed-off-by: Pierangelo Di Pilato <[email protected]>
) (#211) Sanitizing the HTTP body was added as a measure to try to handle as many HTTP body as possible, now that we're base64 encoding the error body [1], it is not necessary anymore, it just breaks any consumer trying to use such info. [1] knative#6542 Signed-off-by: Pierangelo Di Pilato <[email protected]> Co-authored-by: Pierangelo Di Pilato <[email protected]>
Fixes #6547
Signed-off-by: Teresaliu [email protected]
Proposed Changes
Pre-review Checklist
Release Note
Docs