Commit graph

660 commits

Author SHA1 Message Date
David
aec58a9ad0
chore(ui-tests): raise click Exit exception 2024-11-29 13:39:03 +01:00
Akhil Narang
318a47219c
chore(ui-tests): don't print subprocess traceback
We have the cypress error from its output above, just a simple error message is enough here

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-11-29 18:03:18 +05:30
Akhil Narang
5e5a332cec
fix(new-site): mariadb_user_host_login_scope was broken since it was added
Mismerge in 0d3b2499fc

Thanks Revant for pointing it out

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-11-07 16:33:02 +05:30
David Arnold
61a107b6af
ci: make gh actions functions (#28299)
* ci: make gh actions downstream reusable

* refactor: merge ci helper into run-parallel-test command

* ci: refactor to sensible db password
2024-10-27 02:09:02 +00:00
David Arnold
2f9fd308e8
fix(testing): pdb post mortem (#28156) 2024-10-17 18:52:25 +00:00
David Arnold
9d63208c9c
fix: test record generation (#28102)
* chore: improve log record of testing command invokation

* chore(testing): narrower specificacion of the persistence log

* fix(testing): append raw record source data to globalTestRecords
2024-10-12 22:31:40 +02:00
David Arnold
5324431fc0
fix: Testing Module 28000 (#28032)
* fix: logging text

* fix: app handling
2024-10-08 10:14:19 +00:00
David Arnold
7e453ea515
Testing Module (#28000)
* refactor: add create_handler alongside create_logger

* fix: bench helper click exceptions for --help (2nd attempt)

* fix: increase logging level missing test records

* fix: reorganize test runner into testing module and refine logging

* fix: semgrep complaint

* chore: remove unused code; only keep deprecation proxies

* fix: import statements

* fix: output & string processing
2024-10-07 09:46:49 +02:00
David Arnold
fd65584c40
Test Runner 3 b (cleanup) (#27999)
* refactor: Move TestConfig.categories to TestRunner.categories

* fix: app addTest

* fix: run with app arg

* fix: refactor simplify

* fix: run_before_test_hooks signature

* fix: python test module discovery

* fix: app test execution in series
2024-10-06 16:55:41 +00:00
David Arnold
c2c9d9062a
Testing Improvements 3 (#27995)
* feat: set doctype on test classes

* refactor: Transform `make_test_records` into a generator

* feat: lazy create doctype records on first use

* perf: improve file walker

* fix: submission queue test

* refactor: improve logging a bit

* fix: global records install for app (semifix)
2024-10-06 15:04:47 +00:00
David Arnold
e39ecfa274
refactor: Test runner 2 (#27987)
* feat: Improve logging in test runner

* feat: Categorize tests as unit or integration

* feat: Add support for selecting test categories

* feat: Split unit and integration tests execution

* test: better output on cli runner

* feat: Create TestRunner class

* feat: Implement run method in TestRunner class

* refactor: Refactor test discovery and execution in TestRunner class

* feat: Integrate _run_doctype_tests functionality into TestRunner class

* feat: Integrate _run_unittest functionality into TestRunner class

* refactor: Handle distinction between loading specific test case and entire module

* feat: Add handling of test dependencies in _add_module_tests method

* refactor: Merge _add_tests into discover_tests

* feat: Improve test results printing with click

* refactor: wrap in proper error handling

* fix: some signatures

* feat: Add debug logs to frappe/test_runner.py

* refactor: Move before_tests hooks after test discovery

* refactor: Use TestConfig instead of frappe.flags.skip_before_tests

* refactor: Add skip_test_records to TestConfig and update calling sites

* feat: Defer test record creation until after before_tests hooks

* feat: Add app parameter to _run_doctype_tests and _run_module_tests

* feat: Add --test-category option to run_tests command

* refactor: Add explanatory comments for skipping before_tests hooks and test record creation callbacks for unit tests

* feat: Add test category option to run_tests command

* feat: Unify explanatory comments in _prepare_integration_tests

* fix: wrap implicit db access in try-except block

* fix: mark current site

* fix: case counting
2024-10-05 16:37:19 +00:00
David
f0ba65eb9b
ci: improve reporting 2024-10-04 15:22:49 +02:00
Corentin Forler
bea742f624
fix: Evaluate bench execute args for each site 2024-09-30 14:46:54 +02:00
Akhil Narang
b7fcafcaf1
chore: add back describe-database-table command
Partial revert of b169f8780a

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-09-18 16:48:49 +05:30
David
202cce8a0d
refactor: type hint cli context 2024-09-13 17:25:43 +02:00
David (aider)
0e92dc3a97
feat: friendly error wrapper on cli 2024-09-13 17:07:04 +02:00
David Arnold
40f2387780
Merge pull request #27763 from frappe/fix/correct-execute-command
fix!: execute command
2024-09-13 17:05:07 +02:00
David
6a95540bf5
fix: nicer error message on bench execute 2024-09-13 16:52:16 +02:00
David
0c6fffa348
fix!: execute command
BREAKING: return values of bench execute are not quoted anymore
For example, `bech execute frappe.bold --arg 'hi'`
- now returns: `<strong>hi</strong>`
- instead of: `"<strong>hi</strong>"`
2024-09-13 16:52:15 +02:00
David
d87b786687
chore: fix all invocation of init for singledispatch -> min 1 positional arg 2024-09-13 11:53:52 +02:00
David
e0fe0b8c88
chore: simplify config calling 2024-09-11 23:24:26 +02:00
David Arnold
a837fa28fb
Merge pull request #25734 from blaggacao/feat/debug-tests
feat: add debug tests
2024-09-04 20:11:58 +02:00
David (aider)
85c9a6b1c8
feat: add list-sites command 2024-09-04 19:51:05 +02:00
David (aider)
f194eeee92
feat: add --pdb 2024-09-04 19:49:52 +02:00
Akhil Narang
30f5669489
fix: don't allow uninstalling frappe...
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-08-30 18:04:32 +05:30
Arun
ae3f8f455b fix: http to https for url 2024-07-29 13:53:25 +05:30
Arun Mathai S.K.
02c680e68d
fix: migrate-to now works (#27115)
* chore : migrat-to pre check url

* feat: migrate-to now works

* fix: unecessary context

* chore: remove commented code
2024-07-18 10:27:20 +05:30
Corentin Flr
932c58f921
feat(commands): Add bypass-patch command (#26633)
* feat(commands): Add bypass-patch command

* chore: delete comments

---------

Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
2024-06-03 07:06:18 +00:00
Ankush Menat
d13178755b refactor: keep scheduler+worker behaviour to workerpool
- Single worker adds some extra costs to each worker (importing scheduler)
- Workerpool can import it all once and share
- This way we need not have many different
2024-05-27 12:29:41 +05:30
Ankush Menat
433e7281f7 feat: make running scheduler with worker optional 2024-05-27 12:14:15 +05:30
Ankush Menat
b169f8780a feat: Add identified index from UI 2024-05-14 18:54:38 +05:30
Ankush Menat
ee64b2cb6c
fix!: Only use webserver_port in developer mode (#26268) 2024-05-01 12:11:01 +05:30
Akhil Narang
ea1c8910e6
feat: delete failed backups
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-04-10 12:57:16 +05:30
Akhil Narang
0d3b2499fc
fix: don't use frappe.flags for mariadb_user_host_login_scope
This gets reset whenever we call `frappe.init()` again

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-03-29 16:57:04 +05:30
David
39d4318a27
feat: enable db socket connection 2024-03-29 10:29:50 +01:00
David
6eb1607c0a
refactor: name and explain user host login scope flag for mariadb 2024-03-29 10:26:49 +01:00
Akhil Narang
ee8e2fef8c
refactor(new-site): update rollback prompt
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-03-29 12:12:19 +05:30
Akhil Narang
4b2fde1d8f
fix: check if rollback callback is defined
Don't raise exceptions where a simple print() will suffice
Print exception before prompting for rollback

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-03-29 12:00:25 +05:30
Akhil Narang
c58e986a87
chore: check whether we're in an interactive session or not
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-03-29 12:00:25 +05:30
Akhil Narang
147c0c8b37
feat: initial failed site rollback implementation
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-03-29 12:00:25 +05:30
barredterra
0e573fc77e feat: move languages to CSV file, add enabled property
Only enable supported laguages.
2024-03-27 00:18:36 +01:00
Akhil Narang
3a7dd3a1db
Merge pull request #25417 from akhilnarang/psql-history-log
fix: log psql console usage as well
2024-03-14 12:33:24 +05:30
Akhil Narang
d0923b0cd9
refactor: move histfile setting into helper function
This will ensure even users of `bench db-console` can use it

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-03-14 11:12:17 +05:30
Akhil Narang
afdb455b5a
fix: log psql console usage as well
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-03-14 10:56:17 +05:30
Akhil Narang
8e057e2010
fix(console): use frappe.conf.db_user
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-03-14 09:06:19 +05:30
Akhil Narang
a01085ddcc
fix(partial-restore): add in missing whitespace between sentences (#25393)
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-03-13 10:54:59 +00:00
Ankush Menat
532e1ef402
Merge pull request #25366 from ankush/mariadb_logging
fix: log mariadb console usage
2024-03-12 20:45:54 +05:30
Ankush Menat
676c40a15b
Merge pull request #25364 from ankush/ipython_logging
fix: Log ipython commands
2024-03-12 20:34:15 +05:30
Ankush Menat
2d75dbb598 fix: log mariadb console usage 2024-03-12 20:33:27 +05:30
Ankush Menat
8bdc88f06d fix: Log ipython commands 2024-03-12 20:11:00 +05:30