Commit graph

3182 commits

Author SHA1 Message Date
Akhil Narang
faef64bab4
fix(sentry): set the user's name correctly
https://docs.sentry.io/platforms/python/enriching-events/identify-user/

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-12-08 16:13:15 +05:30
Ankush Menat
57699a54b1
fix: Show server script name in traceback (#23676)
* fix: Show server script name in traceback

* chore: typo

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

---------

Co-authored-by: Sagar Vora <sagar@resilient.tech>
2023-12-08 15:01:13 +05:30
Ankush Menat
a1bfdf28a2
Merge pull request #23659 from shariquerik/ar-export-excel-fix
fix: use encoded filename for arabic (latin) language while exporting
2023-12-07 18:10:42 +05:30
Shariq Ansari
4c9dea8d62 fix: use encoded filename for arabic (latin) language while exporting 2023-12-07 12:46:27 +05:30
Raffael Meyer
76afbaaa40
Merge pull request #23609 from barredterra/de-morgan 2023-12-06 22:21:01 +01:00
Ankush Menat
b0c2f56dae Revert "feat: wkhtmltopdf logging (#19935)"
This reverts commit 6354a018de.
2023-12-05 21:11:35 +05:30
barredterra
c35476256f refactor: simplify conditional logic
Command: `sourcery review --fix --enable de-morgan .`
2023-12-05 11:14:41 +01:00
Ankush Menat
1e20820846
refactor: Indicate that weak hash functions are not usedforsecurity (#23540)
[skip ci]
2023-12-01 16:04:37 +05:30
tonspar
fae3685b03
feat: Patch and Delete Request to integration utils (#23525)
* Update utils.py

Adding the patch and delete request

* Update safe_exec.py

Adding the patch and delete request from integration utils.
2023-12-01 10:25:43 +05:30
Ankush Menat
0e8b4de96f fix: tweak sentry config
- disable session tracking - This causes sentry to phone home on every load, we don't need this (yet)
- disable automatic integrtaions (like redis)
- disable all default integration and cherry-pick what's required
2023-11-30 19:01:19 +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
Ankush Menat
4cc1392697 ci: report all errors to sentry
This can be useful.
2023-11-30 17:34:15 +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
Ankush Menat
62529f3d74
chore(telemetry): track logged errors (#23390)
Also includes unhandled errors
2023-11-24 04:55:12 +00:00
Akhil Narang
fbc88a4d24
refactor(treewide): code cleanup
Drop redundant bool conversion

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-11-23 13:57:51 +05:30
Ankush Menat
f526054ae2
refactor: Remove usage of utcnow (#23369) 2023-11-23 13:21:27 +05:30
Ankush Menat
d715b0ad31
Merge pull request #22804 from akhilnarang/non-nullable-fields
feat: allow setting fields as not nullable
2023-11-20 12:46:02 +05:30
Akhil Narang
eb45da3913
feat: Allow usage of print() within safe_exec() (#23084)
* feat(safe_exec): allow usage of `print()`

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* refactor(system_console): update description to mention `print()` instead of `log()`

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* feat: unconditionally add debug logs to response if present

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* chore(safe_exec): add in a test for running `print()` within safe_exec

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* fix(safe_exec): ignore warning

RestrictedPython warns us if we call `print()` don't use their `printed` variable

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* feat: store debug logs from scheduled jobs

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* fix: avoid ignoring warnings, disabled in prod anyway

* chore: remove unnecessary logging

This can be moved to level 2 when required

---------

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-11-20 12:45:41 +05:30
Shariq Ansari
a14966c980
Merge pull request #22595 from blaggacao/fix/non-html-notifications-rendered-from-files 2023-11-18 21:06:12 +05:30
David Arnold
9228cd70f8
fix: code style 2023-11-17 09:30:53 +01:00
David Arnold
5b33608fe3
fix: shell escaping in execute_in_shell helper 2023-11-16 10:52:11 +01:00
Akhil Narang
75709eede7
feat: set a non-null value if docfield isn't set as nullable
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-11-16 14:51:57 +05:30
David Arnold
fb6171ae34
Merge remote-tracking branch 'upstream/develop' into refactor/centralize-python-shell-interface-for-database-binaries 2023-11-13 10:01:54 +01:00
David Arnold
77b1d58428
Merge remote-tracking branch 'upstream/develop' into fix/non-html-notifications-rendered-from-files 2023-11-13 10:00:49 +01:00
Ankush Menat
c69b043527
fix: send correct username in userinfo (#23177) 2023-11-11 08:08:39 +00:00
Akhil Narang
659cbcb88f
refactor(scheduler): drop unused parameter (#23174)
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-11-11 11:29:12 +05:30
David Arnold
40a2daf84c
chore: give cli invocations of dbtools a dedicated interface 2023-11-09 12:14:41 +01:00
David Arnold
fe8cc7a5c2
fix: non-html notifications from files 2023-11-09 09:51:39 +01:00
Ankush Menat
0aa3b51faa fix: single global search sync
closes https://github.com/frappe/frappe/issues/23106
2023-11-06 20:29:16 +05:30
Ankush Menat
089985e53b feat: frappe.job local for reading job info 2023-11-04 14:06:31 +05:30
mergify[bot]
6ad2e762d3
Merge pull request #23064 from frappe/bulk-insert-search-sync
perf(GlobalSearch): bulk insert queued items
2023-11-03 05:10:31 +00:00
Ankush Menat
8c74d542d5 perf: don't check len before popping
rpop is atomic and yields None when nothing is found. No need to check length.
2023-11-03 10:20:31 +05:30
Ankush Menat
eba499a9ba refactor: misc changes
- make internal function explicit
- dont delete keys which is immediately being replaced.
- deprecate `sync_value`
2023-11-03 10:15:52 +05:30
18alantom
3d7ba41583 fix(sync_values): use EXCLUDED for postgres
removing the second arg from `do_update` causes
EXCLUDE to be auto added
2023-11-02 18:57:51 +05:30
18alantom
aa690553cf refactor: undo use of count in redis pop
count param in rpop and lpop was introduced in 6.20
at the time of this commit we are using an older
version that does not include it
2023-11-02 18:22:50 +05:30
18alantom
ee3776f38f refactor: move inner for to function 2023-11-02 17:02:49 +05:30
18alantom
64adf49706 refactor: use rpop count to pop in batches
- fix: dedupe items in a batch
- fix: reassign `query` cause it does not hold state

_fkn ORMs man 🙄_
2023-11-02 16:58:10 +05:30
18alantom
b56136ba66 refactor: add count to cache pop 2023-11-02 15:52:29 +05:30
18alantom
2742746ced perf(GlobalSearch): bulk insert queued items
Fixes #14660
2023-11-02 13:30:56 +05:30
Ankush Menat
db01c05eb8 fix: enforce perms on global search 2023-10-31 21:37:30 +05:30
Akhil Narang
03c88d145e
chore: print full path to backup (#22984)
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-10-30 18:04:33 +05:30
Ankush Menat
daca4dd31c chore: keep deprecated function slated for removal in future
This is used in ERPNext.
2023-10-30 17:31:25 +05:30
Ankush Menat
d3225a6df9
refactor: Writing multi-pdf (#22981)
- rename variables, output -> pdf_writer
- write to in memory stream instead of disk


[skip ci]
2023-10-30 17:26:01 +05:30
Akhil Narang
1119919971
refactor: use gzip library's compress() and decompress() methods directly
The util methods were added for python2.7 compat, mark them as deprecated

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-10-20 21:17:35 +05:30
Ankush Menat
d1111fb189
refactor: DB dump executable logic (#22799) 2023-10-18 08:54:40 +00:00
Ankush Menat
5de126aea9
Merge pull request #22757 from frappe/fix-ci-boilerplate
fix: add mariadb-client install step in workflow boilerplate
2023-10-17 11:57:05 +05:30
Hussain Nagaria
f1ba76f5f7 fix: add mariadb-client install step in workflow boilerplate 2023-10-16 19:40:09 +05:30
Ankush Menat
e2714c3e1c feat: v2 error and debug log structure 2023-10-16 18:13:50 +05:30