Skip to content

fix(hybrid-cloud): Adds region fan-out to organizations list command#1860

Merged
GabeVillalobos merged 9 commits intomasterfrom
adds-region-fanout
Dec 12, 2023
Merged

fix(hybrid-cloud): Adds region fan-out to organizations list command#1860
GabeVillalobos merged 9 commits intomasterfrom
adds-region-fanout

Conversation

@GabeVillalobos
Copy link
Copy Markdown
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.

@GabeVillalobos GabeVillalobos requested review from a team and szokeasaurusrex December 6, 2023 20:33
@GabeVillalobos
Copy link
Copy Markdown
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
Copy Markdown
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.

Co-authored-by: Sebastian Zivota <loewenheim@users.noreply.github.com>
@GabeVillalobos GabeVillalobos merged commit 5898da8 into master Dec 12, 2023
@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.

4 participants