-
Notifications
You must be signed in to change notification settings - Fork 82
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
feat: Add support for receiving gzip event payloads #364
Conversation
6c0014a
to
7250b3e
Compare
config/config.go
Outdated
@@ -3,6 +3,7 @@ package config | |||
import ( | |||
"time" | |||
|
|||
"github.com/alecthomas/units" |
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.
Adding this library because it allows for a nice size type (e.g. 15GiB).
nonZipBytes := []byte("this is a test") | ||
|
||
reader, _ := NewReader(io.NopCloser(bytes.NewReader(nonZipBytes)), false, 1000) | ||
payloadReader, _ := reader.(*PayloadReader) |
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.
Since we aren't returning the PayloadReader type, we have to do this typehint stuff in a couple of places here.
7250b3e
to
b793702
Compare
internal/util/reader_test.go
Outdated
} | ||
|
||
func TestZipBombing(t *testing.T) { | ||
// build a string |
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.
Probably don't need this comment
7220c19
to
736cf3c
Compare
This allows for better backwards compatibility in that the default option is to not enforce a limit (current behavior). But once a customer does set the value, we can enforce that as a strict > 0 limit.
736cf3c
to
f6c29fb
Compare
@@ -1,6 +1,6 @@ | |||
module github.com/launchdarkly/ld-relay/v8 | |||
|
|||
go 1.20 | |||
go 1.21 |
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.
Checking that this change actually requires a bump to the minimum go version?
🤖 I have created a release *beep* *boop* --- ## [8.8.1](v8.8.0...v8.8.1) (2024-07-10) ### Bug Fixes * **deps:** bump supported Go versions to 1.22.5 and 1.21.12 ([#411](#411)) ([02c0a7e](02c0a7e)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
**Requirements** - [x] I have added test coverage for new or changed functionality - [x] I have followed the repository's [pull request submission guidelines](../blob/master/CONTRIBUTING.md#submitting-pull-requests) - [x] I have validated my changes against all supported platform versions **Related issues** (Internal: see sc-249267) **Describe the solution you've provided** When the connection URL is specified with a username and password, this was logged in full, for example "Using proxy server at http://my-user-name:my-password@my-proxy-server". This fix redacts any password specified as part of the URL from the logs.
🤖 I have created a release *beep* *boop* --- ## [8.8.2](v8.8.1...v8.8.2) (2024-07-15) ### Bug Fixes * redact password in logs if specified as part of URL ([#413](#413)) ([0471d51](0471d51)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
f276aa3
to
fc9affe
Compare
fc9affe
to
0e367ae
Compare
🤖 I have created a release *beep* *boop* --- ## [8.9.0](v8.8.2...v8.9.0) (2024-07-25) ### Features * Add new `MaxInboundPayloadSize` configuration to limit event payload sizes ([#364](#364)) ([4803e76](4803e76)) * gzip event payloads before sending to upstream LaunchDarkly APIs ([#364](#364)) ([4803e76](4803e76)) * Support receiving compressed event payloads ([#364](#364)) ([4803e76](4803e76)) ### Bug Fixes * Bump minimum go version to 1.21 ([#364](#364)) ([4803e76](4803e76)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
BEGIN_COMMIT_OVERRIDE
feat: Support receiving compressed event payloads (#364)
feat: Add new
MaxInboundPayloadSize
configuration to limit event payload sizes (#364)feat: gzip event payloads before sending to upstream LaunchDarkly APIs (#364)
fix: Bump minimum go version to 1.21 (#364)
END_COMMIT_OVERRIDE