Commit graph

231 commits

Author SHA1 Message Date
Gavin D'souza
4ccabc4e21 fix(new-site): Pass sql archive as --source-sql
Add --source-sql option as an alias to --source_sql
2023-02-09 15:32:06 +05:30
Ankush Menat
11f7e41994 fix: Show local variables in tracebacks during migration 2023-02-03 16:01:30 +05:30
phot0n
16eeedc28c feat(minor): add use-default-authtoken to ngrok command 2023-01-02 16:27:38 +05:30
phot0n
31d1bd6cc7 chore: linter 2022-12-30 19:27:17 +05:30
Hussain Nagaria
b9a6db3c08 refactor: ngrok_auth_token -> ngrok_authtoken
* to be consistent with ngrok's naming convention
2022-12-24 12:45:24 +05:30
Hussain Nagaria
5c7b583582 fix(commands): require ngrok auth token in site_config.json to use ngrok command
* ngrok authtoken is now required to use the host_header feature
2022-12-24 12:32:51 +05:30
Ankush Menat
06becac459
fix(trim-database): Dont act on non-frappe tables (#19292) 2022-12-15 13:43:28 +05:30
Ankush Menat
49437f53b4
feat: operation level locking for CLI commands (#19162)
This prevents mistakenly issuing same commands twice which can be
dangerous.

added global lock(s):
- [x] bench build

added site level lock(s):
- [x] bench new-site sitename
- [x] bench --site sitename migrate
- [x] bench install-app appname
- [x] bench build
- [x] bench restore (the code is just meh, needs some cleanup)

closes https://github.com/frappe/frappe/issues/13215
2022-12-08 13:24:43 +05:30
Ankush Menat
5d1444c21c
docs: add missing help text for commands (#19039)
closes https://github.com/frappe/frappe/issues/19036

[skip ci]
2022-11-29 16:01:25 +05:30
Ankush Menat
a8bf86ef75 feat: support dequeuing strategies for worker 2022-11-25 12:14:37 +05:30
phot0n
3539dacdf0 fix: commit after app install
Since we destroy the connection after app installation,
mariadb implicitly rollsback the transaction hence committing upon successfull
app installation to prevent data sync loss
2022-09-12 12:23:14 +05:30
Alaa Alsalehi
40f54d04b7 feat(bench): add new bench command for add user 2022-08-24 14:29:50 +05:30
Ankush Menat
bdeb032fba
refactor: use separate config key for encryption (#17720) 2022-08-03 13:52:02 +05:30
Gavin D'souza
006ebcbede refactor: Use pymysql over mariadb client
This is supposed to be a temporary switch to make the parent PR easier
to digest. MariaDB client has some issues with release, and system
dependencies.

This commit may be reverted to enable mariadb client again.
2022-07-22 12:10:54 +05:30
Gavin D'souza
71b5c77e6e Merge branch 'develop' of github.com:frappe/frappe into mariadb-client-refactor 2022-07-05 14:55:02 +05:30
Ankush Menat
81b37cb7d2
refactor: clean up code to py310 supported features (#17367)
refactor: clean up code to py39+ supported syntax

- f-strings instead of format
- latest typing support instead of pre 3.9 TitleCase
- remove UTF-8 declarations.
- many more changes

Powered by https://github.com/asottile/pyupgrade/ + manual cleanups
2022-07-01 11:51:05 +05:30
Gavin D'souza
f08f29b8a3 Revert "fix: Disable db pooling on all commands by default"
This reverts commit 0a8941c583 since it
may not be required as we start pooling with single connections only.
2022-06-23 16:12:12 +05:30
Gavin D'souza
b4578dc632 Merge branch 'develop' of github.com:frappe/frappe into mariadb-client-refactor 2022-06-15 16:40:29 +05:30
Ankush Menat
a1fa2353c1 fix: clear pending logs using big-deletes
If some sites have long pending old data that doesn't get cleared
automcatically then this patch now attempts to discard old data by using
"big-delete" code instead of typical delete query.
2022-06-15 12:33:14 +05:30
Ankush Menat
edbb44925e refactor: better varname and use get_table_name
Co-Authored-By: gavin <gavin18d@gmail.com>
2022-06-15 12:30:38 +05:30
Ankush Menat
8b8552b0e4 feat: clear-log-table to clear large log tables 2022-06-15 12:30:38 +05:30
Gavin D'souza
e13df5ba49 fix(restore): Remove incorrect validation that doesn't allow relative paths 2022-06-04 18:20:44 +05:30
gavin
0a8941c583 fix: Disable db pooling on all commands by default
Set envvar DATABASE_POOLING to enable
2022-05-24 19:54:59 +05:30
gavin
7e76953435 fix(drop-site): Tell user where archived site data is stored 2022-05-24 19:19:53 +05:30
gavin
639fa62138 fix: frappe.DISABLE_DATABASE_POOLING to override frappe.conf.disable_database_connection_pooling
Also, don't pool root connections
2022-05-24 19:19:53 +05:30
Chillar Anand
485988682d
refactor: Remove dead code (#16886) 2022-05-12 18:04:44 +05:30
gavin
20f28e760f
Merge pull request #16888 from gavindsouza/drop-site-no-partial-backup
fix(drop-site): Take full backup before dropping site
2022-05-12 14:40:21 +05:30
gavin
2c6299e65c fix: Take full backup before dropping site 2022-05-12 14:20:13 +05:30
chillaranand
d2b63d0935 feat: Added force flag to install-app command 2022-05-11 16:18:14 +05:30
Suraj Shetty
c0c5b2ebdd
style: format all python files using black (#16453)
Co-authored-by: Frappe Bot <developers@frappe.io>
2022-04-12 10:59:25 +05:30
Gavin D'souza
f8f9b19461 fix(set-last-active-for-user): Skip the extra lines to just do a set_value 2022-03-31 16:02:28 +05:30
Ankush Menat
590aaf80c7 fix(UX): Logout -> Log out 2022-03-24 15:57:16 +05:30
Gavin D'souza
776ba30a4d fix: Add more verbosity for drop-site command 2022-03-16 19:06:41 +05:30
Himanshu
ce77e97db6
feat: enable tls for ngrok (#16216)
* styled site module: sorted imports, space fixes
2022-03-08 16:46:59 +05:30
Revant Nandgaonkar
cdc6bcadb1
fix(cli): Database agnostic options for root db credentials (#15973)
* fix(bench): new-site params for root db credentials

allow root credentials for postgresql
use common cli option name for both database types

* fix(bench): backward compatible db params

Co-authored-by: gavin <gavin18d@gmail.com>

* fix(bench): use common db cred params

use --db-root-username and --db-root-password

* feat(bench): add --set-default to bench new-site

* fix: do not set default root user

* fix: indentation

Co-authored-by: gavin <gavin18d@gmail.com>
2022-02-25 09:58:59 +05:30
Gavin D'souza
891d1fbd86 refactor: Site Migration 2022-02-02 17:44:49 +05:30
Ankush Menat
e58c557e12 fix: correctly compute doctype name from table name 2022-01-24 11:18:21 +05:30
ChillarAnand
f648852e81 fix: Use makedirs instead of mkdir to create arhived sites path 2021-12-27 18:02:14 +05:30
Gavin D'souza
5914f35bb7 fix: Change site archive path to archived/sites 2021-11-25 12:47:36 +05:30
Gavin D'souza
088fdca74d refactor: bench browse
* Manage colours through click
* Standardize the command's behaviour for consistency :')
* Use click instead of webbrowser module
* Simplify logic
2021-11-25 12:47:36 +05:30
Gavin D'souza
ef39843f6b fix(cli): Add new line after each site's migrate 2021-11-15 13:32:34 +05:30
Anurag0911
8b7629c064
feat: Encrypted Backups (#14513)
* feat: backup-encryption

* fix: Using encryption key and Minor changes.

* fix: Sider.

* fix: Closing curly brace does not appear on the same line as the subsequent block.

* fix: Review Suggestions.

* fix: Minor changes.

* chore: Icon

* fix: Icon and Privileges Changes.
2021-11-09 13:58:57 +05:30
Faris Ansari
c75f15e25a fix: print url only when user is Administrator 2021-11-02 13:52:09 +05:30
Faris Ansari
ce695b8706 fix: Restrict user logins to developer_mode
- Allow Administrator user login in production
- Print login url
2021-11-02 13:38:33 +05:30
Faris Ansari
c5512d4c66 fix: login as user with browse command
`bench --site site.local browse --user Administrator`
2021-11-01 12:34:24 +05:30
gavin
4041442e6a
Merge pull request #13955 from gavindsouza/trim-db
feat: Site Maintenance commands
2021-09-15 17:08:40 +05:30
Gavin D'souza
5c6ffd2b2a chore: Misc updates
* Updated hooks content
* Remove unnecessary multiple=True flag that breaks on click8
2021-09-15 16:31:24 +05:30
Gavin D'souza
3734b63c17 fix: Do partial backups instead of full in trim-database 2021-09-15 16:08:55 +05:30
Gavin D'souza
0413349cc8 fix: Table view for bench trim-tables 2021-09-14 21:53:02 +05:30
Gavin D'souza
cb6010f1cf feat(minor): Add json format option to trim-database 2021-09-14 21:52:22 +05:30