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: Direct routing to correct pod #223

Conversation

einsteinx2
Copy link
Contributor

Summary

  • Directly route to the correct pod using the api key prefix when feature flag is enabled

Testing Plan

  • Added unit tests
  • E2E tested against all pods

Reference Issue (For mParticle employees only. Ignore if you are an outside contributor)

Copy link
Contributor

@BrandonStalnaker BrandonStalnaker left a comment

Choose a reason for hiding this comment

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

LGTM


- (NSString *)defaultHostWithSubdomain:(NSString *)subdomain apiKey:(NSString *)apiKey enableDirectRouting:(BOOL)enableDirectRouting {
if (enableDirectRouting) {
NSArray *splitKey = [apiKey componentsSeparatedByString:@"-"];

Choose a reason for hiding this comment

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

What would happen if the subdomian doesnt have the - for splitting?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

if the API key doesn't have a dash (aka it's an old key without a prefix) this will just return an array with a single value, which I check for on the next line.

@einsteinx2 einsteinx2 merged commit b0701a1 into feat/SQDSDKS-5764-api-url-routing-feature-branch Oct 4, 2023
14 of 15 checks passed
@einsteinx2 einsteinx2 deleted the feat/SQDSDKS-5771-api-url-routing branch October 4, 2023 15:06
einsteinx2 added a commit that referenced this pull request Oct 9, 2023
einsteinx2 added a commit that referenced this pull request Oct 11, 2023
* feat: Direct routing to correct pod (#223)

* feat: Use direct url routing config feature flag (#229)
mparticle-automation added a commit that referenced this pull request Oct 11, 2023
# [8.16.0](v8.15.1...v8.16.0) (2023-10-11)

### Features

* Direct routing to correct pod ([#223](#223)) ([#229](#229)) ([#230](#230)) ([14168f9](14168f9))
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

3 participants