Commit graph

3258 commits

Author SHA1 Message Date
Ankush Menat
585200988b feat: simple procline for scheduler
Makes it easy to tell if scheduler is for some reason "stuck".
2023-12-29 14:39:40 +05:30
Ankush Menat
31d72c33b4
chore: use site as "user" (#24026)
For us, a user is single site. This is because logic like "issue affects
more than 1 user" only makes sense for site. Same client/server script
can affect multiple user on same site but it's not a useful error for
us.


[skip ci]
2023-12-29 11:55:26 +05:30
Ankush Menat
d423d2ace5
fix(DX): filter version logs with changes to field (#24023)
Diff view shows all versions. E.g. if you enable/disable a script it
shows up in possible diff targets. This PR filters versiont to only show
the ones that have the field changed somehow.
2023-12-29 06:03:14 +00:00
Ankush Menat
00f20f43c6
build: add setproctitle as dependency (#24007)
* build: add setproctitle as dependency

RQ and other tools use it to automatically set a useful proc title

* ci: print all bench logs after running tests

This can help reveal failures from background jobs etc
2023-12-28 20:50:27 +05:30
Ankush Menat
4a8fb6c43c style: format 2023-12-28 19:16:11 +05:30
Ankush Menat
9b458ad354
Merge pull request #23835 from akhilnarang/sentry-sync-fc
refactor(sentry): sync up with FC implementation
2023-12-28 17:38:06 +05:30
mergify[bot]
a9bb994f15
fix!: deterministic fixture import order (#22210)
* feat: #20753 fixture export prefix and fixture import order

(cherry picked from commit 6a9c56a568e4ccf181fe9cb4153d0b9e4f02ac3d)

* refactor: clarify prefix logic, see c4866921df (r1196249038)

(cherry picked from commit cd2519e71e5545bd4c706369df3ea05843a0bfd9)

* style: format

* refactor: conditionally sort documents when importing

* refactor: simplify code

* feat: Unittest as requested in https://github.com/frappe/frappe/pull/22210#discussion_r1331587501

---------

Co-authored-by: To Finke <tom.finke@webterra.de>
Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-12-28 14:24:45 +05:30
Revant Nandgaonkar
37803a00d4
fix: strip exc from json response if traceback not allowed (#23989)
* fix: strip exc from json response if traceback not allowed

* fix: use pop instead of del to avoid key error

* fix: Avoid showing exc when traceback is disabled

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-12-28 10:45:06 +05:30
Akhil Narang
d5d35704d8
feat(sentry): skip validation errors
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-12-27 18:43:33 +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
Akhil Narang
7f433b84af
feat: allow creating a backup with the older metadata style
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-12-26 11:09:08 +05:30
Akhil Narang
a06e402f38
refactor: use a function with context manager for backup decryption
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-12-26 11:09:08 +05:30
Akhil Narang
cb7c0e653c
fix(Backup): automatically rollback decryption when object is being deleted
This allows us to not have to call it everytime before returning

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-12-26 11:08:48 +05:30
Akhil Narang
3b0f6de883
perf: don't extract backup files unless required
Read from the gzipped file wherever possible

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-12-26 11:08:48 +05:30
Ankush Menat
0fd6f5eed7
Merge pull request #23827 from frappe/api-docs
docs: add Python API missing docstrings / type hints
2023-12-21 12:13:05 +05:30
Hussain Nagaria
369844a9cb fix: type hint 2023-12-20 14:09:01 +05:30
Hussain Nagaria
ecdd7b3e37 docs: consistency 2023-12-20 14:02:32 +05:30
Ankush Menat
3d3f982cbe
Merge pull request #23873 from frappe/img_fix
fix: ignore and gracefully handle img optimization failure
2023-12-20 13:12:22 +05:30
Akhil Narang
39359f9793
fix(sentry): name field is ignored
Only `id`, `username`, `email`, and `ip_address` are accepted here

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-12-20 12:43:42 +05:30
Ankush Menat
3524cae48e fix: ignore and gracefully handle img optimization failure
PIL doesn't handle ALL image types. E.g. HEIC fails with bad error.
2023-12-20 12:25:56 +05:30
Hussain Nagaria
0df45daacd docs: get_number_format_info 2023-12-19 12:17:00 +05:30
Hussain Nagaria
4d20ef9200 docs: get_gravatar and get_gravatar_url 2023-12-19 12:08:50 +05:30
Raffael Meyer
99f0745302
style: new app boilerplate (#23847)
* style: add spaces to hooks boilerplate

Black wants comments to start with a space. Adding them here means less formatting later.

* style: init_template

Put version on the first line and use double quotes.
2023-12-18 23:13:13 +05:30
Hussain Nagaria
370d575f29 docs: some more utils 2023-12-18 22:27:58 +05:30
Hussain Nagaria
3d35ee3e9e docs: get_link_to_form 2023-12-18 22:08:35 +05:30
Hussain Nagaria
a22451c6e2 docs: pdf_to_base64 2023-12-18 22:03:37 +05:30
Hussain Nagaria
cc9a866142 docs: get_thumbnail_base64_for_image 2023-12-18 22:00:44 +05:30
Hussain Nagaria
8f7638860f docs: remainder, image_to_base64, get_url, get_host_name*, get_link_to_report*, get_url_to_form 2023-12-18 21:55:55 +05:30
Hussain Nagaria
541e99e1c8 refactor: only import types when TYPE_CHECKING 2023-12-18 21:49:13 +05:30
Hussain Nagaria
8d2137c265 docs: consistent doc strings 2023-12-18 18:27:39 +05:30
Hussain Nagaria
aefe634ff7 docs: password_strength.py
* also add type hints
2023-12-18 18:20:52 +05:30
Hussain Nagaria
47626e96fb fix: type hint 2023-12-18 12:44:07 +05:30
Hussain Nagaria
837b6ff995 docs: generate_hash 2023-12-17 17:29:32 +05:30
Hussain Nagaria
db10004fe0 docs: markdown, to_markdown, md_to_html 2023-12-17 17:26:01 +05:30
Hussain Nagaria
93a5a60003 doc: get_url_to_list 2023-12-17 17:22:15 +05:30
Hussain Nagaria
e52b9049fd docs: get_absolute_url 2023-12-17 17:17:30 +05:30
Hussain Nagaria
b174224f21 docs: url_contains_port 2023-12-17 17:05:54 +05:30
Hussain Nagaria
6ff2023a20 docs: comma_sep 2023-12-17 17:02:42 +05:30
Hussain Nagaria
751e21bf73 docs: is_image, is_html, comma_or, comma_and, new_line_sep 2023-12-17 16:54:57 +05:30
Hussain Nagaria
f566b6cf4c docs: cstr 2023-12-17 16:36:25 +05:30
Hussain Nagaria
bd46a75aff docs: get_timespan_date_range 2023-12-17 15:49:34 +05:30
Hussain Nagaria
0b95e8fcc2 chore: get_year_ending to safe_exec 2023-12-17 15:35:55 +05:30
Hussain Nagaria
45c491228b docs: get_year_ending 2023-12-17 15:34:07 +05:30
Hussain Nagaria
10d34da769 docs: get_quarter_ending 2023-12-17 15:28:54 +05:30
Hussain Nagaria
20f99819d5 docs: typing overloads for get_year_start 2023-12-17 15:21:10 +05:30
Hussain Nagaria
3899c14b67 refactor: get_quarter_start returns current when dt is None 2023-12-17 14:54:59 +05:30
Hussain Nagaria
d0d78f65e9 docs: typing overloads for get_first_day_of_week/last_day_of_week 2023-12-17 14:48:45 +05:30
Hussain Nagaria
cdbe3555f6 fix: type hint 2023-12-17 14:43:30 +05:30
Hussain Nagaria
5e619db45a fix: words 2023-12-17 14:42:39 +05:30