← 输入框|github.com|刷新
Skip to content

fix: add notification center registry - #413

Merged
Andy Leap (andrewleap-optimizely) merged 9 commits into
masterfrom
aleap/add_notification_registry
Feb 3, 2023
Merged

Andy Leap (andrewleap-optimizely) merged 9 commits into
masterfrom
aleap/add_notification_registry

Conversation

@andrewleap-optimizely

@andrewleap-optimizely Andy Leap (andrewleap-optimizely) commented Jan 19, 2023 •

Copy link
Copy Markdown
Contributor

Summary

Create a private registry of NotificationCenters for internal use.

  • Remove dependence on user supplied NotificationCenter.
  • Resolve issue of notifications being registered with one NotificationCenter and sent to a different one.

Test plan

added tests to

  • test_notification_center_registry.py
  • test_optimizely.py
  • test_optimizely_config.py
  • test_optimizely_factory.py

Ticket

FSSDK-8773

@jaeopt Jae Kim (jaeopt) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes look good. I see a case when sdk_key is not provided. See my comments.

Comment thread optimizely/config_manager.py Resolved
Comment thread optimizely/optimizely.py Outdated
if not self.sdk_settings.odp_disabled:
self._update_odp_config_on_datafile_update()
self.odp_manager: OdpManager
self.setup_odp(sdk_key or self.config_manager.get_sdk_key())

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I see 2 changes related to "sdk_key" in here and in config_manager, both optional.
If none of them required, then we may have a case sdk_key is null.
As noted in my comment in config_manager, we may not need get_sdk_key in config_manager.
We can consider "sdk_key" in optimizely from optional to required while removing the changes in config_manager.

@Mat001 Matjaz Pirnovar (Mat001) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks ok. One typo

@jaeopt Jae Kim (jaeopt) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@jaeopt

Copy link
Copy Markdown
Contributor

Andy Leap (@andrewleap-optimizely) can we keep a note about this breaking change. We should release a major version bump with this note.

@andrewleap-optimizely
Andy Leap (andrewleap-optimizely) deleted the aleap/add_notification_registry branch February 3, 2023 21:56
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.

3 participants