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

fix: do not emit error when RelayProxyEndpointsWithoutEvents is used #110

Merged
merged 6 commits into from
Mar 14, 2024

Conversation

cwaldren-ld
Copy link
Contributor

@cwaldren-ld cwaldren-ld commented Mar 5, 2024

When RelayProxyEndpointsWithoutEvents is used to configure an SDK's ServiceEndpoints, it throws an error-level log message explaining that only some URIs are set.

This logic was intended to surface a common mistake of only setting one URI when the developer meant to set all 3. In this case the error is incorrect as we're making this choice explicitly as a supported use-case: use Relay for streaming and polling, but send events to LaunchDarkly.

There are many ways to approach fixing this in a backwards compatible manner. Ideally, we'd have constructors that embody the supported use-cases.

To avoid introducing a new construction API, I've taken a minimal approach of adding a new setter/getter on the ServiceEndpoint struct to indicate if partial-specification of custom URIs was intentional or not.

This way, we can later check that the constructed ServiceEndpoints intentionally hasn't set the events endpoint and decide whether or not to log a message.

Copy link

This pull request has been linked to Shortcut Story #234826: Using Relay Proxy Endpoints constructor results in error.

@cwaldren-ld cwaldren-ld force-pushed the cw/sc-234826/endpoint-error-with-relay-constructor branch from ad9b9c9 to ae2bb13 Compare March 5, 2024 20:18
@cwaldren-ld cwaldren-ld marked this pull request as ready for review March 5, 2024 20:24
@cwaldren-ld cwaldren-ld requested a review from a team March 5, 2024 20:24
Base automatically changed from cw/sc-234826/endpoint-refactor to v7 March 11, 2024 20:42
@cwaldren-ld cwaldren-ld requested a review from keelerm84 March 11, 2024 20:44
interfaces/service_endpoints.go Outdated Show resolved Hide resolved
@cwaldren-ld cwaldren-ld merged commit 0551bf1 into v7 Mar 14, 2024
11 checks passed
@cwaldren-ld cwaldren-ld deleted the cw/sc-234826/endpoint-error-with-relay-constructor branch March 14, 2024 17:34
cwaldren-ld pushed a commit that referenced this pull request Mar 14, 2024
🤖 I have created a release *beep* *boop*
---


##
[7.1.1](v7.1.0...v7.1.1)
(2024-03-14)


### Bug Fixes

* do not emit error when RelayProxyEndpointsWithoutEvents is used
([#110](#110))
([0551bf1](0551bf1))

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

2 participants