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

clean Luigi store #3964

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

clean Luigi store #3964

wants to merge 6 commits into from

Conversation

JohannesDoberer
Copy link
Contributor

We do not clear the subscriptions that we store in Luigi store. That leads to multiple initialization of route handling.

How to reproduce:
Browser console:

var cfg = Luigi.getConfig();
Luigi.unload();
Luigi.setConfig(cfg);
Luigi.unload();
Luigi.setConfig(cfg);

Result:
=> navigate: luigi-client did not respond, using fallback by replacing iframe

Root cause:
How to check the multiple initialization of route handling:

  1. add a console log here console.log('enableRouting')
  2. start simpledev
  3. browser console
var cfg = Luigi.getConfig();
Luigi.unload();
Luigi.setConfig(cfg);
Luigi.unload();
Luigi.setConfig(cfg);

// when you do this more often you will see an increase of the console logs 'enableRouting'
Luigi.unload()
Luigi.setConfig(cfg);
Luigi.unload()
Luigi.setConfig(cfg);
....

@JohannesDoberer JohannesDoberer added the bug Something isn't working label Sep 30, 2024
Copy link
Contributor

@walmazacn walmazacn left a comment

Choose a reason for hiding this comment

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

Clearing Luigi store works as expected - small unit test would be helpful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants