Commit graph

840 commits

Author SHA1 Message Date
Ankush Menat
bd2dc42b94 perf: speed up changelog fetching
- implicit limit
- bench level cache for each app
2024-04-08 18:24:38 +05:30
Ankush Menat
d2b38666f6 refactor: fetch changelog in background once a week 2024-04-08 18:24:38 +05:30
Ankush Menat
8d9304abbe Merge branch 'develop' into whats-new 2024-04-08 16:32:15 +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
Ankush Menat
cfeb1db3f5 fix: ignore route history and access log from link check 2024-03-10 12:59:22 +05:30
Shankarv19bcr
5ef208d1f1 fix: update file attached_to details in submitted doc 2024-02-28 14:21:42 +05:30
Ankush Menat
de9ac89748 style: re-format with ruff 2024-02-05 18:53:33 +05:30
Ankush Menat
dd839e4d50
fix: lower default retention periods (#24697)
These can still be configured to different number. We are just changing
defaults. Why?

- Scheduled job log - errors get logged in error log anyway. Success log
  isn't that useful of 90 days?
- Prepared report - most reports are expired in a day or max a week.
  Rarely last month's report makes any sense today.
2024-02-02 17:33:58 +05:30
Ankush Menat
9620a3c596 Merge branch 'develop' into po-translation 2024-01-10 16:17:47 +05:30
Akhil Narang
35ea093b51
feat: support background jobs in recorder
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-01-04 15:51:26 +05:30
Akhil Narang
64b63d5969
fix(sentry): don't set context if not enabled
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-12-27 11:38:01 +05:30
Akhil Narang
067104ca9c
refactor(sentry): sync up with FC implementation
Co-authored-by: Aditya Hase <aditya@adityahase.com>
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-12-26 12:30:10 +05:30
Ankush Menat
91cebdace8 Merge branch 'develop' into po-translation 2023-12-02 19:43:32 +05:30
Ankush Menat
52686f79cb refactor: code cleanup
- better boot config name
- send sentry after - because frappe namespce doesn't exist if it starts
  first
- remove import in app.py because __init__ is always imported so no
  need.
- leave telemetry JS always present, this is used even when telemetry is
  not enabled.
2023-11-30 17:40:53 +05:30
Akhil Narang
9a0a5468c5 feat: setup sentry integration
Inspired primarily from sentry's generic WSGI integration

Environment variable `FRAPPE_SENTRY_DSN` needs to be enabled as well
as explicit opt-in from the user's side in system sid telemetry
settings

Conditionally include telemetry JS bundles

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-11-30 17:13:41 +05:30
Ankush Menat
a7137bdeaa feat: client side error reporting + sentry
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-11-30 17:13:41 +05:30
Ankush Menat
c23771475c
refactor: Use hooks to specify default log clearing (#23507) 2023-11-30 13:06:29 +05:30
barredterra
67404e0cd0 Merge branch 'develop' into po-translation 2023-11-06 19:40:25 +01:00
Raffael Meyer
f0155674a5
refactor!: remove redundant sending of translations (#22962)
* chore!: remove redundant translation

* refactor!: remove "get_translated_dict" hook

Instead, include the results from
`frappe.geo.country_info.get_translated_dict` in `get_all_translations`.

* test: money_in_words uses translated currency

... and now we have translations.

* Revert "test: money_in_words uses translated currency"

This reverts commit e07d594ac1ce4b120c0fceb5d23377cb981fe820.

* refactor!: stop translating timezone and currency

* refactor: rename `get_translated_dict`

... to `get_translated_countries`
2023-11-02 20:04:14 +05:30
barredterra
d969c1aa3a Merge remote-tracking branch 'upstream/develop' into po-translation 2023-10-29 01:34:14 +02:00
Ankush Menat
287e13522c
fix: ignore workspace links on delete (#22895)
These can be manually modified later. It's not important to completely
block and prevent deletion.
2023-10-25 07:05:37 +00:00
Ankush Menat
db3e4c9cfc
fix: Check if note has permission (#22750) 2023-10-16 16:43:47 +05:30
barredterra
e212cad44e refactor: move navbar and help items to hooks 2023-10-15 19:23:44 +02:00
barredterra
ed2290d1d6 Merge branch 'develop' into feat/improve-openid-connect-devx 2023-10-07 15:22:59 +02:00
Ankush Menat
d7a9d0111c
perf: lazy load SVG icons (#22517)
| Metric                             | Before | After | Change    |
| ---                                | ---    | ---   | ---       |
| app.html first response size       | 421kb  | 106kb | -75% (!)  |
| First response duration            | 60ms   | 40ms  | -33%      |

huge thanks to @cogk for doing most of the work for this PR on this issue: https://github.com/frappe/frappe/issues/17449#issuecomment-1728328726

Co-authored-by: Corentin Flr <10946971+cogk@users.noreply.github.com>
2023-09-23 15:13:43 +05:30
Ankush Menat
8635daf425
fix: duplicate icons (#22516) 2023-09-23 12:51:20 +05:30
Ankush Menat
59d1eefa61 refactor: move unhandled email to log settings 2023-09-23 11:23:53 +05:30
Corentin Flr
41d30e7213
feat: Add custom icons with the app_include_icons hook (#22254)
* feat: Add custom icons with the `app_include_icons` hook

These custom icons are available on the desk only. They can be picked in the `ControlIcon` picker.

Co-authored-by: Abraham Kalungi <85731451+kalungia@users.noreply.github.com>

* fix: skip conf for including icons

* test: Fix test_include_icons

---------

Co-authored-by: Abraham Kalungi <85731451+kalungia@users.noreply.github.com>
Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
2023-09-20 20:23:17 +05:30
David Arnold
64a09be958
Merge branch 'develop' into feat/improve-openid-connect-devx 2023-09-16 09:58:53 +02:00
David Arnold
5e7ff1c81d
fix: add well-known openid-configuration redirect 2023-09-16 09:52:45 +02:00
Ankush Menat
530c47ffe5
feat: after_response callback manager (#22398)
* feat: `after_response` callback manager

* perf: defer closing DB connection

* refactor: simplify after response hooks

* wip

* example usage

---------

Co-authored-by: Sagar Vora <sagar@resilient.tech>

* fix: Log request end if not already

---------

Co-authored-by: Sagar Vora <sagar@resilient.tech>
2023-09-14 10:56:08 +00:00
Ankush Menat
49b5ad8143 Merge branch 'develop' into whats-new 2023-09-10 13:22:55 +05:30
Ankush Menat
8176b86b25 fix: notification_settings has_permission hooks 2023-08-29 13:26:48 +05:30
barredterra
68d984dbb2 fix(Assignment Rule): run on additional events
- on_cancel
- on_update_after_submit
2023-08-17 13:10:03 +02:00
barredterra
63aded91f9 Revert "fix: run assignment rule on change"
This reverts commit 88cbba5f21.
2023-08-17 13:02:41 +02:00
barredterra
88cbba5f21 fix: run assignment rule on change 2023-08-15 14:01:40 +02:00
Ankush Menat
16aa414fda fix: flush telemetry before ending background job 2023-08-12 12:13:59 +05:30
Ankush Menat
0bc5d1dc3b feat(DX): type annotated python controllers 2023-07-24 15:32:46 +05:30
Deepesh Garg
e38078a69f
test: Patch hooks for testing (#21702)
* test: Patch hooks for testing

* test: hooks patcher

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-07-17 12:41:27 +05:30
Suhail
dc0d76a6db
Merge branch 'develop' into whats-new 2023-07-17 12:15:28 +05:30
Ankush Menat
8f552b8fe2
Merge pull request #21695 from ankush/perf/desk_requests
perf(desk): reduce unnecessary requests on first load
2023-07-16 13:06:16 +05:30
Deepesh Garg
e32e74f2f1
feat: Custom naming series parser via hooks (#21690)
* feat: Custom naming series parser via hooks

* chore: use assignment operatot

Co-authored-by: Ankush Menat <ankushmenat@gmail.com>

* test: Unit test for custom parser

* test: Unit test for custom parser

---------

Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
2023-07-16 12:57:40 +05:30
Ankush Menat
b919618032 perf: eliminate request for user permissions
This is ALWAYS required, then it can just be part of boot. Eliminates 1
unnecessary request.
2023-07-16 12:43:43 +05:30
Suhail
1d75114a8f
Merge branch 'develop' into whats-new 2023-07-10 18:48:57 +05:30
Ankush Menat
2e8ea02028 fix: Expire stalled reports
Mark any report that take more than 60 minutes as failed
2023-07-01 18:27:25 +05:30
Ankush Menat
b9f000e1f9 refactor!: Log 5xx error to error log instead of error snapshot
Also move log_error function to right location
2023-06-28 10:59:19 +05:30
Suhail
d389f43734
Merge branch 'develop' into whats-new 2023-06-15 16:02:40 +05:30
Suraj Shetty
0334e91db7
Merge branch 'develop' into file-permissions 2023-06-14 15:42:49 +05:30
Ankush Menat
4bf1139427 chore: remove get_shade usage
This function doesn't do anything
2023-06-13 16:00:43 +05:30
phot0n
1f8598891e fix: remove infinite sending retries for certain exceptions for email queue
* chore: remove expired status & set_expiry job from email queue
2023-06-09 14:38:55 +05:30