-
Notifications
You must be signed in to change notification settings - Fork 39
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(ATS): send an internal notification when project config is updated #448
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added few questions. Otherwise changes LGTM.
return; | ||
} | ||
|
||
String sdkKey = config.getSdkKey(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a corner case in which this will cause a problem. That when sdkKey is not in the datafile but is used to fetch datafile from a custom URL?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if this is a valid scenario for android or not but we handled it in java-sdk.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mnoman09 A good point. This line is for after fetching remote datafile. Some CDN (or proxy server) datafiles of old projects may miss sdkKeys but those are obviously not using ODP integrations, so must be safe. I mean if they want to integrate ODP then it's expected to have sdkKey in the datafile too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got your point but I think even if the sdkKey exist in the datafile it can still cause the problem when the sdkKey used to download the datafile is different then what is in the datafile (Like we are doing in FSC using proxy server and using custom temporary sdkKeys). Notification will not trigger in that scenario.
In order to keep it consistent we need to somehow use the sdkKey which is used in NotificationRegistry (which is passed by user).
@@ -946,4 +947,34 @@ NotificationCenter getNotificationCenter() { | |||
|
|||
return null; | |||
} | |||
|
|||
void sendUpdateConfigNotification() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the function that we are going to expose to public or not? If yes then we should add public.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do not need to open to public. This one includes internal notification handling in addition to already-existing public notification interface.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am approving the PR. you check the reply on the comment if we believe it is a valid scenario then we need to handle it, otherwise we can merge the PR.
Summary
Test plan
Issues