Commit graph

5978 commits

Author SHA1 Message Date
Soham Kulkarni
0040c7f852
Merge pull request #31360 from sokumon/attach-file-spam-issue
fix: check if duplicate_file url matches incoming file url
2025-02-25 14:33:35 +05:30
Ankush Menat
573028ad3f
fix: always persist all indexes added via db.add_index (#31177)
* fix: always persist all indexes added via db.add_index

* fix: Add `if not exists` clause for index creation

This allows replica to have same index and master to add it later
without causing SQL error. Just minor DX benefit.

* fix(postgres): don't cache if table doesn't exist

* chore: revert postgres changes

Hopeless to maintain this
2025-02-25 07:25:49 +00:00
Ankush Menat
6db7cb096d fix: Better proxy for active site and disable on selfhosted 2025-02-25 10:37:29 +05:30
Ankush Menat
0d85bec58f fix: allow disabling dormancy behaviour
Set it to 0 to never trigger this again.
2025-02-25 10:37:29 +05:30
sokumon
0c945af0fb fix: cleanup save_file_on_filesystem method 2025-02-22 18:16:07 +05:30
sokumon
287a5f50a9 fix: add duplicate file url if no file url 2025-02-22 17:21:18 +05:30
sokumon
620c8bfef2 fix: cleanup copied methods and simpler fix 2025-02-22 13:23:26 +05:30
Hardik Zinzuvadiya
1d76370424 feat: Add Grid Page Length field for child tables in DocType 2025-02-21 12:19:05 +05:30
Ankush Menat
51e08371b0
fix: erase cron frequency when type changes (#31368)
Right now hiddent cron field is taking priority over event_frequency.
Which is confusing and not something anyone expects.
2025-02-21 05:23:18 +00:00
Ankush Menat
f90a450bd4
feat: specify row compression for tables (#31361)
Certain tables contain A LOT of duplicate data, it makes sense to enable
compressed row format on them by default. I've seen 5-10 fold reduction
in DB size after enabling compressed format on select few tables.

This has some performance overhead:
- both compressed and uncompressed pages live in buffer pool.
- compression/decompression

Note:
- These cons don't apply much on DocTypes I am enabling this for.
- I am not enabling this on existing sites, migration can take a long
  time! Do it manually with `transform-database` command if you want to.
2025-02-21 09:44:40 +05:30
sokumon
5557ede3d5 fix: typo in method name 2025-02-20 19:33:43 +05:30
sokumon
4ba8ec637d fix: check if duplicate_file url matches incoming file url 2025-02-20 19:20:20 +05:30
Soham Kulkarni
c600314b4c
fix: change condition to not generate more File records (#31181)
* fix: check if name exists

* fix: if name is null add file_name in filter
2025-02-20 18:40:56 +05:30
Sagar Vora
6e20eed640 fix: redo some fixes to ensure cypress passes 2025-02-20 12:51:37 +05:30
Sagar Vora
055f0b5a45 chore: remove unused import 2025-02-19 14:41:07 +05:30
Sagar Vora
f4062b4d7a fix: ensure consistent error in response 2025-02-19 12:10:59 +05:30
Akhil Narang
8a758365eb
Revert "Merge pull request #28363 from frappe/expr-series" (#31202)
This reverts commit 91d553c9cf, reversing
changes made to d17136cd04.
2025-02-10 06:46:45 +00:00
Ejaaz Khan
b4ddb03a80
Merge pull request #31090 from iamejaaz/sticky-columns-childtable
feat: add support for sticky columns in child table
2025-02-06 17:03:02 +05:30
Ankush Menat
aa71072d4a
build: bump RQ to 2.x (#31141)
* build: bump RQ to 2.x

* fix: dont use colon for job IDs
2025-02-05 12:18:03 +00:00
Soham Kulkarni
2372fd8c02
fix: check if attached doctype exists (#30911)
* fix: return False if attached doctype is not found

* fix(UX): add a open url button in file form

* fix(typo): add translate to string

* fix: check if it is absolute url

* fix: return false via module not found error
2025-02-04 12:13:05 +00:00
Ejaaz Khan
40485c2a98 feat: sticky columns in child table 2025-02-03 17:28:52 +05:30
Akhil Narang
baf884d31f
Merge pull request #29888 from akhilnarang/bench-browse-updates
feat: fixed session duration + better visibility of changes done via `bench browse`
2025-01-28 11:22:54 +05:30
Raffael Meyer
4d041c1231
feat(Data Import): delete Data Import Log on trash (#30893) 2025-01-27 16:38:57 +01:00
Akhil Narang
4ef8629228
fix: use strip_html() instead of escape_html()
escape_html() removes `'`, which can be used in names

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-01-27 16:45:14 +05:30
Soham Kulkarni
c067fd4b62
fix: remove whitespace from restrict ip and always check request_ip (#29867)
* fix: remove whitespace in restrict ip in validate

* fix: added check for request_ip

* fix: return if no restrict ip

* fix: set to localhost if none, refactor validate_ip_addr

* fix: validate ip_address cleanup and removed uncessary comments

* fix: validate ip_addr cleanup

* fix: remove unecessary check
2025-01-24 13:12:58 +00:00
Akhil Narang
15065a93e3
refactor: don't use impersonate directly, use similar logic
This will allow impersonating as well

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-01-24 17:20:12 +05:30
Ankush Menat
8071d38ad2
fix: Set prepared report even if req times out (#29874) 2025-01-22 08:23:41 +00:00
Ankush Menat
e6bad301b8 refactor: Use @cached_property instead of implmenting it 2025-01-16 19:19:56 +05:30
Ankush Menat
b3859d9fa3 fix: Don't assume homogeneous data in meta tables
Steps to reproduce:
- enable developer mode (doesn't happen in prod)
- Save a document with set only once fields
- Reload the page (requests meta again which is now polluted)

This is new category of bug surfaced because meta objects now live
longer than request and all kinds of weird `self._cached_property`
starts getting serialized.

Co-Authored-By: ruthra kumar <ruthra@erpnext.com>
2025-01-16 19:10:16 +05:30
Ankush Menat
5874d6bf12
perf: Add prefix index for file_url (#29185)
Currently it's full table scan, that too on a TEXT field filter.

It's used for finding file docs when `fid` isn't specified. No idea
where we are STILL having private file URLs without fids.

In any case, this is still required.
2025-01-15 13:03:24 +00:00
Akhil Narang
ad0e4e25f5
Merge pull request #29172 from akhilnarang/strip-html-user-name
fix(user): strip html tags from user name
2025-01-15 12:29:58 +05:30
Akhil Narang
5b9fde293e
Merge pull request #29171 from akhilnarang/strip-html-activity-log
fix(activity_log): strip html from full name before inserting
2025-01-15 12:29:39 +05:30
Akhil Narang
89c945f902
fix(user): strip html tags from user name
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-01-15 11:54:09 +05:30
Ankush Menat
b2ff5e6125 perf: use cached navbar 2025-01-15 11:53:00 +05:30
Akhil Narang
b87e0a874f
fix(activity_log): strip html from full name before inserting
People can pass in HTML in the login page, it gets rendered here

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-01-15 11:46:51 +05:30
Akhil Narang
e5a3802dc5
feat(csvutils): make sniffer usage optional
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-01-15 10:58:41 +05:30
Ankush Menat
b49d512404 feat: cache documents in client cache
No need to query 1 key at a time.
2025-01-14 14:33:10 +05:30
ruthra kumar
4ab7c103c1 refactor: make scheduled_against mandatory 2025-01-14 10:49:32 +05:30
ruthra kumar
8e6feb62c2 refactor: link to scheduled job type 2025-01-13 10:39:49 +05:30
ruthra kumar
58e291d61c feat: Scheduler Event 2025-01-13 10:31:31 +05:30
mergify[bot]
9733ad313a
fix: frappe license added in report.js (#29084)
frappe license added in report.js

(cherry picked from commit 63ea6d42eae895fa0ca93f74cea1009eb80e06d0)

Co-authored-by: Indrajith.vs <91895505+Gubbu77@users.noreply.github.com>
2025-01-09 11:48:51 +05:30
Ankush Menat
fdba41c682
perf: misc client cache improvements (#29070)
* perf: Reduce penalty for lack of redis connection

If redis isn't running than this client cache is slower than default
implementation because of the extra locking overhead.

* test: update perf redis counts

* perf: cache table columns in client-cache

* fix: race condition on cache-client_cache init

Rare but apparant in synthetic benchmarks.

Cache is set but client cache is still being initialized then request
will fail.

* perf: Don't run notifications when loading document

WHAT?

* fix: use cached doc to repopulate

* perf: reduce get_meta calls
2025-01-07 16:14:43 +05:30
Ankush Menat
73dc99275d refactor: move get_system_settings
- This should not be in init.py
- set_single_value is not a good alternate for properly cleaning up cache.
2025-01-06 20:31:38 +05:30
Ankush Menat
e37219ef39 perf: Store languages in client cache 2025-01-06 19:52:43 +05:30
Ankush Menat
c76b23a050 perf: cache server script map in client cache 2025-01-06 19:43:28 +05:30
Ankush Menat
546260162d perf: Skip link checking on internal deletes
These are deletes that aren't user triggered and these documents are
typically never "linked" somewhere else. So skip all expensive link /
dynamic link checks.
2025-01-06 11:48:19 +05:30
Hussain Nagaria
87a4c03850 fix: don't copy over API Key
* anyways wasn't useful since password isn't copied
2024-12-31 19:35:55 +05:30
Hussain Nagaria
673269fdcf fix: typo in test controller boilerplate 2024-12-21 13:13:22 +05:30
ruthra kumar
63a6c8c903 refactor: log in monitor as well 2024-12-20 11:35:41 +05:30
ruthra kumar
29cf8cef8f feat: log peak memory usage for Prepared reports 2024-12-20 10:18:27 +05:30