Commit graph

2482 commits

Author SHA1 Message Date
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
Sagar Vora
6e20eed640 fix: redo some fixes to ensure cypress passes 2025-02-20 12:51:37 +05:30
Sagar Vora
c8e4be7f5d
Merge pull request #31322 from sagarvora/fix-use-decorator 2025-02-19 17:44:00 +05:30
Sagar Vora
60b889c3b8 fix: ensure correct context in sys.exc_info 2025-02-19 17:33:53 +05:30
Ankush Menat
4997e5d223
fix: clear cache after db transaction ends (#31315)
This reduces probability of stale cache, but it's still very easily
possible because of repeatable read (!)
2025-02-19 11:44:37 +00:00
Sagar Vora
d3bb578c2f fix: update type hints to allow integers 2025-02-19 12:31:12 +05:30
Sagar Vora
eded5eac24 fix: explicitly check type of form name 2025-02-19 12:17:31 +05:30
Sagar Vora
f4062b4d7a fix: ensure consistent error in response 2025-02-19 12:10:59 +05:30
Rushabh Mehta
e3b071dad7 fix(minor): Extract images from markdown as well 2025-02-03 17:03:46 +05:30
Akhil Narang
21ec09e4ef
fix(web_form): allow loading translations for more strings (#30931)
* Fix: Add more translation to web form

Fix that there is translation missing in frontend

* Fix missing translation context

* Adding left messages

* Fix typo

* Add even more missing translation

* chore: format

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

---------

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
Co-authored-by: petnd <58605206+petnd@users.noreply.github.com>
2025-01-29 11:07:55 +00:00
Akhil Narang
b94edc9d21
Merge pull request #30912 from cogk/patch-3
fix(blog): Fix typo in search query
2025-01-29 11:18:35 +05:30
Akhil Narang
7ee8b17ca8
chore: format
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-01-29 11:09:47 +05:30
Ankush Menat
2062a48ef8
fix: Respect no-cache header (#30921)
Browsers send this when user does ctrl+shift+r
2025-01-29 04:24:57 +00:00
Corentin Forler
cd68867535
fix(blog): Fix typo in search query 2025-01-28 17:03:14 +01:00
Ankush Menat
23694b6b3b
fix: Don't cache pages with query params (#30881)
This was always broken apparantly. Cache key only contains the path so
querystring is being ignored. If request has query params then we
shouldn't cache it.

WIP - better solution for caching based on cache headers. Anyway this
caching isn't THAT helpful since #29170
2025-01-27 06:22:43 +00:00
Ankush Menat
32054b0757 refactor: use response_headers to set cache control headers 2025-01-24 18:35:26 +05:30
Corentin Forler
53e86379fe
fix(website): Clear cached list of child top bar items (#29223) 2025-01-22 20:52:40 +05:30
Ankush Menat
cdffd5d047
refactor: use flat cache for web pages (#29220)
Web pages are not a hash.

This way we can also set expiry for each key. Setting default expiry of
30 minutes.
2025-01-17 12:02:50 +00:00
Ankush Menat
cfa4534757
perf: faster page view count queries (#29219) 2025-01-17 09:46:03 +00:00
Akhil Narang
638b118875
Merge pull request #29123 from akhilnarang/escape-path
fix(not_permitted_page): escape path
2025-01-15 16:45:13 +05:30
Ankush Menat
d219353877
fix: edge case for redirects on / (#29180)
Because all slashes are stripped this endpoint becomes `""` which is not
a valid key for redis hash.
2025-01-15 09:05:19 +00:00
Ankush Menat
584727f5e7
perf: negative website redirect caching (#29179) 2025-01-15 14:21:56 +05:30
Ankush Menat
0ff3e6fd4c perf: cache meta tags existence 2025-01-14 19:19:36 +05:30
Ankush Menat
9bd6c95b3f perf: don't yaml-parse empty string and get nothing back
*surprise*
2025-01-14 18:52:50 +05:30
Ankush Menat
a89fd99794 perf: keep jloader across requests
This doesn't have anything that needs to be created for each request.
2025-01-14 18:18:19 +05:30
Ankush Menat
e768f679ff perf: Speedup rendering of simple templates
Also, slowdown rendering of complex ones. Nothing comes free.
2025-01-14 18:11:27 +05:30
Ankush Menat
cc838022b1 perf: use client cache for fetching website settings and theme 2025-01-14 14:40:25 +05:30
Ankush Menat
aed412f9eb perf: Use client-cached website settings 2025-01-14 14:36:35 +05:30
Ankush Menat
d6f47e8060 perf: use cached user for fetching time zone 2025-01-14 14:15:06 +05:30
Akhil Narang
b8fe835d1a
fix(not_permitted_page): escape path
Reported-by: Sadik Shaikh <pc_masters70@yahoo.com>
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-01-13 11:46:05 +05:30
Ankush Menat
77c9c9ee93
perf: hard-code /app routing even more aggresively (#29073)
Dynamic route evaluation is insanely slow and done on each request. I'll
likely remove that over time but in meantime, this resolution should be
much higher.
2025-01-07 12:32:28 +00:00
Raffael Meyer
fe196062b5
fix(Web Form): add syntax highlighting for client script (#28964) 2024-12-30 22:16:37 +00:00
mahsem
e8698a98de
fix: add strings and fields to translation 2024-12-21 13:17:01 +01:00
Akhil Narang
4509e75179
fix: convert frappe.boot to JSON properly
We have `frappe.as_json` set as the jinja filter for json

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-12-13 11:45:57 +05:30
Corentin Forler
50020cffda
fix(web): Ensure that header values are strings (#28760) 2024-12-12 19:32:12 +05:30
Akhil Narang
a63cd10387
fix: set currency system setting in webform frappe.boot.sysdefaults
Otherwise this resulted in the fallback `USD` showing for some currency fields in webforms

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-12-11 17:59:13 +05:30
Ankush Menat
60bc472ab6
revert: restore JSON files (#28717)
* Revert: bring back JSON files

* chore: re-apply changes to new files

* chore: remove old TOML files

* chore: delete empty files
2024-12-09 08:41:56 +00:00
Akhil Narang
84ef6ec677
refactor: fixup with ruff 0.8.1
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-12-04 13:18:04 +05:30
Rushabh Mehta
cef8c12ee4 fix(style): fix oauth authorisation page and standardise error responses 2024-10-24 15:21:34 +05:30
David Arnold
91a737d8fe
chore(typing): fix some (exotic) type errors treewide (#28210) 2024-10-21 10:02:04 +00:00
Suraj Shetty
a63f902648 refactor: Use sentence case for fieldnames
ref: https://github.com/frappe/erpnext/wiki/Naming-Guidelines#field-naming
2024-10-21 12:07:22 +05:30
Suraj Shetty
84f4a76290 refactor: Re-organize fields 2024-10-21 11:51:08 +05:30
Suraj Shetty
d35518639b feat: Add a field to accept allowed embedding domains 2024-10-18 11:30:11 +05:30
David Arnold
0204db6547
chore: move to use new test record api (#28105) 2024-10-12 23:13:41 +00:00
David Arnold
443c38daa9
refactor: toml test records for readability (#28065)
* refactor: toml test records for readability

* fix: maintain backwards compatibility

* refactor: transform in-tree records

* chore: don't use deprecated functions (treewide)

* chore: revert migration of tests which depend on old test records list

* feat: add cls.globalTestRecords on IntegrationTestCase
2024-10-10 13:24:02 +02:00
David Arnold
83bc1f09e9
refactor: clarify test record dep management in test modules (#28060) 2024-10-09 13:44:27 +00:00
David Arnold
c114e5fae8
refactor: unit vs integration treewide (#27992)
* refactor: constitute unit test case

* fix: docs and type hints

* refactor: mark presumed integration test cases explicitly

At time of writing, we now have at least two base test classes:

- frappe.tests.UnitTestCase
- frappe.tests.IntegrationTestCase

They load in their perspective priority queue during execution.

Probably more to come for more efficient queing and scheduling.

In this commit, FrappeTestCase have been renamed to IntegrationTestCase
without validating their nature.

* feat: Move test-related functions from test_runner.py to tests/utils.py

* refactor: add bare UnitTestCase to all doctype tests

This should teach LLMs in their next pass that the distinction matters
and that this is widely used framework practice
2024-10-06 09:43:36 +00:00
Corentin Forler
6a6ccc034c
fix(blog_post): Ensure images are public if shown on website 2024-09-30 14:45:58 +02:00
P-Godfroid
2349221255
fix(translation): search placeholders (#27812)
* Translatable placeholder

* Translatable Search word.html

* " instead of ' for commiter tool.js

* Cleaner way to translate.js

* So the issue was prettier.js

* Style : prettier.js

* style(translation): line break removed from string
2024-09-24 10:57:40 +05:30
Rushabh Mehta
72f236aa9f
Merge pull request #27819 from rmehta/fix-icons
fix(style): Update icons, new design for /me
2024-09-23 17:24:55 +05:30