2
0
mirror of https://github.com/frappe/bench.git synced 2025-01-10 17:24:41 +00:00
Commit Graph

1281 Commits

Author SHA1 Message Date
Gavin D'souza
4655f6e785 refactor(minor): Dependency resolving
* Added a requirements method under BenchSetup
* Resolve Frappe dependencies prior to other apps
* Fixed issues with missing path in update_env_pip
2021-11-18 00:10:25 +05:30
Gavin D'souza
84d1b209ba chore: Added Typing + styling 2021-11-18 00:03:42 +05:30
Gavin D'souza
cd252d3476 refactor: setup dev requirements
* Remove unwanted log message 🤢. It was inconsistent...this had to be
  done...rip
* Fix missing import - install_python_dev_dependencies
* Don't setup node + python requirements when --dev flag is passed
2021-11-17 23:56:55 +05:30
Gavin D'souza
30e3e725a8 fix: Show traceback on bench init failure
Other changes:
* Invoke internal init function instead of invoking click
command. This was done to avoid handling random Exceptions that are done
in the command definition
* os.chdir after initializing new bench in get_app
2021-11-17 23:55:15 +05:30
Gavin D'souza
a192240cec fix: Check if app is installed in env via initialize_apps
Consequence: Bench.apps only will have valid frappe apps that are installed in env
2021-11-17 23:51:28 +05:30
Gavin D'souza
67e5db6979 chore: Drop dead code
bench.prepare_staging module wasn't being utilized from any internal
APIs. Dropped it ;)
2021-11-17 23:49:11 +05:30
Gavin D'souza
b6fc562b48 refactor: get_app flow
* Changes in get_app fix path/cwd issues and order of resolving deps: py
  -> dev py -> yarn
* Pass verbosity in setup_app_dependencies via get_app
* Say hi to new utils: get_available_folder_name, get_traceback
2021-11-17 23:45:30 +05:30
Gavin D'souza
4ba5422b65 fix: Move logging to lower level App.get API 2021-11-15 12:40:20 +05:30
Gavin D'souza
13ed9beca5 fix: frappe app can exist without public folder
other change:
* sync apps.txt manually after dep apps are also setup; right before
  build step
2021-11-15 12:39:33 +05:30
Gavin D'souza
5170048d6d style: Black-ish app.py for readability 2021-11-15 12:37:43 +05:30
Gavin D'souza
68c0549c18 refactor(get_app): Workflow for clones/install 2021-11-15 12:37:03 +05:30
Gavin D'souza
79980c3c55 fix: Archived app naming, apps.txt sync
* apps.txt wasn't being synced in time so the build was failing, this
  changes that
* Apps archived on the same day weren't being numbered properly...it
  went from _1 to _1_2 and so forth. This is fixed to show _1, _2 and so
  on
2021-11-13 14:54:08 +05:30
Gavin D'souza
c636c7c133 fix: Use test frappe app - frappe_docs instead of wiki or chat 2021-11-13 14:27:45 +05:30
Gavin D'souza
6890d98847 feat: Add alias for remove-app: rm, remove 2021-11-13 14:27:25 +05:30
Gavin D'souza
e074a1d886 fix: Show traceback in dev mode and set exit code on errors 2021-11-13 14:26:37 +05:30
Gavin D'souza
6123cd5b49 feat: Restart process manager for develop mode 2021-11-13 14:24:39 +05:30
Gavin D'souza
3709682231 fix: Handle collisions while moving apps 2021-11-13 14:23:49 +05:30
Gavin D'souza
17edb4797b fix: Don't fetch meta for rm app 2021-11-13 14:23:08 +05:30
Gavin D'souza
1330e66d07 style: Flake8 + Black-ish
Tried styling and following standards over teh following modules:
* bench.app
* bench.bench
* bench.exceptions
* bench.utils
2021-11-13 03:01:55 +05:30
Gavin D'souza
d2fba5fe52 fix: Cleanup import hell (contd) 2021-11-13 02:53:32 +05:30
Gavin D'souza
e2fd9de921 fix: Cleanup import hell
There was this bug that said `bench.utils.bench` doesn't have attribute
VERSION or whatever bench/__init__ was supposed to have. Now
bench/utils/__init__ had an `import bench` statement that was supposed
to ask for the top level module...but conflicted with the utils.bench
namespace. Changed the line in utils to `from bench import PROJECT_NAME,
VERSION` and it just works now...oh well

Other changes made were an attempt to cleanup and simplify the multi
level dotted path calls
2021-11-13 01:48:30 +05:30
Gavin D'souza
fafb29477c test: Use frappe/chat as the test install app 2021-11-13 00:24:32 +05:30
Gavin D'souza
c4b8391716 fix: Raise and handle Exception class
* Instead of sys.exit, raise ValidationError
* Let's not handle BaseException, just Exception
* Use ValidationError instead of invalid syntax raise str
2021-11-13 00:20:05 +05:30
Gavin D'souza
e08a12477d chore: Get rid of import * utils 2021-11-13 00:19:12 +05:30
Gavin D'souza
4d1ddc4722 refactor: Bench.sync => Bench.apps.sync
* Added missing imports
* Fixed broken import paths
2021-11-12 22:13:27 +05:30
Gavin D'souza
71d178dde9 fix: sync apps file in init, imports and no warn in CI 2021-11-12 20:31:25 +05:30
Gavin D'souza
ee6a967a20 fix: import path for util 2021-11-12 18:56:24 +05:30
Gavin D'souza
89fdd1c5ac chore: Deprecate bench setup socketio 2021-11-12 18:18:21 +05:30
Gavin D'souza
e1ed4d4e53 refactor(minor): Use Bench object to remove app 2021-11-12 18:17:49 +05:30
Gavin D'souza
bae338ad0b feat(minor): Any procman in bench start
Using the `-m` flag, we can use any process manager instead of the
standard honcho. For instance, you've installed overmind on your machine
and are married to it, just run `bench start -m overmind` :P
2021-11-12 18:15:51 +05:30
Gavin D'souza
d04c7feab7 refactor(minor): bench init
Rename --frappe-branch flag to --version, both are allowed though. Cause
of rename: Makes more sense as version rather than frappe_branch. This
is because you can pass any git reference instead of just branches, including
version tags.
2021-11-12 18:13:01 +05:30
Gavin D'souza
53e811fe0a feat: New methods in Bench class
New methods added in Bench class:
* excluded_apps property
* shallow_clone property
* apps property - check if frappe app & sort
* sync: Sync the apps.txt file from the installed set of Frappe apps
* build: Build bench assets
* reload: Reload the Frappe processes - supervisor restart

New methods added in BenchApps class:
* add/append: Adding an App object to this, installs the app on the
  Bench
* remove: Removing an App from here, uninstalls and archives the app
2021-11-12 18:09:35 +05:30
Gavin D'souza
54f9741385 feat: New methods in the App Class
Methods available in the App class:
* get: Clone remote/local repos into set bench
* remove: Uninstall from env & move app into `archived/apps` folder.
  Changed location from `archived_apps`
* install: Install app's Frappe, Python & Node dependencies on set bench
* uninstall: Uninstall Python package of the Frappe App. Does nothing
  else...just a `pip uninstall`
2021-11-12 17:58:24 +05:30
Gavin D'souza
1f11cf4847 chore: Use newer import paths
* Although the utils refactor was done in such a way that there was no
need of changing import paths, a cleanup was due.
* Got rid of duplicated utils
* Remove unused imports
2021-11-12 17:57:03 +05:30
Gavin D'souza
c32616d0f2 refactor(utils): Re-arrange, clean-up
* Cleaner APIs - got rid of redundant and repeated checks
* Easier understanding on what's called where? ;) hopefully
* Separation of utils to avoid confusion
* Remove redundant utils
* Use newer standard library APIs
2021-11-12 17:51:20 +05:30
Gavin D'souza
5c9ac457dd chore: Drop unused setup_env util
This util was dropped in favour of Bench(path).setup.env()
2021-10-30 02:46:18 +05:30
Gavin D'souza
93e5655570 refactor: bench.utils.exec_cmd
Refactoring the official way to run any commands through bench. Added a
way to pass on envvars, and use the new log API w click ;)
2021-10-30 02:44:00 +05:30
Gavin D'souza
ba289fba25 refactor(log): use click to colour everything
A year (longer) ago, I added color to bench manually. I hadn't explored
much of click back then. Had to figure out when we had to and we didnt
have to colour stuff. At times the chars would just be ignored and
rather printed to the terminal which was awkward...anyway, here,
goodbyetoallthat :cheers: (hopefully)
2021-10-30 02:40:29 +05:30
Gavin D'souza
20560c97c4 feat: Skip warnings if envvar BENCH_DEVELOPER set 2021-10-30 02:39:14 +05:30
Gavin D'souza
616dff8fbb fix: Drop support for Frappe v4-5-6 ;)
This was long time due. Removing software that won't be compatible with
this version of Bench is a no-brainer. Sorry for not posting this in
advance but the world has been moving too fast.

Use `pip install frappe-bench --only-binary='all'` to install the latest
supported version for your machine :D
2021-10-30 02:35:32 +05:30
Gavin D'souza
984959beb8 refactor: Adoption of new style Bench notations
* Updated multiple functions
* Updated flow & re-ordered steps of `bench init` - tested with multiple
  args
* Updated exceptions
2021-10-30 02:32:04 +05:30
Gavin D'souza
153546afd7 refactor: Simplify Bench with OOP
Goals:
- Commonify bench operations in a way that intuitive
- Get rid of the multiple duplicate functions because it's so hard to
  understand flow in the codebase ;)
- Eliminate the need to guess, re-guess and pass bench info in each
  function that needs to do literally anything
- Increase my happiness index because I just realised that I'm the top
  contributor of this project and I'd like to make it my own.
- Adopt the principles of Least Surprise & The Principle of The Bigger Smile (of DHH) [inspired by ruby & ror]

Changes:
- The bench module has Bench and the action classes that can be accessed
  through the bench object
- Used the Bench class to access properties like sites, apps & run (to execute commands in context) to reduce effort and clutter
- Style improvements & minor changes included
2021-10-30 02:25:38 +05:30
Gavin D'souza
b59379c5a9 refactor(minor): AppMeta class
* Fix tuple addition
* Rename App to AppMeta - it's more apt given how Bench classes are
  being structured now
2021-10-30 02:06:10 +05:30
Gavin D'souza
c5a38b3647 refactor: Exceptions, Setup & Styles 2021-10-21 16:37:49 +05:30
gavin
8d5f408204
Merge branch 'develop' into get-app-on-steroids 2021-10-20 21:38:52 +05:30
Gavin D'souza
c060ce7b54 refactor(minor): bench install-app
Getting rid of the dependency on the manual coloring of all prints using
color
2021-10-20 19:43:10 +05:30
Gavin D'souza
dafddaef6d refactor: bench get-app
* Added app dependencies resolving using `required_apps`
* Simplified workflow + docstring to explain what's goin on xD
* Get rid of redundant restart_bench kwarg from get_app
2021-10-20 19:42:52 +05:30
Gavin D'souza
1865eeeb6d feat(minor): App Meta handling on disk repos 2021-10-20 19:33:16 +05:30
Gavin D'souza
38382b84fb feat: Initialize bench on bench get(-app) if not created
Why bother creating a bench well in advance? If someone wants to install
your app, they should be able to with a single command.

For instance, you can run simply `bench get healthcare` in any directory and bench will be setup automatically
2021-10-20 01:05:40 +05:30
Gavin D'souza
b75d352454 feat: Aliased Commands
* Added alias for get-app as get
* Now run `bench get erpnext` to install ERPNext on your bench
2021-10-20 00:45:05 +05:30
Gavin D'souza
906ad5a099 feat: bench drop {bench_path}
* Drops bench if no sites' folders found
* Tries to drop crontab entry made for backups
2021-10-20 00:43:46 +05:30
Gavin D'souza
ce00798b5d feat: App Meta Base Class
* Less messier way of setting up and managing pre-fetched app meta
* Added support to fetch apps using the GitHub org/repo pattern
* Can be used to get apps and easily handle dependencies through version
  identifiers
2021-10-20 00:37:36 +05:30
Pruthvi Patel
a28a0d0d23 fix: correct patches.txt 2021-10-18 18:21:24 +05:30
Pruthvi Patel
9f74ec0adb feat: add live_reload to default_config 2021-10-18 16:29:05 +05:30
Francisco Roldán
593b80eec9
feat: Add custom workers in Procfile (#1201)
* feat: updated procfile

* fix: add missing context

* fix: add missing context
2021-10-07 12:20:36 +05:30
kevgeni
641181260e
fix: Allow git url with custom username (#1200)
Allow git url with custom user, and not just the git user.
2021-09-17 15:29:14 +05:30
Francisco Roldán
e0b9461d41
Merge branch 'develop' into queues 2021-09-14 08:43:31 -03:00
Francisco Roldan
75f84625ad fix: rename key 2021-09-14 08:42:06 -03:00
semantic-release-bot
ff2f01fb16 chore(release): Bumped to Version 5.6.0
# [5.6.0](https://github.com/frappe/bench/compare/v5.5.0...v5.6.0) (2021-09-13)

### Bug Fixes

* **command_cache:** Return iterable as fallback ([6fd3ad7](6fd3ad738b))
* Always set return code via cli ([552b935](552b935f6b))
* Hit command cache before fetching all commands ([a94ea19](a94ea19bf4))
* Return fallback list in cached_frappe_commands ([a015501](a015501699))
* set referrer-policy header in nginx config ([a4916d7](a4916d7b89))

### Features

* `bench setup requirements --dev` ([#1196](https://github.com/frappe/bench/issues/1196)) ([b51f0ed](b51f0ed2b2))
* Set default version for easy install to v13 ([#1189](https://github.com/frappe/bench/issues/1189)) ([6137086](6137086e03))
2021-09-13 15:28:21 +00:00
gavin
1f43d9b7d9
Merge pull request #1199 from frappe/staging
chore: Merge staging into v5.x
2021-09-13 20:57:32 +05:30
Gavin D'souza
9584b1ea9f Merge branch 'develop' into staging 2021-09-13 20:56:27 +05:30
Ankush Menat
b51f0ed2b2
feat: bench setup requirements --dev (#1196)
* chore: typo

* chore: update project description

* feat: command to install dev-requirements.txt

Often applications have development or test specific requirements which
are not required in production.

- Add new command `bench setup dev-requirements`
- installs all `dev-requirements.txt` in app's root folder.

* refactor: remove duplicate function

* refactor: use `log` instead of print

* refactor: merge dev-requirement command

* feat: install dev-dependencies in get-app if dev

When developer mode is enabled install all dev dependencies too while
doing `get-app`

* fix: warn about --dev not supporting node
2021-09-13 20:55:21 +05:30
Gavin D'souza
9442511b83 Merge branch 'develop' into staging 2021-09-13 18:49:31 +05:30
Francisco Roldán
58ef0ac430
Merge branch 'develop' into queues 2021-09-09 08:56:34 -03:00
Gavin D'souza
6fd3ad738b fix(command_cache): Return iterable as fallback 2021-09-09 16:05:42 +05:30
Gavin D'souza
b35af193d3 chore: Remove unnecessary returns, re-order cli resolution
Changes suggested by LGTM https://lgtm.com/projects/g/frappe/bench/rev/pr-560978725461013796d605b409ffc5c85c774829
2021-09-09 14:56:32 +05:30
Gavin D'souza
a015501699 fix: Return fallback list in cached_frappe_commands 2021-09-09 13:54:35 +05:30
Gavin D'souza
6160ff48ab style: Black 2021-09-09 13:54:19 +05:30
Gavin D'souza
552b935f6b fix: Always set return code via cli 2021-09-09 13:20:26 +05:30
Gavin D'souza
a94ea19bf4 fix: Hit command cache before fetching all commands 2021-09-09 13:19:44 +05:30
Francisco Roldan
e12f53d1a5 feat: added option to provide custom queues 2021-08-30 12:35:53 -03:00
gavin
beb14c8681
Merge branch 'develop' into referrer-policy 2021-08-30 12:38:59 +05:30
Abhishek Balam
6137086e03
feat: Set default version for easy install to v13 (#1189)
* feat: set default version for easy install to v13

* fix: python version based version picking fixed and reverted changes to node version in installation script

* fix: revert test version

Co-authored-by: gavin <gavin18d@gmail.com>
2021-08-30 12:29:09 +05:30
semantic-release-bot
6697727e68 chore(release): Bumped to Version 5.5.0
# [5.5.0](https://github.com/frappe/bench/compare/v5.4.1...v5.5.0) (2021-07-29)

### Bug Fixes

* ssl nginx directive deprecation ([a514a0e](a514a0e97b))

### Features

* Redis ACL config is added to conf templates ([46e6622](46e66226c2))
2021-07-29 09:21:50 +00:00
gavin
90e7cd4909
Merge pull request #1191 from frappe/staging
chore: Merge staging into v5.x
2021-07-29 14:51:00 +05:30
Gavin D'souza
b59919e410 Merge branch 'develop' into staging 2021-07-29 14:01:21 +05:30
leela
46e66226c2 feat: Redis ACL config is added to conf templates 2021-07-20 06:22:15 +05:30
Roberto Murguia
a514a0e97b fix: ssl nginx directive deprecation 2021-06-15 09:35:04 -05:00
semantic-release-bot
410505f0e9 chore(release): Bumped to Version 5.4.1
## [5.4.1](https://github.com/frappe/bench/compare/v5.4.0...v5.4.1) (2021-05-17)

### Bug Fixes

* Added warning for unshallow without --reset ([01abc56](01abc561e0))
* Handle command execution failures ([dcdb15d](dcdb15d471))
* Remove PY2 compatibility code ([54d48f6](54d48f61a3))
* Revert print compatibility import ([753e36d](753e36d433))
* Show step titles while running operations ([096c2cf](096c2cfe6b))
* Unshallow clone if update without --reset ([4cadf2c](4cadf2c719))

### Performance Improvements

* Faster bench remove-app ([ebc3ceb](ebc3cebd19))
2021-05-17 06:13:50 +00:00
Gavin D'souza
973b8010be chore: Bumped to Version 5.4.0
To match with current version on v5.x branch
2021-05-13 15:45:43 +05:30
Gavin D'souza
593ac8109d Merge branch 'develop' of github.com:frappe/bench into staging 2021-05-13 15:40:34 +05:30
Gavin D'souza
5e0d46db24 Merge branch 'develop' into perf-remove-app 2021-05-13 14:18:15 +05:30
Gavin D'souza
54d48f61a3 fix: Remove PY2 compatibility code
* Set Python requires Python 3.6+ but < Py4
* Remove six from dependencies
* Use click.confirm instead of self implemented confirm code
* Fix imports for 3.6+ compatibility

References for updated imports:
* https://docs.python.org/3/library/configparser.html
* https://docs.python.org/3/library/urllib.request.html#legacy-interface
* https://docs.python.org/3/library/urllib.parse.html#urllib.parse.urlparse
* https://docs.python.org/3/library/importlib.html#importlib.reload
2021-05-11 12:01:32 +05:30
Gavin D'souza
5d563f23ab style: Use f-strings instead of old string formatting methods
These changes are valid only for Py3.6+ and will remove bench CLI
support for Python 3.5 and lesser.

* Converted to f-strings using flynt
* Manual conversion of failed cases
* Simplification of logic
2021-05-11 11:30:27 +05:30
Gavin D'souza
dcdb15d471 fix: Handle command execution failures 2021-05-10 19:10:06 +05:30
gavin
0c21718f7a
Merge branch 'develop' into perf-remove-app 2021-05-10 18:51:57 +05:30
Gavin D'souza
01abc561e0 fix: Added warning for unshallow without --reset 2021-05-10 17:35:31 +05:30
Gavin D'souza
f46126ce2b chore: Remove deprecated option from config template 2021-05-10 14:51:52 +05:30
Gavin D'souza
096c2cfe6b fix: Show step titles while running operations 2021-05-10 14:51:14 +05:30
Gavin D'souza
4cadf2c719 fix: Unshallow clone if update without --reset
If an unshallow clone has to be updated, the only way to update it
without a reset will require an unshallow. This is because there may be
uncommitted or committed changes in any of the apps, although unfavoured
should be handled safely. The only way to update such repos is via the
user configured settings..or a ff only merge.
2021-05-10 14:45:46 +05:30
Gavin D'souza
ebc3cebd19 perf: Faster bench remove-app
Biggest bottleneck is in the validation stage which checks if the app is
installed on any existing sites on the bench. instead of triggering
multiple list-apps for each sites, do one for all.
2021-05-05 16:34:10 +05:30
gavin
dc924dd271
Merge branch 'v5.x' into staging 2021-04-27 12:52:34 +05:30
Gavin D'souza
ed3f2d28fb fix: Remove set-default-site from CLI 2021-04-26 20:16:16 +05:30
Hussain Nagaria
324b58622c chore: Remove set-default-site command 2021-04-26 17:06:30 +05:30
Gavin D'souza
64fbeee1e6 Revert "fix: Use execve and set envvars instead of execv"
This reverts commit 530a980ef7.
2021-04-26 11:32:20 +05:30
Gavin D'souza
7e1db3fd74 test: Update env test
Env folder's include may be empty or non existent
2021-04-23 19:14:30 +05:30
Gavin D'souza
530a980ef7 fix: Use execve and set envvars instead of execv
Changed from execv to execve with empty env dict because bench commands on macOS 10.14.6 PY3.9.0a4 fails with "Error while finding module specification for 'frappe.utils.bench_helper' (ModuleNotFoundError: No module named 'frappe')"

This error has come up in the past too. I'm now suspecting it has
something to do with the current process passing on it's environment
variables to the process that's going to replace it, which causes these
issues.

Note that direct execution of the commands without the bench wrapper
worked fine although via bench failed with the specified error
2021-04-23 18:38:27 +05:30
Gavin D'souza
b0ccb6efbe fix: Invoke pip via python
Due to "WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip. Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue. To avoid this problem you can invoke Python with '-m pip' instead of running pip directly."
2021-04-23 18:37:03 +05:30
Gavin D'souza
405f41e434 test: Use frappe_theme to test apps instead of erpnext
* Don't skip assets
2021-04-23 11:25:29 +05:30
Gavin D'souza
f04a9e6e0d chore: Remove deprecated command switch-to-master 2021-04-23 11:25:24 +05:30
Gavin D'souza
da85e0ccdd refactor: Optimize and simplify imports
* make relative imports absolute
* minor: Simplify logic
2021-04-23 11:05:06 +05:30
Gavin D'souza
778fe6cb0b fix: Don't break update if no sites exist on patching sites stage 2021-04-23 10:47:36 +05:30
gavin
4b31ac078b
Merge pull request #1130 from CaseSolvedUK/shallow_pull
feat: Keep repos shallow if --reset and shallow_clone are specified in bench update --pull
2021-04-23 10:28:47 +05:30
gavin
cba3f7d8a4
Merge pull request #1147 from ankush/fix_compile
fix: use correct path for compiling py files
2021-04-21 11:53:10 +05:30
Gavin D'souza
1e56d04e94 Merge branch 'develop' of github.com:frappe/bench into declarative-setup-bench 2021-04-20 10:56:33 +05:30
gavin
558006068f
Merge branch 'develop' into fix_compile 2021-04-19 18:15:49 +05:30
Sagar Vora
ec2ce0f3b8 chore: remove support for older versions of frappe 2021-04-13 13:06:08 +05:30
Ankush Menat
b3a0757e38
fix: use correct path for compiling py files 2021-04-02 19:48:04 +05:30
Mohammad Hasnain Mohsin Rajan
4c627e4531
chore: update version (#1138)
* chore: update version

* chore: use dev version on develop branch

* chore: move develop branch check before imports
2021-03-18 13:57:21 +05:30
casesolved-co-uk
a1db48b57e fix: serious bug capable of deleting apps path 2021-03-17 16:20:47 +00:00
Richard Case
0ff8dddef9 fix: only get the specific branch for version check 2021-03-17 16:20:47 +00:00
Richard Case
895c403278 fix: only fetch current branch 2021-03-17 16:20:47 +00:00
Richard Case
82173c1d42 fix: only fetch what is necessary, simplify & improve grepability 2021-03-17 16:20:47 +00:00
Richard Case
66240e1f8d feat: Keep repos shallow if --reset is specified and shallow_clone is set 2021-03-17 16:20:47 +00:00
Revant Nandgaonkar
f109c3eaad
Merge branch 'develop' into setup-supervisor-skip-redis 2021-03-02 13:08:34 +05:30
gavin
f3809b00ac
Merge pull request #1121 from NicolasStr/develop
fix: create bench folder in user directory
2021-02-26 19:22:09 +05:30
gavin
034e0085e9
Merge pull request #1124 from adityahase/perf-cli
perf: Faster CLI
2021-02-26 16:39:01 +05:30
Revant Nandgaonkar
5cf1363481 feat: skip redis config during supervisor setup 2021-02-26 07:55:04 +05:30
Aditya Hase
b70aa21a73
chore: Remove unused import comment blocks 2021-02-21 11:24:32 +05:30
Aditya Hase
5d90346660
perf: Remove six.moves.reload_module from the import tree 2021-02-21 11:12:57 +05:30
Aditya Hase
2df0bf726d
perf: Remove semantic_version from the import tree 2021-02-21 11:12:40 +05:30
Aditya Hase
07ecaa1f77
perf: Remove shutil from the import tree 2021-02-21 11:12:00 +05:30
Aditya Hase
6706b230da
perf: Remove six.moves.urllib from the import tree 2021-02-21 11:10:43 +05:30
Aditya Hase
c5d2fb9255
perf: Remove bench.config.common_site_config from the import tree 2021-02-21 10:06:44 +05:30
Aditya Hase
cab2d44df5
perf: Remove bench.config.letsencrypt from the import tree 2021-02-21 10:06:11 +05:30
Aditya Hase
36e48c7dd7
perf: Remove bench.config.nginx from the import tree 2021-02-21 10:05:40 +05:30
Aditya Hase
5525548ced
perf: Remove six.moves.urllib from the import tree 2021-02-21 10:04:03 +05:30
Aditya Hase
e12717d63a
perf: Remove crontab from the import tree 2021-02-21 10:03:36 +05:30
Aditya Hase
6c0e1a359e
perf: Remove siz.moves.configparser from the import tree 2021-02-21 10:03:03 +05:30
Aditya Hase
8527b106c3
perf: Remove multiprocessing from the import tree 2021-02-21 10:02:41 +05:30
Aditya Hase
104efd349b
perf: Remove ast from the import tree 2021-02-21 10:02:20 +05:30
Aditya Hase
2a4377ac6f
perf: Remove crontab from the import tree 2021-02-21 10:02:02 +05:30
Aditya Hase
ad37665e8b
perf: Remove multiprocessing from the import tree 2021-02-21 10:01:44 +05:30
Aditya Hase
ad90d9485f
perf: Remove Jinja and PackageLoader from the import tree 2021-02-20 13:52:39 +05:30
Aditya Hase
df773d4f9f
perf: Remove git from the import tree 2021-02-20 13:22:56 +05:30
Aditya Hase
cc92584927
perf: Remove requests from the import tree 2021-02-20 13:14:56 +05:30
DANY ROBERT
fec8921214
fix: fail2ban help message 2021-02-18 11:31:38 +05:30
Nicolas Streng
5c5d2b57df fix: create bench folder in user directory 2021-02-16 16:45:07 +01:00
Ankush Menat
bc21abb095
Merge branch 'develop' into branch_help_command 2021-02-09 11:09:10 +05:30
Ankush Menat
7e171967b3
docs: Update help message for --frappe-branch 2021-02-09 11:06:04 +05:30
semantic-release-bot
9a069246f2 chore(release): Bumped to Version 5.3.0
# [5.3.0](https://github.com/frappe/bench/compare/v5.2.1...v5.3.0) (2021-02-04)

### Bug Fixes

* Run compileall in bench after update ([54e6bcf](54e6bcfe9c))
* wrong flag description ([e9c046d](e9c046d56b))
* **install:** Allow override of frappe_branch and erpnext_branch ([6a207ca](6a207ca57a))
* **install:** Helpful logging ([2c4659a](2c4659a7aa))
* **playbooks:** Support wkhtmltox arm64 architecture ([d6d1b91](d6d1b91a79))
* Allow bench src as root ([9d1f7a7](9d1f7a7ed7))
* force renew on monthly bases ([7dcd5f9](7dcd5f9ce3))
* Handle no args passed in CLI ([31e4aee](31e4aeeab8))
* Install wheel during ansible setup ([61567be](61567be3f6))
* Log in ~/bench.log if not running inside bench directory ([28302f6](28302f67a3))
* removed force renewal as it would extend by 3 months every month, now the job runs daily ([408676c](408676c80e))
* removed patch ([87edc4e](87edc4e109))
* Use NullHandler for commands executed outside a bench dir ([31f2999](31f2999b4b))
* utf8mb4_general_ci ([f2e7702](f2e7702fde))
* **install:** Install dev packages for Arm 64-bit ([df0562d](df0562d59b))
* **install:** Obey --without-site ([608b28c](608b28c246))
* Add bench.cli namespace ([2f0b508](2f0b508d2e))
* Remove src test ([b8ed4f6](b8ed4f6a4b))
* Unpin setuptools, six and virtualenv ([03576d1](03576d10b4))
* update letsencrypt renew cron frequency ([7a7b0fe](7a7b0fea37))
* Update package lists and setup prereqs before setting up script ([550f55d](550f55d146))
* Updated command help and verbosity while setting crontab ([c9abac2](c9abac299a))
* Use 'develop' bench if not specified! ([0ad4421](0ad44214cf))
* warning on pip reinstall ([d979751](d979751e0c))

### Features

* better flag description ([9de383a](9de383a760))
* patch for older setups with wrong cron format ([1e97cdf](1e97cdf0c8))
* patch for older setups with wrong cron format ([097879e](097879e1fb))
* pitch erpnext support to VM users ([137a78a](137a78a6b0))
2021-02-04 10:26:17 +00:00
Raffael Meyer
7f9bed4c8e
fix: nginx proxy buffer 2021-01-25 19:36:56 +01:00
Samuel Danieli
9de383a760
feat: better flag description
Co-authored-by: gavin <gavin18d@gmail.com>
2020-12-02 12:01:25 +01:00
Samuel Danieli
e9c046d56b
fix: wrong flag description 2020-12-01 16:04:57 +01:00
gavin
e16824f23e
Merge pull request #1094 from gavindsouza/compileall-here
fix: Run compileall in bench after update
2020-11-09 10:47:35 +05:30
Gavin D'souza
54e6bcfe9c fix: Run compileall in bench after update 2020-10-30 19:52:43 +05:30
Hendy Irawan
6ef6e37b80 style: Apply suggestions from code review
Co-authored-by: gavin <gavin18d@gmail.com>
2020-10-30 11:02:45 +00:00
Hendy Irawan
d6d1b91a79 fix(playbooks): Support wkhtmltox arm64 architecture
For Ubuntu 20.04 LTS and later
2020-10-30 11:02:45 +00:00
gavin
de14fc6f1c
Merge pull request #1087 from ceefour/patch-without-site
fix(install): Obey --without-site
2020-10-28 12:41:46 +05:30
gavin
c9155cba1e
Merge branch 'develop' into patch-without-site 2020-10-28 12:14:23 +05:30
gavin
3b736f97b8
Merge branch 'develop' into mr-karan-patch-1 2020-10-28 11:49:45 +05:30
Adam Tang
f2e7702fde
fix: utf8mb4_general_ci
fix: prevent error while bench new-site
2020-10-28 09:04:41 +08:00
Hendy Irawan
608b28c246 fix(install): Obey --without-site 2020-10-27 16:33:37 +00:00
Karan Sharma
f17c579ffd build(config): Change default worker count 2020-10-27 16:13:57 +00:00
Gavin D'souza
b8ed4f6a4b fix: Remove src test 2020-09-24 16:16:31 +05:30
Gavin D'souza
2f0b508d2e fix: Add bench.cli namespace 2020-09-24 13:35:47 +05:30
Gavin D'souza
28067f6f9c test: Add bench utils tests 2020-09-24 13:09:58 +05:30
gavin
e345d18c7d
Merge branch 'develop' into bench-cli-fix 2020-09-24 13:00:28 +05:30
Gavin D'souza
31e4aeeab8 fix: Handle no args passed in CLI 2020-09-24 12:56:11 +05:30
gavin
282f7928f7
Merge branch 'develop' into declarative-setup-bench 2020-09-10 11:56:36 +05:30
Gavin D'souza
3ddbff4eaa chore: Assign variables to simplify block 2020-09-10 11:49:03 +05:30
gavin
aa1a1b9a71
fix: Return repo_name if app_name doesn't exist 2020-09-10 11:44:45 +05:30
gavin
37d30e5944
Merge branch 'develop' into log-in-files 2020-09-10 11:16:12 +05:30
Gavin D'souza
c9abac299a fix: Updated command help and verbosity while setting crontab 2020-09-10 10:53:51 +05:30
Gavin D'souza
31f2999b4b fix: Use NullHandler for commands executed outside a bench dir 2020-09-10 10:10:55 +05:30
Abhishek Balam
87edc4e109 fix: removed patch 2020-09-09 21:31:57 +05:30
Abhishek Balam
408676c80e fix: removed force renewal as it would extend by 3 months every month, now the job runs daily 2020-09-09 19:44:53 +05:30
Abhishek Balam
ac2afb32da Merge branch 'letsencyrpt-renew' of https://github.com/abhishekbalam/bench into letsencyrpt-renew 2020-09-08 13:20:40 +05:30
Abhishek Balam
1e97cdf0c8 feat: patch for older setups with wrong cron format 2020-09-08 13:00:51 +05:30
Abhishek Balam
097879e1fb feat: patch for older setups with wrong cron format 2020-09-08 12:58:56 +05:30
Abhishek Balam
7dcd5f9ce3 fix: force renew on monthly bases 2020-09-08 12:15:35 +05:30
Abhishek Balam
7a7b0fea37 fix: update letsencrypt renew cron frequency 2020-09-07 18:58:24 +05:30
Raffael Meyer
0b707b1d82
Merge branch 'develop' into referrer-policy 2020-09-03 14:48:14 +02:00
Gavin D'souza
28302f67a3 fix: Log in ~/bench.log if not running inside bench directory 2020-09-03 13:13:24 +05:30
Gavin D'souza
9d1f7a7ed7 fix: Allow bench src as root 2020-09-03 13:11:31 +05:30
Gavin D'souza
1841b5fa9c chore: bump bench to v5.2.1 2020-08-24 17:04:08 +05:30
Gavin D'souza
fe2d927133 fix: Show correct src of bench source 2020-08-24 15:28:33 +05:30
Revant Nandgaonkar
c5cf9164a6 fix: supervisor command does not require sudo 2020-08-24 13:33:51 +05:30
Gavin D'souza
4f73fb4b1f chore: bump bench to v5.2.0 2020-08-18 15:37:50 +05:30
gavin
e8436b319b
Merge branch 'develop' into referrer-policy 2020-08-18 11:09:32 +05:30
Adam Tang
9bdff524cd fix: dns caching handle name not match 2020-08-14 13:39:10 +08:00
gavin
3332051dae
Merge pull request #1036 from gavindsouza/test-traceback
travis: Separate builds for setup, install script and tests
2020-08-05 15:01:26 +05:30
gavin
b02b034a78
Merge branch 'develop' into bump-node-v12 2020-08-05 14:01:03 +05:30
gavin
c93628c13f
Merge branch 'develop' into update-supervisord-conf 2020-08-05 13:08:58 +05:30
gavin
0005982e21
Merge branch 'develop' into bump-node-v12 2020-08-05 13:08:34 +05:30
Gavin D'souza
de5e278912 fix: Bump Nodejs v8 => v12 2020-08-05 13:07:12 +05:30
gavin
2b2783368a
chore: fix outdated update help 2020-08-04 16:34:19 +05:30
ABHISHEK KEDAR
547f2bae82
feat: bench start --no-prefix (#1040)
* bench start --no-prefix option

* help added for --no-prefix option
2020-08-03 17:48:00 +05:30
Gavin D'souza
939d3d5c6d chore: run specified test alone 2020-07-13 19:18:35 +05:30
Gavin D'souza
87bc347b5c style: sorted imports + trailing spaces 2020-07-13 19:03:15 +05:30
Gavin D'souza
6dc784fe4d fix(tests): print traceback from errors 2020-07-13 19:01:51 +05:30
Gavin D'souza
8173b009f6 Revert "debug: check if there's an exception being raised silently"
This reverts commit 115d88faf3.
2020-07-13 18:43:18 +05:30
Gavin D'souza
312a92d0ca fix: compatible configparser get 2020-07-13 18:36:21 +05:30
Gavin D'souza
115d88faf3 debug: check if there's an exception being raised silently 2020-07-13 18:20:05 +05:30
Gavin D'souza
851b4c3275 fix(tests): add --yes flag to production setup 2020-07-13 12:04:21 +05:30
Gavin D'souza
fb5e150105 fix: added verbosity 2020-07-13 11:39:14 +05:30
gavin
2fa84e6102
Merge branch 'develop' into update-supervisord-conf 2020-07-10 12:58:19 +05:30
Gavin D'souza
fa6519c901 Merge branch 'develop' into update-supervisord-conf 2020-07-07 16:33:03 +05:30
gavin
074a20e6a2
Merge branch 'develop' into x-forward-fix 2020-07-07 16:27:02 +05:30
Rohan Bansal
10d913a051 Merge remote-tracking branch 'upstream/develop' into fix-crontab-backups 2020-07-06 16:52:39 +05:30
Rohan Bansal
e5c3b591f7 patch: fix old auto-backup cron jobs 2020-07-06 16:52:09 +05:30
gavin
6c4bb2883b
Merge branch 'develop' into declarative-setup-bench 2020-07-06 11:52:17 +05:30
gavin
3ae5cb5124
Merge pull request #1032 from gavindsouza/no-editable-warn
fix: don't show warning message in developer mode
2020-07-06 10:52:14 +05:30
Gavin D'souza
ce0a3de259 fix: dont show warning message in developer mode 2020-07-03 16:17:49 +05:30
Rohan Bansal
691687edbe fix: run backups every 6 hours, rather than every minute per 6 hours 2020-07-01 18:54:41 +05:30
gavin
d50e32b84c
Merge pull request #1023 from gavindsouza/log-via-bench.utils.log
fix: populate bench.log via bench.utils.log
2020-06-29 16:22:22 +05:30
Nikunj Patel
3336cff2b4
feat(playbooks): wkthmltox for Ubuntu 20 (#1019)
* Updating file to support Ubuntu20.04 LTS
* Update main.yml
* Update bench/playbooks/roles/wkhtmltopdf/tasks/main.yml
* Removed checksum from Ubuntu 20

Co-authored-by: gavin <gavin18d@gmail.com>
2020-06-24 12:40:03 +05:30
sahil28297
42cd38b76e
Merge branch 'develop' into declarative-setup-bench 2020-06-23 16:04:01 +05:30
Chinmay D. Pai
186ba280f1
fix: add declarative config support for bench
bench will attempt to read name and version from setup.cfg before trying
to access setup.py for details

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-06-23 14:24:14 +05:30
Chinmay Pai
6c159255d2
Merge branch 'develop' into referrer-policy 2020-06-18 11:12:16 +05:30
Chinmay D. Pai
a6bb58717d
fix: use remote_addr instead of user-defined header ip
$proxy_add_x_forwarded_for sets the user defined ip in the request.
changing it to $remote_addr ensures that nginx sets the remote ip
itself, disregarding user-specified ip from the request.

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-06-11 18:30:00 +05:30
gavin
ed211bcd40
Merge branch 'develop' into patch-2 2020-06-11 11:21:45 +05:30
gavin
600ff9c476
Merge branch 'develop' into log-via-bench.utils.log 2020-06-10 19:31:06 +05:30
Gavin D'souza
2fd86c9eb6 fix: populate bench.log via bench.utils.log 2020-06-10 19:27:58 +05:30
Gavin D'souza
fc4b90acdb fix: add logging and set user if not passed 2020-06-10 19:25:35 +05:30
Gavin D'souza
629842a042 fix: show if service manager not found, also log it 2020-06-10 19:23:10 +05:30
Gavin D'souza
26ddfe73e2 chore: use print statement for editable warning instead 2020-06-10 19:22:21 +05:30
Gavin D'souza
deb854b9d9 fix: add confirmation for supervisord conf update 2020-06-10 18:22:15 +05:30
Gavin D'souza
c43da5be68 fix: update supervisord conf and reload, log everything 2020-06-10 18:15:01 +05:30
gavin
70cb41fa0d
Merge branch 'develop' into fix-delete 2020-06-10 14:46:29 +05:30
Shivam Mishra
52ee67f298 fix: trailing slash deleting apps folder 2020-06-10 14:11:33 +05:30
Nikunj Patel
fdcf01d45c
For ubuntu >=18.04 use libssl1.1 to support upgrade of OS
For ubuntu >=18.04 use libssl1.1 to support upgrade of OS since libssl1.0-dev is not supported by Ubuntu20.04 LTS.
2020-06-09 12:25:26 +02:00
Gavin D'souza
cac837547c fix: maintain worker and worker.error logfile in dev mode 2020-05-27 19:56:45 +05:30
Chinmay D. Pai
a4916d7b89
fix: set referrer-policy header in nginx config
sets the "Referrer-Policy" header to "strict-origin-when-cross-origin",
with "same-origin" as a fallback

setting the referrer policy prevents sharing site context to external
links, preventing cross-site hijacking or tab nagging.

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-05-26 10:51:34 +05:30
Gavin D'souza
2c5d1188b8 chore: bump bench to v5.1.0 2020-05-22 17:17:35 +05:30
Gavin D'souza
0ba5a09975 chore: remove unused class 2020-05-21 13:15:19 +05:30
Gavin D'souza
7dc5fdb7b3 chore: update APIs, remove duplicate logs 2020-05-21 13:14:16 +05:30
Gavin D'souza
4480ea21ac chore(logging) set logging level to INFO 2020-05-21 12:45:28 +05:30
gavin
89dd9721c2
Merge pull request #975 from Thunderbottom/skip-restart-on-setup-req
chore: skip restart on bench setup requirements
2020-05-21 11:08:19 +05:30
gavin
119b08f531
Merge pull request #998 from gavindsouza/drop-dead-code
chore: drop dead code
2020-05-21 10:45:07 +05:30
gavin
56c2e14514
Merge branch 'develop' into skip-restart-on-setup-req 2020-05-21 10:23:37 +05:30
gavin
0185300afd
Merge branch 'develop' into drop-dead-code 2020-05-21 10:20:35 +05:30
gavin
e239f69fc2
Merge branch 'develop' into skip-restart-on-setup-req 2020-05-21 10:20:00 +05:30
gavin
7f3e4b9fbb
Merge branch 'develop' into fix-setup-requirements 2020-05-20 20:09:45 +05:30
Aditya Hase
d6d552723b
Merge branch 'develop' into fix-setup-requirements 2020-05-20 18:50:54 +05:30
gavin
4dfa6339d1
Merge branch 'develop' into bench-logger 2020-05-20 18:49:58 +05:30
gavin
f74b971248
Merge branch 'develop' into skip-restart-on-setup-req 2020-05-20 18:49:32 +05:30
Gavin D'souza
1bb07166d4 chore: drop check_url 2020-05-20 18:34:07 +05:30
gavin
1935afa634
Merge branch 'develop' into fix-setup-requirements 2020-05-20 17:34:24 +05:30
gavin
26e118a3d7
Merge branch 'develop' into bench-logger 2020-05-20 17:34:06 +05:30
gavin
ca6483ff70
Merge branch 'develop' into drop-dead-code 2020-05-20 17:33:53 +05:30
gavin
78c1b24345
Merge branch 'develop' into skip-restart-on-setup-req 2020-05-20 17:33:40 +05:30
gavin
97b4967753
Merge branch 'develop' into saurabh6790-patch-1 2020-05-20 16:58:48 +05:30
Saurabh
af8dd8f98f
Fix: IUS release repo 2020-05-20 12:56:57 +05:30
Chinmay D. Pai
e52dc985c7
chore: rename postprocess to restart_bench
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-05-19 18:23:59 +05:30
Chinmay D. Pai
a4a9b59f42
fix: build assets regardless of postprocess
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-05-19 18:17:38 +05:30
Gavin D'souza
dd047002a1 fix: dont run ayrn install while setting up py reqs 2020-05-19 14:14:01 +05:30
Gavin D'souza
53919b624e fix: add log filter to handler 2020-05-19 13:47:48 +05:30
Gavin D'souza
0be833ad85 fix: cleaner and intuitive bench logs 2020-05-19 13:11:57 +05:30
Gavin D'souza
34de3d03a4 chore: drop dead code 2020-05-19 13:09:08 +05:30