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

feat: Add support for receiving gzip event payloads #364

Merged
merged 16 commits into from
Jul 25, 2024

Conversation

keelerm84
Copy link
Member

@keelerm84 keelerm84 commented May 20, 2024

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

@keelerm84 keelerm84 requested a review from a team May 20, 2024 20:19
@keelerm84 keelerm84 force-pushed the mk/sc-244987/read-limit branch from 6c0014a to 7250b3e Compare May 20, 2024 20:20
config/config.go Outdated
@@ -3,6 +3,7 @@ package config
import (
"time"

"github.com/alecthomas/units"
Copy link
Member Author

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).

config/config.go Outdated Show resolved Hide resolved
internal/util/reader.go Outdated Show resolved Hide resolved
nonZipBytes := []byte("this is a test")

reader, _ := NewReader(io.NopCloser(bytes.NewReader(nonZipBytes)), false, 1000)
payloadReader, _ := reader.(*PayloadReader)
Copy link
Member Author

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.

@keelerm84 keelerm84 force-pushed the mk/sc-244987/read-limit branch from 7250b3e to b793702 Compare May 21, 2024 13:49
}

func TestZipBombing(t *testing.T) {
// build a string
Copy link
Contributor

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

@keelerm84 keelerm84 force-pushed the mk/sc-244987/read-limit branch from 7220c19 to 736cf3c Compare July 10, 2024 18:55
@keelerm84 keelerm84 requested a review from a team as a code owner July 10, 2024 18:55
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.
@keelerm84 keelerm84 force-pushed the mk/sc-244987/read-limit branch from 736cf3c to f6c29fb Compare July 10, 2024 18:57
@@ -1,6 +1,6 @@
module github.com/launchdarkly/ld-relay/v8

go 1.20
go 1.21
Copy link
Contributor

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?

keelerm84 and others added 6 commits July 17, 2024 09:45
🤖 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>
@keelerm84 keelerm84 force-pushed the mk/sc-244987/read-limit branch from f276aa3 to fc9affe Compare July 25, 2024 17:13
@keelerm84 keelerm84 force-pushed the mk/sc-244987/read-limit branch from fc9affe to 0e367ae Compare July 25, 2024 17:17
@keelerm84 keelerm84 changed the base branch from feat/gzip-events to v8 July 25, 2024 17:30
@keelerm84 keelerm84 requested a review from kinyoklion July 25, 2024 17:33
@keelerm84 keelerm84 merged commit 4803e76 into v8 Jul 25, 2024
8 checks passed
@keelerm84 keelerm84 deleted the mk/sc-244987/read-limit branch July 25, 2024 17:43
keelerm84 pushed a commit that referenced this pull request Jul 25, 2024
🤖 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants