Commit graph

2041 commits

Author SHA1 Message Date
Ankush Menat
5a7348668a Merge branch 'develop' into virtual-doc-for-frappe-recorder 2023-08-10 12:57:16 +05:30
Ankush Menat
58568115a9
Merge pull request #21955 from barredterra/refactor-with-sourcery
refactor: run sourcery on all files
2023-08-10 10:11:20 +05:30
Ankush Menat
b9993a303b
Merge pull request #21898 from frappe/mergify/bp/develop/pr-21722
fix: allow connections with both internal and external links in dashboard (backport #21722)
2023-08-09 19:47:23 +05:30
marination
d9e4791b15 chore: Use lighter files as test fixtures 2023-08-09 17:29:56 +05:30
anandbaburajan
6ddc3654c6 chore: add test prefix before test doctypes 2023-08-09 17:19:02 +05:30
anandbaburajan
fde516b06f chore: use new_doctype for creating test doctypes 2023-08-09 16:57:32 +05:30
barredterra
88c8baa9ee refactor: for append to extend, merge list extend
Replace a for append loop with list extend.
Create the list with values instead of creating
an empty list and extending it with another list.
2023-08-09 13:25:39 +02:00
barredterra
b553ed98d8 refactor: inline immediately returned variable
Inline a variable to a return in the case when the
variable being declared is immediately returned
2023-08-08 18:09:49 +02:00
Gursheen Anand
1dd07d8256 test: crud with virtual child table 2023-08-08 16:22:59 +05:30
Raffael Meyer
5fce1a57c0
fix: validate fieldname in get_group_by_count (#21932)
* fix: validate fieldname in get_group_by_count

* test: call get_group_by_count with invalid field

* test: is_default_field
2023-08-06 17:33:34 +05:30
Sagar Vora
7aed89ae4d test: set request before verifying 2023-08-05 14:43:45 +05:30
Sagar Vora
773cefea69 test: specify args or kwargs instead of frappe.form_dict 2023-08-05 14:14:03 +05:30
Suraj Shetty
21b1b4bdb5
Merge branch 'develop' into attachments-access 2023-08-02 14:39:17 +05:30
anandbaburajan
bbffaa1bf6 chore: patching dashboard at runtime instead of creating a file
(cherry picked from commit 9ce430800da110f68703605d7250d5b8d9de8a78)
2023-08-02 03:21:39 +00:00
anandbaburajan
480ef5076d chore: rename links_count_data to count, and update docstring of get_open_count
(cherry picked from commit 97a57966116a7ef9bd542d34e63448edab8befda)
2023-08-02 03:21:39 +00:00
anandbaburajan
fa6461cf47 chore: removed unnecessary non_standard_fieldname
(cherry picked from commit db3738a89207bba18d2d264c2f366b5d9ed1382b)
2023-08-02 03:21:38 +00:00
anandbaburajan
e0d00b5ae1 chore: fix typo
(cherry picked from commit e8a1e9f96389927cc5e15a7a7769208fdf13614d)
2023-08-02 03:21:38 +00:00
anandbaburajan
e3f65a2314 chore: check if table exists in delete_test_data
(cherry picked from commit bff4bac4ae5dde39336846b49c7d0f5190bdae5e)
2023-08-02 03:21:38 +00:00
anandbaburajan
e38e752bb3 chore: remove unncessesary imports from ui_test_helpers
(cherry picked from commit 57bbc3ee11af11ed2819496040f2addda3cb6387)
2023-08-02 03:21:38 +00:00
anandbaburajan
61e0b6c00e test: remove ui tests and add server tests, and turn dev mode off
(cherry picked from commit 82390164c99e7d0d4615ab2ea8d726f96d65f02d)
2023-08-02 03:21:38 +00:00
anandbaburajan
4010add64c chore: add module arg in create_dashboard_py_for_doctype
(cherry picked from commit 5816b15aed68a5f2062ad4d119425f7c10c6062c)
2023-08-02 03:21:36 +00:00
anandbaburajan
1240b26cfe test: to check connected doc count for doctype with dashboard.py
(cherry picked from commit 4968286e5c60aeb2d554545bff5595c3144bf628)
2023-08-02 03:21:35 +00:00
marination
140595f587 test: Sidebar attachments UX
- Added 10 royalty free images from 'https://unsplash.com/images/stock/royalty-free'
- Test to check state of attachments actions through different user actions
- UI Helper function to create ToDo and add max attachment limit of 12
2023-07-31 19:00:00 +05:30
David Arnold
fddd3b24f7
test: skip tests on RO app paths which require write access (#21878) 2023-07-31 12:46:23 +05:30
Shariq Ansari
e1c1e256ef
Merge pull request #21798 from pps190/frappe/fix/ambigus-table-join 2023-07-28 12:28:04 +05:30
Ankush Menat
8930d4b5e1
perf: drop ifnull from IS SET filter (#21822)
- Kinda confuses query planner (idk why it's not smart enough to
  understand but there are probably edge cases where it can't be done)
- `null != null` and `'' != null` both yield `null` which is falsy and
  won't be shown in results.

Alternate fix to https://github.com/frappe/frappe/pull/21817
2023-07-27 10:58:20 +05:30
Devin Slauenwhite
7a3e7b7eb2 Merge remote-tracking branch 'frappe/develop' into frappe/fix/ambigus-table-join 2023-07-24 14:23:28 -04:00
Sagar Vora
b395a84d0b
fix!: remove version API (#21786) 2023-07-24 13:01:45 +05:30
David Arnold
a926e64ec9
fix: procure db config from single authority (#21578)
* fix: procure db config from single authority

ensures that configuration is uniformely procured from local.conf
instead of making use of hard to audit multilevel fallback logic

Implementation Note:
- `get_db(host, port, user, password)` was stripped of any optional
  argument and therefrom all errors where fixed.
- All occurances of `grep 'frappe.db.db_'` where changed to
  `frappe.conf.db_`

* fix: revert unnecessary breaking changes
2023-07-24 10:48:29 +05:30
Ankush Menat
2c99583247 perf: Lazily fetch shared documents
We eagerly fetch shared documents for ANY `get_list` query, even when
user has full read acess doctype, where it's moot to consider adding
shared document as separately.

This eliminates one entire db call from get_list and in most cases
get_list will translate to single DB call, hence probably worth the
additional complexity.
2023-07-22 18:04:35 +05:30
Ankush Menat
42aff950ce
feat(DX): normalize queries in recorder (#21735)
Attempt to normalize query by removing "variables"
This gives a different view of similar duplicate queries.

These two are distinct queries:
```sql
select * from user where name = 'x'
select * from user where name = 'z'
```

But their "normalized" form would be same:
```sql
select * from user where name = ?
```

This helps highlight queries ran in loop which might not register as
duplicate but are possibly "duplicate".
2023-07-19 16:45:30 +05:30
Ankush Menat
8436f775a5
feat(DX): PEP517 compatible build in new apps (#21704)
* chore: remove setup.py requirements.txt boilerplate

* feat(DX): PEP517 compatible builds on new apps

closes https://github.com/frappe/frappe/issues/21612
2023-07-17 12:56:41 +05:30
Deepesh Garg
e38078a69f
test: Patch hooks for testing (#21702)
* test: Patch hooks for testing

* test: hooks patcher

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-07-17 12:41:27 +05:30
Shariq Ansari
d423dedcd3
Merge pull request #21377 from shariquerik/move-form-builder-in-doctype-form 2023-07-16 14:38:08 +05:30
Deepesh Garg
e32e74f2f1
feat: Custom naming series parser via hooks (#21690)
* feat: Custom naming series parser via hooks

* chore: use assignment operatot

Co-authored-by: Ankush Menat <ankushmenat@gmail.com>

* test: Unit test for custom parser

* test: Unit test for custom parser

---------

Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
2023-07-16 12:57:40 +05:30
Shariq Ansari
3b2f2ef418 test: fix sidebar UI Test 2023-07-16 12:06:48 +05:30
Ankush Menat
79532ea0f2 fix: incorrect cache clearing of assets
- Build version wasn't correctly computed since v14 update of build
  system. This makes client side cache useless.
- We clear cache assuming rapid reloads,but opening new tab also does
  that. This makes the cache effectively useless for most users.
2023-07-15 21:59:04 +05:30
Ankush Menat
adf30693a9 ci: update pyupgrade 2023-07-14 14:24:08 +05:30
Ankush Menat
fefd9ac2e2
fix: connect_replica and read_only should be idempotent (#21674)
* fix: `connect_replica` should be idempotent

Calling `connect_replica` twice ends up forgetting orginal writable
replica completely.

* test: replicas

closes https://github.com/frappe/frappe/issues/21619
2023-07-14 13:56:57 +05:30
David Arnold
6b2bb9a2ab
fix: add env overrides for service orchestration (#21577)
This avoids having to manipulate config files in brittle bash
entrypoints that need to react to dynamic service discovery.

This significantly improves the operability of various bench sites.
2023-07-14 11:39:01 +05:30
Ankush Menat
154a6dd9ed
perf: Reduce recorder overhead (#21656)
By processing `EXPLAIN` of queries in background after recording is
completed, the overhead reduces significantly and hence can be used
"more" in production environment too.
2023-07-12 19:34:23 +05:30
Ankush Menat
8730de41f9
fix: Only clear doctype cache if specified (#21611) 2023-07-09 10:44:43 +05:30
Ankush Menat
d7990368a8
perf: preload more modules (#21557)
* perf: preload more modules

- bleach is used frequently for sanitization
- File gets imported anytime a private file is viewed. Indirect import
  of PIL is costly in each worker.

* test: warm up perf test
2023-07-02 21:47:21 +05:30
mergify[bot]
721035b313
Merge pull request #21276 from gavindsouza/bump-pydantic-v2
build(deps): Bump Pydantic from v1 to v2
2023-07-02 13:38:18 +00:00
Ankush Menat
4ece3da47d test: publish_progress ui test 2023-07-01 18:06:34 +05:30
Ankush Menat
ab44a9cca8 test: socketio tests
- conflict check (moved from form)
- list view updates
- custom event subscribe and recieve
2023-07-01 12:43:53 +05:30
gavin
03fbdde007
Merge branch 'develop' into bump-pydantic-v2 2023-06-30 22:19:09 +05:30
Corentin Flr
4ccfd1e8fa
Merge branch 'frappe:develop' into fix-test_never_render 2023-06-30 11:52:33 +02:00
Ankush Menat
a52485cc53 feat: RQ jobs can show count 2023-06-29 18:06:52 +05:30
Ankush Menat
1092eef7bd perf: faster pending jobs check 2023-06-29 17:31:06 +05:30