Commit graph

3417 commits

Author SHA1 Message Date
Ankush Menat
f8abd09ab9
perf: avoid two layer cache of timezone (#26340)
It's same thing, system settings are always fetched, no idea what's point of additional layer of caching on top of it.
2024-05-06 13:12:41 +00:00
Ankush Menat
724d886f88
perf: Reduce 1 redis call while dumping monitor logs (#26337) 2024-05-06 12:53:36 +00:00
Ankush Menat
45026aed37 feat: give higher priority to minor versions
Major versions will be shown when minor updates are exhausted only.
2024-05-04 15:08:35 +05:30
Ankush Menat
a234e79790 refactor: misc changes
- Move sys setting check to server side
- tomli import handling
2024-05-04 15:08:34 +05:30
Ankush Menat
e0c171b23b feat: show security issues count
chore: conflicts
2024-05-04 15:08:34 +05:30
Ankush Menat
5ca14bb171 feat: FC specific update notifications 2024-05-04 15:08:34 +05:30
Ankush Menat
330a1b2044 fix: update notifier never running 2024-05-04 12:28:19 +05:30
Rohan
4bfcccfd11
fix: ignore unittest.mock objects during typing validations (#26301)
* fix: ignore unittest.mock objects during typing validations

* fix: check against base mock class

---------

Co-authored-by: Rohan Bansal <rohan@agritheory.dev>
2024-05-02 11:00:02 +00:00
Ankush Menat
b2ef2cd506 feat: show oldest unscheduled job in health report 2024-05-02 13:39:51 +05:30
Ankush Menat
b0aaeb5096 fix: Dont let one invalid cron fail scheduler
Scenario:
- One bad cron job exists
- When it fails nothing after that job is enqueued.

After this fix, that failure is skipped and rest of the jobs are enqueued.
2024-05-02 13:36:14 +05:30
Ankush Menat
ee64b2cb6c
fix!: Only use webserver_port in developer mode (#26268) 2024-05-01 12:11:01 +05:30
Maharshi Patel
72b1db0ae5
revert: fix: pointless conditions about systemd/supervisor (#26267)
commit added port numbers in urls which broke links on fc.
2024-04-30 20:31:48 +00:00
Maharshi Patel
6a6ded156f
chore: warn if wkhtmltopdf is invalid (#26174)
* chore: warn if wkhtmltopdf is invalid

wkhtmltopdf ( with patched qt ) is required to generate pdfs properly.
when user clicks on PDF, pdf will be generated and downloaded.
however, on print preview page warning will be shown.

* chore: refactor based on review comments

* chore: return False incase of exception

* chore: refactor and better naming

Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
2024-04-30 10:36:56 +00:00
Ankush Menat
7b0074e059
refactor!: override_doctype -> Must extend base class (#26152)
* fix: pointless conditions about systemd/supervisor

What does this have to do with hostname?

* fix!: Overriden doctypes must inherit same base class

There is almost never a real need to completely override a class. After
this change we'll only allow extending and not overriding completely.
2024-04-29 10:21:53 +00:00
Akhil Narang
ad55f5909c
fix(backup): delete failed backup even if something fails during the backup process
Not just rollback _after_ a step

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-04-24 16:23:38 +05:30
Raffael Meyer
2ec9ef5bf3
fix: handle case where mimetype is None (#26131) 2024-04-23 14:24:49 +00:00
Akhil Narang
edad15ef9c
chore(sentry): exclude PermissionError as well
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-04-22 18:21:43 +05:30
Ankush Menat
d40b2a2517 fix(UX): help links and relative URLs
also closes https://github.com/frappe/frappe/issues/23020
2024-04-22 12:10:28 +05:30
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