Commit graph

48204 commits

Author SHA1 Message Date
Ankush Menat
ad0e8ed735 test: frappe.init patching 2024-12-17 11:33:21 +05:30
Ankush Menat
3675f3c797 perf(site_cache): reduce access to frappe.local namespace
This change also allows calling @site_cache during init, as long as `site` parameter is set.
2024-12-17 11:23:51 +05:30
Ankush Menat
531b9a3e3d
Merge pull request #28799 from ankush/perf/patching_bug
perf: Avoid patching QB in every request
2024-12-17 11:20:42 +05:30
Ankush Menat
5bf50b6bc2 perf: Avoid patching QB in every request 2024-12-17 10:58:31 +05:30
Ankush Menat
6ad70cb604
Merge pull request #28791 from ankush/update_mariadb
chore: update tested mariadb versions
2024-12-16 19:03:46 +05:30
Ankush Menat
54af230131 chore: update tested mariadb versions 2024-12-16 19:02:38 +05:30
Ankush Menat
5e4f23720a
perf: Use raw SQL for fetching documents (#28789)
`get_doc` is single most used commands, directly and indirectly.
Currently there's QB overhead of building queries.

These queries are SO SIMPLE, I don't believe we need QB to keep these
maintainable or compatible with databases.

Microbenchmarks (first is simple flat document, second has many child tables):

```
bench_orm_bench_get_doc: Mean +- std dev: [before] 10.7 ms +- 0.2 ms -> [after] 7.24 ms +- 0.15 ms: 1.48x faster
bench_orm_bench_get_user: Mean +- std dev: [before] 16.3 ms +- 0.2 ms -> [after] 9.50 ms +- 0.14 ms: 1.72x faster
```
2024-12-16 13:27:07 +00:00
Akhil Narang
2bbf78aa73
Merge pull request #28783 from akhilnarang/package-within-site
fix(package): validate package name, export path
2024-12-16 17:44:05 +05:30
Akhil Narang
fae07e4bbb
fix(package): validate package name, export path
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-12-16 17:19:54 +05:30
Akhil Narang
dc85db263b
Merge pull request #28782 from akhilnarang/use-actions-directly
refactor(ci): don't fetch actions from develop
2024-12-16 16:25:23 +05:30
Akhil Narang
c0d0a137ec
fix(ci): drop ubuntu version check for wkhtmltopdf
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-12-16 16:10:56 +05:30
Akhil Narang
fadbddff2e
refactor(ci): don't fetch actions from develop
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-12-16 16:10:46 +05:30
Ankush Menat
d6adc3d7c2
fix: Don't cache anything hashable (#28780)
* fix: Don't cache anything hashable

If filters are list or dict then they aren't hashable, there was little
reason to do this IMO.

If something is indeed cacheable then where is the eviction for it?
simple k:v is only thing we can realistically cache here.

* ci: Dont specify client version

Clients work on mysql protocol ABI which works for huge ranges of
servers.
2024-12-16 13:36:14 +05:30
Ankush Menat
f5b22ee2f4 ci: Dont specify client version
Clients work on mysql protocol ABI which works for huge ranges of
servers.
2024-12-16 13:22:30 +05:30
Ankush Menat
eaa6e4003a fix: Don't cache anything hashable
If filters are list or dict then they aren't hashable, there was little
reason to do this IMO.

If something is indeed cacheable then where is the eviction for it?
simple k:v is only thing we can realistically cache here.
2024-12-16 13:17:09 +05:30
Akhil Narang
8b7222eac6
Merge pull request #28773 from frappe/dependabot/npm_and_yarn/nanoid-3.3.8
chore(deps): bump nanoid from 3.3.7 to 3.3.8
2024-12-16 12:02:36 +05:30
Akhil Narang
d2990caa48
Merge pull request #28777 from iamejaaz/static-width-childtable
fix: pre defined columns width issue in childtable
2024-12-16 10:50:41 +05:30
Akhil Narang
9f91829fb0
Merge pull request #28776 from iamejaaz/safari-overlow-issue-childtable
fix: link field issue with scrollable child table in safari
2024-12-16 10:50:22 +05:30
Ejaaz Khan
4a477b9be4 fix: pre defined columns width issue 2024-12-15 21:10:59 +05:30
Ejaaz Khan
4aa02f8004 fix: link field issue with scrollable child table 2024-12-15 20:28:50 +05:30
dependabot[bot]
240da6fb24
chore(deps): bump nanoid from 3.3.7 to 3.3.8
Bumps [nanoid](https://github.com/ai/nanoid) from 3.3.7 to 3.3.8.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.3.7...3.3.8)

---
updated-dependencies:
- dependency-name: nanoid
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-14 09:38:29 +00:00
Akhil Narang
9fd891d01e
Merge pull request #28769 from akhilnarang/fix-unbound-local-widgets
fix(save_new_widget): prevent `UnboundLocalError`
2024-12-13 15:14:24 +05:30
Akhil Narang
ccde8a1922
fix(save_new_widget): prevent UnboundLocalError
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-12-13 14:59:09 +05:30
Akhil Narang
058702bd3c
Merge pull request #28765 from akhilnarang/jinja-boot-json
fix: convert frappe.boot to JSON properly
2024-12-13 12:23:28 +05:30
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
0c8e49b72b
Merge pull request #28759 from blaggacao/fix/test-breakpoint-honoring
fix(testing): clarify --pdb to --debug from a users perspective and also attach pdb on any exception
2024-12-12 18:04:32 +05:30
David
1d31663f4b
fix(testing): clarify --pdb to --debug from a users perspective; also attach pdb on any exception
prior, the implementation attached to AssertionErrors
and the flag did not represent that this disables the buffer so that normal breakpoints work
2024-12-12 13:19:20 +01:00
Ankush Menat
82264e7986
fix: keep a large enough limit on group-by query (#28754)
Small change on top of https://github.com/frappe/frappe/pull/28740

Reason: Site with many many users might still have huge # of rows being
returned. E.g. FC.

This just makes UX slightly bad, but there's easy workaround for it.
Users can just apply this filter -> "Owner = Self", whether users know
it or not is a different question.
2024-12-12 05:11:46 +00:00
Raffael Meyer
7c06c845ea
Merge pull request #28674 from frappe/l10n_develop
fix: sync translations from crowdin
2024-12-12 02:39:35 +01:00
barredterra
b2ec589390 test: make test translation independent from real ones 2024-12-12 00:57:14 +01:00
barredterra
8acd5568c4 Merge remote-tracking branch 'upstream/develop' into l10n_develop 2024-12-12 00:50:46 +01:00
Frappe PR Bot
4581729c95 fix: Swedish translations 2024-12-12 01:31:50 +05:30
Frappe PR Bot
5ba244f6a2 fix: Spanish translations 2024-12-12 01:31:47 +05:30
Sumit Bhanushali
6d034bb92b
Merge pull request #28740 from frappe/quick_filters_fix
fix: in case of owner, always include owner in count data
2024-12-12 01:21:30 +05:30
Akhil Narang
264155635a
Merge pull request #28745 from akhilnarang/set-webform-sysdefaults-currency
fix: set `currency` system setting in webform `frappe.boot.sysdefaults`
2024-12-11 18:15:48 +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
Sumit Bhanushali
602e05a5f8 fix: in case of owner, always include owner in count data 2024-12-11 17:49:09 +05:30
Ankush Menat
2295d3108d
chore: make bench_helper executable (#28742)
I need a real entry point that isn't wrapped by bench CLI.
2024-12-11 10:52:58 +00:00
Akhil Narang
c59933fe70
Merge pull request #28734 from barredterra/validate_from_to_dates
fix: clarify error message for child tables
2024-12-11 11:07:54 +05:30
Frappe PR Bot
aa7c9bff9a fix: Turkish translations 2024-12-11 01:35:14 +05:30
barredterra
beab110ce9 fix: clarify error message for child tables 2024-12-10 17:06:55 +01:00
Akhil Narang
e92d10a0b0
Merge pull request #28729 from akhilnarang/fixup-28093
fix(convert_utc_to_timezone): set UTC if tzinfo undefined
2024-12-10 16:28:38 +05:30
Akhil Narang
4cf18d37bd
fix(convert_utc_to_timezone): set UTC if tzinfo undefined
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-12-10 16:12:01 +05:30
Frappe PR Bot
a330348d4a fix: Persian translations 2024-12-10 01:31:02 +05:30
Frappe PR Bot
3285b902c1 fix: Swedish translations 2024-12-10 01:30:57 +05:30
Rushabh Mehta
c4792204df
Merge pull request #28720 from netchampfaris/remove-justify
fix: remove text align justify from newsletter
2024-12-09 18:19:04 +05:30
Faris Ansari
4eafaea3e7 fix: remove text align justify from newsletter 2024-12-09 16:59:33 +05:30
Ankush Menat
1b1126c1c8
perf: index document name (#28718)
Moved index from doctype to docname. Docname always has higher
cardinality. Even if you filter by both it shouldn't matter as
cross-doctype name conflicts are rather rare.

Perf impact of this change should be net 0 but it does addresses problem
of indeterministic load times based on how many errors exist in db.

closes https://github.com/frappe/frappe/issues/28713
2024-12-09 09:08:59 +00:00
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