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(hybrid-cloud): Adds region fan-out to organizations list command #1860

Merged
merged 9 commits into from
Dec 12, 2023

Conversation

GabeVillalobos
Copy link
Member

The organization list command currently relies on the base https://sentry.io/api/0/organizations/ route to query the user's active organizations; however, this will stop working when we incorporate multiple regions.

In order to address this, we've added logic to query an active user's regions, then fan-out to each of the individual regions in order to query all active organizations. This list is then combined and sorted by name as per usual.

In order to make this change, some of the underlying URI and request construction code had to be modified to allow overriding the request hostname with the region's hostname.

src/api.rs Outdated Show resolved Hide resolved
@GabeVillalobos
Copy link
Member Author

It isn't super easy to test the fan-out ability without kicking up another mockito server and changing some of the mocking behavior, so I just updated existing testing to hit the mock server. I'm open to feedback on whether this coverage is worth pursuing.

@GabeVillalobos GabeVillalobos marked this pull request as ready for review December 7, 2023 00:24
Copy link
Member

@markstory markstory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me from a hybrid cloud compatibility point of view, but I'm no rust expert.

src/api.rs Outdated Show resolved Hide resolved
tests/integration/organizations/list.rs Outdated Show resolved Hide resolved
Co-authored-by: Sebastian Zivota <loewenheim@users.noreply.github.com>
@GabeVillalobos GabeVillalobos merged commit 5898da8 into master Dec 12, 2023
12 checks passed
@GabeVillalobos GabeVillalobos deleted the adds-region-fanout branch December 12, 2023 17:28
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.

None yet

4 participants