-
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: stale frappe.local
#20695
Merged
Merged
fix: stale frappe.local
#20695
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
Co-Authored-By: Aditya Hase <aditya@adityahase.com>
To ensure that any one bad request can not completely cause recurring loop of broken requests due to bad locals, we just force-init locals on every request.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #20695 +/- ##
========================================
Coverage 63.92% 63.92%
========================================
Files 758 758
Lines 68755 68761 +6
Branches 6208 6208
========================================
+ Hits 43952 43956 +4
- Misses 21279 21281 +2
Partials 3524 3524
Flags with carried forward coverage won't be shown. Click here to find out more. |
mergify bot
pushed a commit
that referenced
this pull request
Apr 14, 2023
* fix: stale `frappe.local` Co-Authored-By: Aditya Hase <aditya@adityahase.com> * fix: force re-init in request To ensure that any one bad request can not completely cause recurring loop of broken requests due to bad locals, we just force-init locals on every request. --------- Co-authored-by: Aditya Hase <aditya@adityahase.com> (cherry picked from commit 1e9ede4) # Conflicts: # frappe/__init__.py # frappe/app.py
mergify bot
pushed a commit
that referenced
this pull request
Apr 14, 2023
* fix: stale `frappe.local` Co-Authored-By: Aditya Hase <aditya@adityahase.com> * fix: force re-init in request To ensure that any one bad request can not completely cause recurring loop of broken requests due to bad locals, we just force-init locals on every request. --------- Co-authored-by: Aditya Hase <aditya@adityahase.com> (cherry picked from commit 1e9ede4)
This was referenced Apr 14, 2023
ankush
added a commit
that referenced
this pull request
Apr 14, 2023
* fix: stale `frappe.local` Co-Authored-By: Aditya Hase <aditya@adityahase.com> * fix: force re-init in request To ensure that any one bad request can not completely cause recurring loop of broken requests due to bad locals, we just force-init locals on every request. --------- Co-authored-by: Aditya Hase <aditya@adityahase.com> (cherry picked from commit 1e9ede4) Co-authored-by: Ankush Menat <ankush@frappe.io>
ankush
added a commit
that referenced
this pull request
Apr 14, 2023
* fix: stale `frappe.local` (#20695) * fix: stale `frappe.local` Co-Authored-By: Aditya Hase <aditya@adityahase.com> * fix: force re-init in request To ensure that any one bad request can not completely cause recurring loop of broken requests due to bad locals, we just force-init locals on every request. --------- Co-authored-by: Aditya Hase <aditya@adityahase.com> (cherry picked from commit 1e9ede4) # Conflicts: # frappe/__init__.py # frappe/app.py * chore: conflicts --------- Co-authored-by: Ankush Menat <ankush@frappe.io>
frappe-pr-bot
pushed a commit
that referenced
this pull request
Apr 18, 2023
# [14.33.0](v14.32.1...v14.33.0) (2023-04-18) ### Bug Fixes * allow filter values to be saved in custom report ([295d2b8](295d2b8)) * allow workflow action master rename ([2730f22](2730f22)) * bump poplib limit ([#20739](#20739)) ([#20740](#20740)) ([a58ef7a](a58ef7a)) * check communication subject existence before converting to text ([#20738](#20738)) ([#20748](#20748)) ([3d047b4](3d047b4)) * clear all filters when in list view (backport [#20342](#20342)) ([#20746](#20746)) ([54d0dca](54d0dca)) * consider user email if send me a copy is checked ([#20627](#20627)) ([#20655](#20655)) ([3dc215d](3dc215d)) * **export:** Use fieldname if label is not set ([f497557](f497557)) * filter with capitalized operator was getting bypassed (backport [#20682](#20682)) ([#20684](#20684)) ([7831866](7831866)) * format filter values in report print view (backport [#20717](#20717)) ([#20752](#20752)) ([83fdb2e](83fdb2e)) * group buttons are overlapping (backport [#20671](#20671)) ([#20687](#20687)) ([149eed7](149eed7)) * Hide dropdown menu on click ([454f3a7](454f3a7)) * Load doc before checking permission ([a8348ce](a8348ce)) * make `owner` restricted ([8ad7ddb](8ad7ddb)) * Patch to update Background Jobs URL ([67add11](67add11)) * prioritize modal over freeze in grid-form ([953b331](953b331)) * Redirect Background Jobs to RQ Jobs ([2cc1092](2cc1092)) * Remove Background Jobs from dropdown ([0c7009c](0c7009c)) * remove desk access for Guest in post_model_sync ([#20719](#20719)) ([#20720](#20720)) ([97e0836](97e0836)) * remove guest permission from language ([#20677](#20677)) ([#20691](#20691)) ([de3b484](de3b484)) * Resolve conflicts ([a66fa64](a66fa64)) * Resolve conflicts ([abacaba](abacaba)) * route to form if name has slashes in it ([ae7d693](ae7d693)) * Show background jobs only to permitted users ([c065b2b](c065b2b)) * stale `frappe.local` ([#20695](#20695)) ([#20701](#20701)) ([2715d2d](2715d2d)) * update property if field exist ([3f10e63](3f10e63)) * use frappe.log_error in EmailServer exception handling ([25281e3](25281e3)) * **UX:** workspace breadcrumbs based on history ([#20529](#20529)) ([#20661](#20661)) ([260ef71](260ef71)) ### Features * redis cache decorator ([#20452](#20452)) ([3dff558](3dff558))
frappe-pr-bot
pushed a commit
that referenced
this pull request
Apr 18, 2023
# [13.54.0](v13.53.2...v13.54.0) (2023-04-18) ### Bug Fixes * allow filter values to be saved in custom report ([2499aba](2499aba)) * allow workflow action master rename ([afc05c4](afc05c4)) * bulk update (backport [#20522](#20522)) ([8e51fb0](8e51fb0)) * clear all filters when in list view (backport [#20342](#20342)) ([#20747](#20747)) ([8fa1580](8fa1580)) * filter with capitalized operator was getting bypassed (backport [#20682](#20682)) ([#20683](#20683)) ([12cd78d](12cd78d)) * group buttons are overlapping (backport [#20671](#20671)) ([#20688](#20688)) ([b0183ed](b0183ed)) * Initialize "r" to avoid UnboundLocalError ([#19630](#19630)) ([#20758](#20758)) ([c852197](c852197)) * prioritize modal over freeze in grid-form ([ed85ea2](ed85ea2)) * remove guest permission from language (backport [#20677](#20677)) ([#20690](#20690)) ([2553a7e](2553a7e)) * Remove unnecessary code to avoid timestamp conflict ([410d976](410d976)) * stale `frappe.local` (backport [#20695](#20695)) ([#20700](#20700)) ([bfd9dd0](bfd9dd0)) * update property if field exist ([8171c65](8171c65)) ### Features * custom info in frappe monitor (backport [#18214](#18214)) ([#20686](#20686)) ([87d52f5](87d52f5)), closes [#18259](#18259)
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.
It seems any exception thrown in
finally
block prevent locals from releasing, which means subsequent requests can end up serving with incorrect locals.frappe/frappe/__init__.py
Lines 187 to 188 in 6522021
Full context: https://gameplan.frappe.cloud/g/frappe-cloud/projects/86/discussion/2250/
Credit: @adityahase for finding root cause.