Commit graph

42414 commits

Author SHA1 Message Date
Ankush Menat
0e84fdaa6c build: bump RQ 2023-06-25 17:43:11 +05:30
Ankush Menat
1c27f99a11
Merge pull request #21475 from ankush/preload_modules
perf: pre-load common modules to reduce memory usage
2023-06-24 22:12:53 +05:30
Ankush Menat
af03b76c88 perf: Preload and share common python modules 2023-06-24 21:24:02 +05:30
Ankush Menat
793f4ebba3 perf: defer loading JWT 2023-06-24 19:50:08 +05:30
Ankush Menat
dc7620f0d8
Merge pull request #21474 from ankush/gc_freeze
perf: Freeze GC before forking Gunicorn workers
2023-06-24 17:41:59 +05:30
Ankush Menat
150c36c74d fix: collect before freezing 2023-06-24 17:36:10 +05:30
Ankush Menat
29d28a460f perf: Freeze GC right before starting background worker
BG worker forks are not CoW friendly. Freezing right before we start
worker should lessen overall memory usage. Though this isn't useful much
because at max you're sharing with 2 processes - master and horse.

WorkerPool can improve this benefit a lot by forking each worker from
master process and horse from forked processes. TBD when WorkerPool is
out of beta.
2023-06-24 17:06:23 +05:30
Ankush Menat
fbe3174914 perf: Bump alloc count to 7,000 for generation 0
This has overall 1-2% CPU usage reduction for little to no costs.
Benefits increase when doing bulk processing with lots of objects.
2023-06-24 17:02:45 +05:30
Ankush Menat
4f0a2e6e9c fix: move gc.freeze behind environ variable 2023-06-24 16:35:34 +05:30
Ankush Menat
32bd5d3e2c Revert "perf: defer many requests imports"
This reverts commit 71b44efcac.

This gets frequently imported from one place or another. Since with
gc.freeze we can mostly reuse the import from parent, let's just leave
it here.
2023-06-24 16:26:22 +05:30
Ankush Menat
cc43af984e fix: Only import LDAP if it's enabled
This is disabled on 99%+ sites, still incurs 3-4MB of memory hit on import of
ldap3.
2023-06-24 16:07:24 +05:30
Ankush Menat
423e781326 perf: Freeze GC before forking Gunicorn workers 2023-06-24 15:23:52 +05:30
Ankush Menat
278b6fc85a perf: defer QR code import 2023-06-24 15:22:01 +05:30
Ankush Menat
6a9c9bd89d perf: defer pydoc import 2023-06-24 15:22:01 +05:30
Ankush Menat
4c08689744 perf: defer psutil import 2023-06-24 15:22:01 +05:30
Ankush Menat
45f8aff909 perf: defer LDAP import 2023-06-24 15:22:01 +05:30
Ankush Menat
8a83226c60 perf: defer GoogleOAuth import 2023-06-24 15:22:01 +05:30
Ankush Menat
71b44efcac perf: defer many requests imports 2023-06-24 15:22:01 +05:30
Ankush Menat
4aa20c72c1 refactor: Simplify FrappeOAuth2Client
No need to override anything, use request.session in way it is intended.
2023-06-24 15:22:01 +05:30
Sagar Vora
54be05c18e
fix(Workspace): ignore is_hidden when importing standard workspaces (#21470) 2023-06-23 21:01:22 +05:30
Ankush Menat
c6419f52e2 perf: Move babel import to extract function
This is never used in production.

[skip ci]
2023-06-23 14:13:53 +05:30
Ankush Menat
8a37d6d278
perf: reduce memory usage of background processes (#21467)
* perf: defer translation.py imports

This indirectly imports babel which isn't really required most of the
time.

* perf: defer gzip import

* perf: move validate_and_sanitize_search_inputs

This causes all sorts of indirect imports and increases memory usage

* perf: defer requests module imports

* perf: defer system settings import

* perf: defer LOG_DOCTYPES import

Causes many indirect imports

* perf: defer update_site_config

* perf: defer notifications import

* perf: remove unused import

* perf: defer safe exec import

* test: memory usage overhead
2023-06-23 12:51:45 +05:30
Ankush Menat
fb11b5a1b0 fix(UX): better error message for Encryption key 2023-06-23 12:40:42 +05:30
Sayed Ayman
4ad98ecb7f
fix: use correct property name for filters in get_report_filters (#21465) 2023-06-23 01:56:52 +05:30
Ritwik Puri
e5dfb6d971
Merge pull request #21466 from barredterra/hooks-boilerplate
fix: hooks boilerplate
2023-06-23 01:53:44 +05:30
barredterra
15396ceb60 fix: add required_apps to hooks boilerplate 2023-06-22 15:48:04 +02:00
barredterra
d044b30522 fix: remove app_version from hooks boilerplate
It's not used by any frappe/erpnext code and linters complain about the
unused import
2023-06-22 15:47:34 +02:00
Ankush Menat
085eb41245
ci: use multiple python version in patch test (#21443)
* ci: bump pyenv action

* ci: set default python version in patch test

* ci: setup pyenv manually

* ci: replace pyenv with setup-action

* debug

* use multiple python versions directly

* Revert "debug"

This reverts commit 692cbc0c9a407b86647ee09079fdde1510f300d7.

* setup py with --python flag
2023-06-22 13:48:20 +05:30
Ankush Menat
4f70200bd5 chore: track update actions per doctype
[skip ci]
2023-06-22 12:10:43 +05:30
Ankush Menat
69220a9a9e fix(dx): Reset module onboarding progress
Useful while working on form tours to quickly reset progress

[skip ci]
2023-06-22 11:53:22 +05:30
Ernesto Ruiz
378c97871b
chore: Add translation to confirmation text on Update kanban_view.js (#21453)
[skip ci]
2023-06-22 11:21:30 +05:30
Ankush Menat
b3840596fc
test: mock github API calls (#21450)
[skip ci]
2023-06-21 16:33:09 +05:30
Ernesto Ruiz
7d352d7c34
chore: add translation to label on new doc in Update quick_entry.js (#21444)
[skip ci]
2023-06-21 15:53:17 +05:30
gavin
05893bef42
fix: Rename document/update title via toolbar (update_document_title API) (#21404)
* fix: update_document_title

* Fix broken socket event
* Fix broken title + name doc update

* fix: if only title updated then dont enqueue

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-06-21 15:46:09 +05:30
Suraj Shetty
1b0c2f03fa
Merge pull request #21394 from barredterra/fix-group-by 2023-06-21 11:59:45 +05:30
Dany Robert
4f3c0f6e99
feat: configurable amended document naming (#21414)
* feat: configurable amendment naming

* patch: set default amend naming

* chore: linters and document filter

* test: amended document naming

* refactor: use set_single_value

* chore: typo, fix copy

* fix(UX): move action button below table

* refactor: Series Counter -> Default Naming

The behaviour in this PR doesn't necessarily mean to apply naming series
it can be:
- Naming Series
- hash
- Naming Rule
- Some code

So the name was misleading.

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-06-20 21:37:08 +05:30
Ankush Menat
cbe8a41cff
build: Add responses as developer dependency (#21440)
Useful for mocking HTTP responses in tests
2023-06-20 19:50:51 +05:30
Raffael Meyer
49ee3a4b30
Merge branch 'develop' into fix-group-by 2023-06-20 14:45:35 +02:00
Alfredo Altamirano
c6b1b026c5
fix: data-import command fails with local files (#20521) (#21381)
* fix: data is retrieved from db instead of local file

* fix: data import command only accepts absolute path

* fix: revert expanduser

- Shells expand it. Works fine with bash/zsh
- Doesn't work anyway as click wont let you init a path that doesn't
  exist

* Revert "fix: data is retrieved from db instead of local file"

This reverts commit cbe50a26da61e01b5a9a7c51f8632defb0913aab.

* fix: allow local import if from console

---------

Co-authored-by: Alfredo Altamirano <Ahuahuachi@users.noreply.github.com>
Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-06-20 18:09:23 +05:30
Suraj Shetty
9c06d864c1 test: Add wait before checking for value 2023-06-20 15:08:44 +05:30
Smit Vora
db6a06d204
fix: make sure number is not zero for bankers_rounding (#21431)
* fix: make sure num is not zero for bankers_rounding

* test: rounding near zero

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-06-20 12:00:22 +05:30
David Arnold
4da6796b2d
feat: add style & onEachFeature function for geojson in geolocation controller (#21322)
This no-op function can be overriden / inherited in custom controllers
to craft richer map experiences
2023-06-20 11:54:22 +05:30
Suraj Shetty
c042a944bd
Merge pull request #21432 from surajshetty3416/fix-text-2 2023-06-20 11:33:56 +05:30
Suraj Shetty
ddadee3f3d test: Fix navigation test 2023-06-20 10:50:50 +05:30
Suraj Shetty
08bb03abd6 test(awesomebar): Remove unnecessary delay 2023-06-20 10:50:21 +05:30
Suraj Shetty
eb63faaf05 test: Change viewport to regular size 2023-06-20 10:30:37 +05:30
Ankush Menat
d0ba31c911
refactor!: Prefix all custom fieldnames created from Desk (#21355)
* fix: actualy remove special characterso

`or "_"` is always truthy, this code didn't do anything

* refactor!: Prefix all custom fieldnames created from Desk

 Why?
 - Custom and standard field clashes are frequent. This will prevent it
   from happening. E.g. recent `incoterm` field addition in ERPNext.
 - Apps/fixtures can still specify exact fieldnames

* test: custom field naming
2023-06-19 18:22:36 +05:30
Anand Baburajan
38960f4219
feat: migrate translations command (#21362)
* feat: migrate translations command

* chore: formatting
2023-06-19 18:19:07 +05:30
Ankush Menat
276b11d331 fix: ignore undefined fields on new doctype form 2023-06-19 18:07:23 +05:30
Ankush Menat
0e92fc9bf5 fix: Clear cache after role perm manager 2023-06-19 16:29:35 +05:30