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

Cancel running requests when discarding or publishing content #7037

Merged
merged 2 commits into from
Feb 28, 2025

Conversation

bastianallgeier
Copy link
Member

@bastianallgeier bastianallgeier commented Feb 27, 2025

Description

This PR makes sure that discard and publish requests cancel ongoing or schedule save requests properly, to avoid race conditions.

Summary of changes

  • The method to cancel throttled functions
  • New panel.content.cancelSaving() method
  • panel.content.discard() and panel.content.publish() cancel any ongoing or scheduled save requests. They also no longer can be executed for other views than the current one.
  • panel.content.save() no longer sets the isProcessing flag. Otherwise, discard and publish will be blocked.

Ready?

  • In-code documentation (wherever needed)
  • Unit tests for fixed bug/feature
  • Tests and CI checks all pass

For review team

  • Add lab and/or sandbox examples (wherever helpful)
  • Add changes & docs to release notes draft in Notion

@afbora
Copy link
Member

afbora commented Feb 27, 2025

If I'm missing nothing, works great for me 🎉

@bastianallgeier bastianallgeier marked this pull request as ready for review February 28, 2025 09:23
@bastianallgeier bastianallgeier merged commit a84f758 into v5/develop Feb 28, 2025
4 checks passed
@bastianallgeier bastianallgeier deleted the v5/fix/cancel-running-requests branch February 28, 2025 09:24
@bastianallgeier
Copy link
Member Author

I think we can never know 100% if we miss something until more real-life tests are made during the beta. But it's great to hear that you also don't run into further issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants