Commit graph

3399 commits

Author SHA1 Message Date
Rutwik Hiwalkar
7b39a9bbd3
feat: add vim and emacs mode for ace-editor (#25936) 2024-04-16 11:35:58 +05:30
Raffael Meyer
37cef2ec86
feat!: simplify admin password prompt for new site (#25937) 2024-04-13 13:10:37 +05:30
Ankush Menat
822679246c fix: use workspace title instead of name
this is how workspaces work 🤷
2024-04-11 19:42:48 +05:30
Ankush Menat
b47d9d57fb
fix: handle empty style tag (#25910) 2024-04-11 10:06:36 +00:00
Ankush Menat
0692496fd3
fix: log unhandled exceptions in monitor log (#25897) 2024-04-10 08:04:32 +00:00
Akhil Narang
ea1c8910e6
feat: delete failed backups
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-04-10 12:57:16 +05:30
Akhil Narang
5da663d5c2
chore: cleanup get_recent_backup()
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-04-10 12:57:16 +05:30
Akhil Narang
38af00f0db
fix(sentry): correctly skip frappe.ValidationError and its children
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-04-08 16:03:13 +05:30
Akhil Narang
bf931598a2
Revert "Merge pull request #25755 from akhilnarang/optional-skip-msgprint"
This reverts commit f8121b99df, reversing
changes made to 14e2d95947.
2024-04-01 21:42:12 +05:30
Akhil Narang
ca83ad580c
feat: allow skipping msgprint
If we're handling the exception on our own, we don't need to show the user anything
Example: https://github.com/frappe/frappe/blob/version-15/frappe/desk/doctype/event/event.py#L398

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-04-01 14:21:47 +05:30
Ankush Menat
ea5e1b61ad
fix: cint -> avoid precision loss if already integer (#25735) 2024-03-29 22:31:53 +05:30
David
39d4318a27
feat: enable db socket connection 2024-03-29 10:29:50 +01:00
Akhil Narang
8658196650
fix(enqueue): pass the original method argument here
Don't pass the stringified version - this is what goes to RQ, and the string we construct isn't always "correct"

For example, 87d121f47a/frappe/email/doctype/email_queue/email_queue.py (L735-L736) generates `frappe.email.doctype.email_queue.email_queue.QueueBuilder.send_emails` which will result in `ModuleNotFoundError: No module named 'frappe.email.doctype.email_queue.email_queue.QueueBuilder'; 'frappe.email.doctype.email_queue.email_queue' is not a package`

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-03-29 14:05:33 +05:30
Akhil Narang
1847e9cae8
fix: pass function as lambda
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-03-29 12:00:25 +05:30
Akhil Narang
722bb3b0fc
Merge pull request #25659 from marination/wkhtml-options
fix: Use CssParser to correctly pass options to wkhtmltopdf
2024-03-27 17:15:36 +05:30
marination
96667b1bab chore: Use dict comprehension instead of nested loops 2024-03-27 12:00:49 +01:00
Kevin Shenk
12f193231d
refactor: enable website utils in safe_exec (#25365)
Frappe Builder uses safe_exec to fetch dynamic data, and there are a few functions in website utilities which would be nice to have on that end, get_html_content_based_on_type especially. I added a few others which seemed useful and safe as well.
2024-03-27 15:26:28 +05:30
Ankush Menat
071e269548 fix!: Switch to creation as default sort order 2024-03-27 11:18:28 +05:30
marination
5dbcbbb915 fix: Use CssParser to correctly pass options to wkhtmltopdf
- Regex incorrectly fetches .print-format's child styles and also extracts the wrong attribute value
- A CssParser is more maintainable and more readable as well as less prone to errors while extracting values
- Method: We extract style tag contents out of the html and tokenize them. We then filter the styles for the right selector and extract the attributes we want from them.
- This way we make sure that the right value is extracted and only the ones applicable to .print-format directly
2024-03-26 10:33:35 +01:00
Akash
aba2b7808f fix: add missing arg while invoking _download_multi_pdf
(cherry picked from commit f82ed9fe11831d78e612ccd5db189f61439f1026)
2024-03-26 05:41:02 +00:00
Akhil Narang
bd6eaab00e
feat: drop sentry's RQ integration
It overrides what we set with information that isn't really useful for us.
Set a more readable method name, and add in some additional job metadata.

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-03-22 18:51:38 +05:30
Shariq Ansari
d7dbf774e7
Merge pull request #25257 from cogk/feat-default-workspace
feat(workspace): Allow user to choose a default workspace
2024-03-20 17:56:20 +05:30
Revant Nandgaonkar
e9ece3b283 feat: connect to redis sentinel for redis queue 2024-03-18 06:10:31 +00:00
Ankush Menat
b7a5884344 perf: import sentinal locally 2024-03-15 11:31:04 +05:30
Ankush Menat
0d6ec13b0b perf: preload modules in worker pool 2024-03-15 11:23:04 +05:30
Ankush Menat
322671766d perf: avoid importing posthog if not required
Avoids 7MB of overhead and cleanup costs for each background job 🎉
2024-03-15 10:51:17 +05:30
Revant Nandgaonkar
77618cde1f
feat: connect to redis sentinel for redis cache (#25398) 2024-03-14 13:54:46 +05:30
Akhil Narang
3f524be635
fix(json_handler): handle uuid.UUID
Resolves #25242

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-03-13 17:27:30 +05:30
Akhil Narang
6a5af14049
fix: unsubscribe from task after completion
Also update event name to be more logical

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-03-13 16:38:55 +05:30
Akhil Narang
0ec3e4a683
refactor: add in a new endpoint for background printing
Let the original one stay as-is for backward compatibility

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-03-13 16:38:55 +05:30
Akhil Narang
5e37ac740e
refactor(bulk_print): choose queue dynamically
Update docstrings and type hints a bit

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-03-13 16:38:55 +05:30
Akhil Narang
508e4d9ae3
fix: make filename more user-friendly
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-03-13 16:38:55 +05:30
Akhil Narang
5a6bff9de7
fix: let backend generate task ID
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-03-13 16:38:55 +05:30
Akhil Narang
9bf22b79e4
fix: update message
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-03-13 16:38:55 +05:30
Akhil Narang
bf6cb1a49f
feat: move bulk print operation to the background
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-03-13 16:38:55 +05:30
Ankush Menat
8bbb69a883
fix: Prevent multiple schedulers from running on same bench (#25340) 2024-03-11 14:12:31 +00:00
barredterra
5558cb0739 fix: linter config in boilerplate 2024-03-10 20:43:39 +01:00
Ankush Menat
010de19ac4
Merge branch 'develop' into update-invalid-encryption-key-message 2024-03-10 12:51:22 +05:30
Ankush Menat
05dca169e3 fix: delete doctype cache before starting migration 2024-03-10 12:34:57 +05:30
Akhil Narang
1032d9b4da
chore: include a link to FC docs regarding what to do with encryption key for restored sites
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-03-07 12:12:05 +05:30
Corentin Flr
3ec47b0975
feat(workspace): Allow user to choose a default workspace 2024-03-06 11:15:53 +01:00
Ankush Menat
ebd47429a5 chore: grammar?
This looks weird without fullstop when there are suggestions
2024-03-04 16:32:48 +05:30
Ankush Menat
ef5a173db0
fix: misleading CLI error message for missing command (#25049) 2024-03-04 10:45:46 +00:00
Suraj Shetty
b398377739
Merge branch 'develop' into fix-email-validation 2024-03-02 21:23:24 +05:30
Suraj Shetty
ec4261bd77 fix: Do not check for email validation on empty string 2024-03-02 21:20:51 +05:30
Maxim Sysoev
eff50e1cd3
fix: filter Implementation is set operator (#25182)
* Implementation is set operator. fix issue #25180

* Refactored filtrer operator `is`,
Add tests

* fix: Correct implementation for `is set`

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2024-03-02 13:59:30 +00:00
Ankush Menat
f7bff58935
fix: use name for RQ worker instead of PID (#25175)
Also avoid complex naming schemes.
2024-02-29 14:38:48 +00:00
Akhil Narang
16489b342b
Merge pull request #25125 from akhilnarang/bg-job-docstring
refactor: update docstring and typehints for functions
2024-02-28 11:30:43 +05:30
Akhil Narang
1ca98566d4
fix(background_jobs): update type hint and docstring
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-02-27 12:20:13 +05:30
Corentin Flr
0934dfea93
fix(formatters): Translate Select value in format_value (#24951) 2024-02-26 21:05:44 +05:30