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 custom baseURL config for resolve #62

Merged
merged 7 commits into from
Sep 10, 2024
Merged

Conversation

fabriziodemaria
Copy link
Member

@fabriziodemaria fabriziodemaria commented Sep 9, 2024

Changes

  • Add custom baseURL configuration for flag resolve
  • Removes the Region selection, now defaulted to the global API Confidence endpoint.
  • The Demo App uses the local implementation of the SDK rather than a published version, to facilitate local testing

How was it tested

This setup has been manually tested with the Demo App both in remote and side-car environments.

Breaking Changes

  • Region is now removed, so if the integration is using this configuration it will need to be updated to fix compilation issues

Signed-off-by: Fabrizio Demaria <[email protected]>
Copy link
Member

@nicklasl nicklasl left a comment

Choose a reason for hiding this comment

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

LGTM. And good that you marked it breaking.
When you merge this, please add some details in the additional commit description on what is the breaking part and how we customers are envisioned to migrate. Doesn't need to be anything long but I think it would be nice to have that part in the release notes.

@fabriziodemaria fabriziodemaria changed the title feat!: Add custom URL configuration feat!: Add custom baseURL config for resolve Sep 10, 2024
Comment on lines +60 to +62
if config.APIResolveBaseUrl == "" {
e.confidence.Config.APIResolveBaseUrl = DefaultAPIResolveBaseUrl
}
Copy link
Member Author

@fabriziodemaria fabriziodemaria Sep 10, 2024

Choose a reason for hiding this comment

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

c.NewConfidenceBuilder().SetAPIConfig(c.APIConfig{APIKey: "API_KEY"}).Build()

Instantiating the APIConfig{} struct directly (instead of using our constructors NewAPIConfig*) as the example causes the baseUrl to be an empty string. This code is a way to counteract that

@fabriziodemaria fabriziodemaria merged commit 782cdca into main Sep 10, 2024
5 checks passed
@fabriziodemaria fabriziodemaria deleted the url-config branch September 10, 2024 11:12
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