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

Merged
merged 8 commits into from
Oct 1, 2024
Merged

Clean Luigi store #3964

merged 8 commits into from
Oct 1, 2024

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

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.

Looks good

@JohannesDoberer JohannesDoberer changed the title clean Luigi store Clean Luigi store Oct 1, 2024
@JohannesDoberer JohannesDoberer merged commit fa3a695 into main Oct 1, 2024
12 checks passed
@JohannesDoberer JohannesDoberer deleted the unload-fn-improvement branch October 1, 2024 13:37
This was referenced Oct 1, 2024
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