Skip to content

fix api host being overwritten by default value #80

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

Merged
merged 3 commits into from
Mar 24, 2022

Conversation

wenxi-zeng
Copy link
Contributor

  • fix api host being overwritten by default value
  • now the apiHost value honors in the following order: remote apiHost > local modified apiHost > default apiHost

@@ -95,8 +95,8 @@ class SegmentDestination : DestinationPlugin(), VersionedPlugin {
override fun update(settings: Settings, type: Plugin.UpdateType) {
super.update(settings, type)
if (settings.hasIntegrationSettings(this)) {
settings.destinationSettings<SegmentSettings>(key)?.let {
pipeline.apiHost = it.apiHost
settings.destinationSettings<SegmentSettings>(key)?.apiHost?.let {
Copy link
Contributor

Choose a reason for hiding this comment

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

OMG thats so subtle of a difference 😓 . Lets add a comment here indicating that we only want to populate the apiHost value if it exists

@wenxi-zeng wenxi-zeng merged commit a47a0e8 into main Mar 24, 2022
@wenxi-zeng wenxi-zeng deleted the wenxi/fix-apiHost-being-overwritten branch March 24, 2022 18:44
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