-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
fix(Workspace): Clear bootinfo cache when creating a new workspace #21895
Merged
ankush
merged 1 commit into
frappe:develop
from
cogk:fix-clear-bootinfo-cache-on-workspace-creation
Aug 8, 2023
Merged
fix(Workspace): Clear bootinfo cache when creating a new workspace #21895
ankush
merged 1 commit into
frappe:develop
from
cogk:fix-clear-bootinfo-cache-on-workspace-creation
Aug 8, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cogk
requested review from
a team and
maharshivpatel
and removed request for
a team
August 1, 2023 17:19
github-actions
bot
added
the
add-test-cases
Add test case to validate fix or enhancement
label
Aug 1, 2023
ankush
reviewed
Aug 3, 2023
cogk
force-pushed
the
fix-clear-bootinfo-cache-on-workspace-creation
branch
from
August 4, 2023 15:49
0871311
to
881240e
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #21895 +/- ##
========================================
Coverage 61.81% 61.81%
========================================
Files 765 765
Lines 72996 73004 +8
Branches 6292 6292
========================================
+ Hits 45123 45130 +7
- Misses 24309 24310 +1
Partials 3564 3564
Flags with carried forward coverage won't be shown. Click here to find out more. |
ankush
approved these changes
Aug 8, 2023
ankush
added
backport version-14-hotfix
backport to version 14
and removed
add-test-cases
Add test case to validate fix or enhancement
labels
Aug 8, 2023
frappe-pr-bot
pushed a commit
that referenced
this pull request
Aug 9, 2023
# [14.44.0](v14.43.1...v14.44.0) (2023-08-09) ### Bug Fixes * added debounce for checking old and new password same or not ([76c6594](76c6594)) * added validation of (if old password === new password) ([f7a2c36](f7a2c36)) * allow cross child table links in dashboard ([d29b151](d29b151)) * autoincr status per doctype ([#21918](#21918)) ([#21920](#21920)) ([1fda93a](1fda93a)) * better UX ([ec7b78e](ec7b78e)) * center notes text in FileUploader ([#21902](#21902)) ([30e236c](30e236c)) * check before deleting prepared report ([#21950](#21950)) ([#21952](#21952)) ([41c7cd7](41c7cd7)) * check file permission before zipping ([#21934](#21934)) ([#21941](#21941)) ([ec71e07](ec71e07)) * debounce form refresh from realtime events ([#21905](#21905)) ([#21907](#21907)) ([5b221bf](5b221bf)) * Delete module folder on Module Def deletion ([#21857](#21857)) ([#21914](#21914)) ([4f29f39](4f29f39)) * disable activity log global search ([306b1b1](306b1b1)) * **DX:** Wrap print format errors (backport [#21944](#21944)) ([#21945](#21945)) ([0e56bfa](0e56bfa)) * fixed on click function ([6fc0439](6fc0439)) * grid don't remove search if filters are applied. ([c138e66](c138e66)) * ignore_user_type can be applied by System User (backport [#21990](#21990)) ([#21991](#21991)) ([66556d2](66556d2)) * include server script in recorder stack trace ([#21891](#21891)) ([af3dbbf](af3dbbf)) * keep privacy setting of attachments on amend ([#21911](#21911)) ([#21912](#21912)) ([1f586b2](1f586b2)) * Made Set Password Page Better ([91c112f](91c112f)) * only allow system manager to start backups ([7d0e4f1](7d0e4f1)) * support timespan filters for custom dashboard chart source ([67cf5c6](67cf5c6)) * update time_series on refresh, but not for custom chart_type ([2da5482](2da5482)) * validate fieldname in get_group_by_count ([#21932](#21932)) ([#21943](#21943)) ([a1c18a6](a1c18a6)) * validate type in share.get_users ([#21931](#21931)) ([5b42259](5b42259)) * workflow help ([482f004](482f004)) * **Workspace:** Clear bootinfo cache when creating a new workspace (backport [#21895](#21895)) ([#21964](#21964)) ([ba775ed](ba775ed)) ### Features * german translations for printed filters ([2443bf0](2443bf0)) * print all filters in report builder ([83b6fd2](83b6fd2)) ### Performance Improvements * **customize_form:** rebuild global search in bg ([dfbf859](dfbf859)) * lower limit for global search ([1b43c2d](1b43c2d))
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Just after creating a new Workspace, it suddenly seemed to not exist when reloading the page.
Indeed, available workspaces are not fetched directly from the database, but instead are found, when reloading, in bootinfo :
frappe.boot.allowed_workspaces
. However, because of a missing cache invalidation ofbootinfo
for the user, it becomes out-of-sync with the actual Workspaces, because the bootinfo is cached.A partial fix (e4c45dd) was recently merged, but it is more of a workaround, using localStorage.
Solution
Clear the bootinfo cache for the user when creating a private Workspace. (Could also do it when deleting/updating one?)
Drawbacks
I'm not sure if I should add some conditions like
if frappe.flags.in_install:
, I'm open to suggestions