Commit graph

48540 commits

Author SHA1 Message Date
Soham Kulkarni
d5eb2738f9
fix(style): image width fixed (#28987) 2025-01-01 23:46:16 +01:00
mahsem
b3ab2e60c4
fix: multi_select_dialog_failing_test 2025-01-01 17:47:45 +01:00
Md Hussain Nagaria
a77787822c
Merge pull request #28977 from frappe/fix-copy-fields
fix: duplicate/copy doc
2025-01-01 16:00:04 +05:30
Ankush Menat
6989e508a8
Merge pull request #28981 from ankush/perf/redirect_call
perf: Don't query redirects on existing session
2025-01-01 14:56:33 +05:30
Ankush Menat
51b11208e4 test: add perf test to prevent adding more redis calls 2025-01-01 14:42:13 +05:30
Ankush Menat
cbb39d463a perf: Don't query redirects on existing session
This is only used for a new user. After that it's never used but still
present in EVERY request!

https://ankush.dev/p/flamegraph-missing-forest-for-trees

towards https://github.com/frappe/caffeine/issues/15
2025-01-01 14:29:36 +05:30
sokumon
171eab1387
Merge pull request #28967 from sokumon/better-sidebar
fix: improved sidebar
2025-01-01 12:23:31 +05:30
Akhil Narang
3a0fdd3993
Merge pull request #28888 from sokumon/center-me-page
fix: Center /me, some other pages and fix /logout
2025-01-01 10:55:12 +05:30
Akhil Narang
7c8c1e73a4
chore: format
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-01-01 10:41:41 +05:30
Hussain Nagaria
ed64dd728e refactor: clean up long conditional 2025-01-01 07:15:12 +05:30
sokumon
b0ecec2e18 fix: center me page and fix logout 2025-01-01 03:26:56 +05:30
Hussain Nagaria
88b854c859 fix: const -> let 2024-12-31 22:32:50 +05:30
Hussain Nagaria
0095e86a69 fix: update deprecated string method 2024-12-31 22:30:06 +05:30
Hussain Nagaria
7bfc94b7b0 refactor(copy_doc): replace var with let/const 2024-12-31 22:27:12 +05:30
Hussain Nagaria
1997c7ebac fix(copy_doc): don't copy password fields
* this leads to surprises!
2024-12-31 22:23:29 +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
Ankush Menat
c75febb5d4
fix: register fault hander after gunicorn registers signals (#28976)
Ugh, currently gunicorn is overriding our signal handler and we don't
care about gunicorn's SIGUSR1 handler.
2024-12-31 14:01:19 +00:00
sokumon
46f430c59a fix: centered app label , logo size fix in apps switcher menu 2024-12-31 18:31:46 +05:30
sokumon
41f220d092 fix: update sidebar for private workspace 2024-12-31 17:44:56 +05:30
sokumon
24505f1cfa fix: cleanup sidebar UI, app switcher 2024-12-31 17:25:17 +05:30
Ankush Menat
bd3af4391f
fix: Commit ID parsing (#28975)
This is/was never returning anything.

- Arguments come before revs
- `cd` is kinda unnecessary
2024-12-31 10:33:57 +00:00
Ankush Menat
19bbc24d43
chore: bump stale time (#28973)
[skip ci]
2024-12-31 15:08:13 +05:30
Frappe PR Bot
4e761e61d4
fix: sync translations from crowdin (#28954) 2024-12-31 01:58:10 +01:00
Raffael Meyer
fe196062b5
fix(Web Form): add syntax highlighting for client script (#28964) 2024-12-30 22:16:37 +00:00
Raffael Meyer
cbda036daf
fix(Web Form): position of country code in "Phone" control (#28962) 2024-12-30 21:25:54 +00:00
Raffael Meyer
e5387a1272
feat(Country)!: formalise the code field (#28307) 2024-12-30 12:34:30 +00:00
Sumit Bhanushali
c654559a4a
Merge pull request #28958 from frappe/addr_fix
fix: update address link title on update of customer
2024-12-30 15:02:52 +05:30
Ankush Menat
3788f30b5b
perf: reduce RQ Worker's polling frequency (#28957) 2024-12-30 14:37:00 +05:30
Sumit Bhanushali
0d278dbadf fix: update address link title on update of customer 2024-12-30 14:20:48 +05:30
Ankush Menat
bada7cab13
perf: No need to set expiry for rate limiter key everytime (#28956)
* perf: No need to set expiry for key everytime

* fix: Set expiry on first request and never again

This prevents problem of rate limiter keys growing constantly.
2024-12-30 07:31:47 +00:00
mahsem
0cdef9ce1e
fix: cleanup remaining variable
Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
2024-12-29 20:17:20 +01:00
Francisco Roldán
6cd2ab8789
fix: sidebar translatable (#28839) 2024-12-29 19:57:20 +01:00
mahsem
8f2c565249
fix: rename_modal_translation (#28937) 2024-12-29 19:35:49 +01:00
Frappe PR Bot
2404b967e5
fix: sync translations from crowdin (#28779) 2024-12-29 18:36:04 +01:00
Raffael Meyer
3e2b7e9fad
Merge pull request #28948 from frappe/pot_develop_2024-12-29 2024-12-29 18:35:09 +01:00
frappe-pr-bot
0f4a9ea678 chore: update POT file 2024-12-29 09:33:23 +00:00
Ankush Menat
0f546c33b3
test: impose tax on __init__.py (#28940)
Call it a new year's resolution.

`frappe/__init__.py` has grown crazy big over time and left unattended it will continue to grow.

This new ~test~ tax will require reducing 3 line per day (so ~1000 in a year) from 1st Jan 2025 onwards. I am offering a headstart of 50 days in this PR by moving ~150 lines: #28869
2024-12-28 10:16:33 +05:30
Ankush Menat
766cb64d55
perf!: Cache site configs in memory for 60 seconds (#28869)
This is middle ground between caching it completely and requiring a
restart/signal to reload vs always reloading it.

I don't know any use cases that can break from this, nowhere in code
configs should be expected to reload instantly.

This change is only applied to requests for now
2024-12-27 16:21:14 +00:00
Ankush Menat
28453f59f8
refactor: Flatten @site_cache's internal representation (#28939)
This makes maxsize deterministic while estimating memory costs of
using this function.

E.g. If I want to cache site config and I'd prefer to keep 16 recent
site configs in memory, there's no way to handle this. Site specific
maxsize means if I have 1000 sites on bench I'll have 1000 keys in
cache.

This change makes behaviour similar to lru_cache which is how I thought
it workerd TBH.
2024-12-27 15:50:07 +00:00
Ankush Menat
416919e880
Revert "feat: Use RESP3 for Redis cache connections (#28929)" (#28938)
This reverts commit 6f7b4c412e.
2024-12-27 13:19:35 +00:00
Ankush Menat
bbf9e7f7ff
ci: make things parallel, drop unnecessary things (#28923)
Using parallel tests is pointless if you spend 2.5 minute setting up and
3 minutes running tests

https://en.wikipedia.org/wiki/Amdahl%27s_law
2024-12-27 09:52:26 +00:00
Ankush Menat
787ae8a438
fix: Skip rate limit counters when cleaning cache (#28932) 2024-12-27 07:48:10 +00:00
Ankush Menat
841c0207e7
perf: lower reminders frequency (#28931)
change from 4 -> 15 minutes

Closes https://github.com/frappe/frappe/issues/28927

I agree with issue, this is too frequent for a feature that isn't used
by that many.
2024-12-27 07:37:25 +00:00
Ankush Menat
c4b8560247
fix: Ensure only one Redis connection is created (#28930)
There is no gaurantee that setup_cache is only called once. This PR adds
a mutex lock to ensure only one thread gets to create the connection. If
both arrive at same time then one of them will be blocked until
connection is setup.

So far this hasn't been an issue because the "orphan" connection would
just get garbage collected but if you setup any kind of listener on it
or refer to it then it will keep running forever hurting performance.

This just has small performance impact on first request that sets up the
connection, in absence of contention the lock should have almost no
overhead. I make up for it by eliminating one function call :pinch:
2024-12-27 12:55:32 +05:30
Ankush Menat
6f7b4c412e
feat: Use RESP3 for Redis cache connections (#28929)
RESP3 has PUSH support which is useful for implementing client side
caching. Enabling this before I work on that to test if anything breaks
with this.

No need to do this for background jobs instance just yet, infrequent
accesses and performance doesn't matter as much.
2024-12-27 06:15:59 +00:00
Ankush Menat
11a6dfb6a0
revert: bencher/bench intrface (#28925) 2024-12-26 14:41:36 +00:00
Ankush Menat
8511bc902b
Revert "chore: exempt draft prs from stale bot" (#28924) 2024-12-26 14:18:42 +00:00
Ankush Menat
60a3c41c7a
perf: Avoid storing redundant information - last session update (#28922)
Session contains the same exact information, so why do we need this?
2024-12-26 12:38:14 +00:00
Ankush Menat
3ab2c2fbcf
perf: speedup rate limiter by ~1.2x (#28920)
* perf: reuse current time

now_datetime is site-tz-aware, we don't need it here.

* perf: dont need redis transactions

* perf: use `time.time()` instead of datetime

Using `datetime.timestamp()` is a round-about way to use `time.time()`
with extra cost of dealing with datetime and timezones.

* perf: define slots for rate_limiter

* fix!: Remove used rate limit header

This just shares how much was consumed in current request, people can
just time requests to get an approximation for this, not sure why is this
useful.
2024-12-26 10:57:46 +00:00
Ankush Menat
304dae9136
Merge pull request #28916 from ankush/perf/skip_defaults
perf: use system settings instead of defaults
2024-12-26 12:06:37 +05:30