-
Notifications
You must be signed in to change notification settings - Fork 1
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
PubSub already loaded console warning #124
Comments
When running the test cases, these console warnings come as a result of the singleton pattern being used in the PubSub package. According to this PR, it gives information on if PubSub is already initialised on the root level, that root instance should be used instead of overriding with an empty new one. After doing root cause analysis, I could pull some of the following observations:
Moreover, these console warnings merely provide information to reinforce singleton use of PubSub. Maybe instead of passing this information as console warning, it should be documented or set lower message priority level. |
(/me wears Community Project Manager hat.) @adamstankiewicz, thoughs on @ishahroz's findings? |
@ishahroz Thanks for investigating. It'd be great if we could set it as a lower message priority level; however, we don't control the code that's generating the console warning. Documentation won't really help reduce the noise in the test output in consuming applications. [clarification] It's not just the tests in For what it's worth, I noticed there's an existing PR up for /cc @arbrandes |
I'm marking this as "Blocked" in the Frontend Dev board. In particular, on the upstream merge of the PR @adamstankiewicz pointed out. |
Upstream commented on the PR: mroderick/PubSubJS#220 (comment) @adamstankiewicz, @ishahroz, what are your takes? |
@adamstankiewicz, @ishahroz: ping! See above comment: looks like upstream reacted. |
@arbrandes @ishahroz I've responded to the upstream comment, and agree that utilizing a We could set this new environment variable to "true" for all MFEs via I think we have two options here:
|
Thanks for taking the time to engage with upstream, @adamstankiewicz! I very much prefer the upstream contribution approach, but I'm not sure @ishahroz would be available to take on the work (includes the back-and-forth until it is merged, etc). If not, we could leave an issue for the upstreaming open for somebody in our community to take on, and go the patch-package route for a short-term, temporary fix. |
FWIW, I opened a PR with the environment variable fix upstream here. I'll take on any back-and-forth until it gets merged. The next steps here would be to:
|
Upstream's been silent on the PR. Pinged them. |
In
@edx/frontend-platform
, running the tests, there are many console warnings about "PubSub already loaded, using existing version". These console warnings can also be seen in some MFE test suites, as well.AC
The text was updated successfully, but these errors were encountered: