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

1290 Commits

Author SHA1 Message Date
Gavin D'souza
42e6da6eae Merge branch 'develop' into staging 2022-07-30 01:14:13 +05:30
Gavin D'souza
a5b7a101d2 refactor: Use Suppress instead of try-pass 2022-07-30 01:12:27 +05:30
Gavin D'souza
fe045d1428 Merge branch 'develop' into staging 2022-07-29 19:25:41 +05:30
barredterra
df84c2772d fix: use specified python for venv 2022-07-28 14:19:09 +02:00
Gavin D'souza
203f41e405 test: Skip deps resolution for non develop branches 2022-07-28 13:35:04 +05:30
Gavin D'souza
1badfa8da4 ci: Update conditions for FRAPPE_BRANCH 2022-07-27 16:54:46 +05:30
gavin
e66fe9ca02
Merge pull request #1333 from lhjt/patch-1
fix(nginx): set `proxy_http_version` to `1.1`
2022-07-27 15:34:37 +05:30
Orsiris de Jong
94a25d3da7
fix(config): Fix fail2ban filter (#1308)
* Add missing nginx-proxy filter

* Add all nginx log files to fail2ban filter, regardless of frappe site

* Adds per site nginx logs in /var/log
2022-07-27 14:58:53 +05:30
Gavin D'souza
af46fedc28 refactor(minor): Use more readable alternatives 2022-07-27 14:39:32 +05:30
Gavin D'souza
a84239d6ab refactor: Bench
* Drop patches of v3 & v4
* Re-write buggy / broken code wrt hints by pre-commit checks
* Auto-format and transform code
* Remove re-written & mutable function defaults
2022-07-27 14:39:22 +05:30
gavin
a481934d53
Merge pull request #1334 from gavindsouza/better-cli-resolution
refactor(cli): Commands Resolution
2022-07-27 14:37:16 +05:30
Gavin D'souza
e03f597ac6 fix: get-app on existing apps
get-app to replace existing folder would fail due to bad url generation.

Changes
* Archive old repo instead of overwritting
* Resetting flags in App instance
2022-07-27 14:24:10 +05:30
Gavin D'souza
8a0b78451b fix: Add support for options on bench main group
Options like --use-feature, --version are tested and support maintained
by the changes defined in this commit
2022-07-27 14:23:16 +05:30
Gavin D'souza
a6f196440a refactor(cli): Commands Resolution
The implementations so far were hacks that worked for the most used
commands but broken down when challenged or expected to maintain
documented usages [eg: custom app commands].

The current implementation consists of a two step approach:
1. figure out command name that user is trying to execute
2. pass the directive to the app (bench, frappe or other) that consists of the cmd

---

For tackling #1, get_cmd_from_sysargv contains exhaustive rules that
cover all (that i know and ive come across) combinations of valid
frappe commands.

For problem #2, a simple check in click's Group object does the trick.

Tested with possible known commands with combinations of context flags
and params, with bench, frappe & external app's commands
2022-07-27 11:08:19 +05:30
Jared L
7da62f96f2
fix(nginx): set proxy_http_version to 1.1
This sets the `proxy_http_version` to `1.1`.

The reason this change should be implemented is that when this is deployed in a Kubernetes environment with Istio, the proxy request fails with HTTP error 426 as the HTTP version is too low for envoy to handle. Setting it to `1.1` will solve the issue.
2022-07-25 10:38:47 +10:00
Gavin D'souza
db1dc6225f Merge branch 'develop' into staging 2022-06-29 19:31:54 +05:30
Gavin D'souza
beac865153 fix: Use == to define had pinned requirement
This allows one to add a dependency like `PyPika = '5.1.0'` directly
instead of `PyPika = '==5.1.0'`
2022-06-29 19:29:31 +05:30
Gavin D'souza
777ac114cd Merge branch 'develop' into staging 2022-06-29 19:16:11 +05:30
Aradhya Tripathi
45267fc897
fix: fixed update_app_states call (#1326) 2022-06-23 00:10:41 +05:30
Gavin D'souza
75957a56ee feat: Setup dev-dependencies defined via pyproject
Since support for pyproject.toml exists, Frappe has gotten rid of
requirements.txt file. However, dev-requirements.txt file still existed
in Frappe & other apps. With this, we can get rid of the separate
dev-reqs file as well and replace it by defining the deps in pyproject
under [tool.bench.dev-dependencies]

Example:

For Frappe, this transition will look like moving the contents of
dev-requirements.txt as follows:

```
\# dev-requirements.txt
coverage==5.5
Faker~=13.12.1
pyngrok~=5.0.5
unittest-xml-reporting~=3.0.4

```

```
\# pyproject.toml
[tool.bench.dev-dependencies]
coverage = "==5.5"
Faker = "~=13.12.1"
pyngrok = "~=5.0.5"
unittest-xml-reporting = "~=3.0.4"
```

Note: If dev-dependencies are defined in pyproject.toml, and a
dev-dependencies.txt file exists - the txt file will be ignored.
2022-06-16 18:16:57 +05:30
Gavin D'souza
ffae670be7 fix: (re)Install every Frappe app even if not installed to env 2022-06-16 17:54:21 +05:30
Gavin D'souza
3629262543 Merge branch 'develop' into staging 2022-06-14 17:49:01 +05:30
Gavin D'souza
d8e6fbe34b Merge branch 'develop' into staging 2022-06-14 17:46:22 +05:30
Gavin D'souza
800394cdda feat: Support Frappe app distributions with pyproject.toml
Patches get_app_name which reads app name from pyproject's project.name
attribute, setup.cfg's metadata.name or setup.py's name variable.
2022-06-14 16:01:42 +05:30
Gavin D'souza
24e2dd37fe chore: Remove release related tests 2022-06-14 16:00:50 +05:30
Gavin D'souza
21eceae6ac chore: Drop dead code
tx [vulture](https://pypi.org/project/vulture/)
2022-06-14 15:48:56 +05:30
Gavin D'souza
4fcda9ae22 chore: Drop release project
Release is yet another dead / unmaintained project in bench. It used to
be in action - the tool to release ERPNext & Frappe for years but we've
moved to other automated pipelines (that have been around for a while
too). Time to say good-bye to these commands too 👋
2022-06-14 15:41:22 +05:30
gavin
a1a0d5dae4
Merge pull request #1319 from rtdany10/patch-3
fix: Bump Nodejs v12 => v14
2022-06-14 11:13:41 +05:30
Gavin D'souza
07c3c75cd3 Merge branch 'develop' into staging 2022-06-09 11:27:20 +05:30
Aradhya Tripathi
dfed5c64a2
Merge branch 'develop' into fixes 2022-06-09 10:29:53 +05:30
Aradhya
011332da14 tests: Updated tests 2022-06-09 10:29:07 +05:30
Aradhya
5f37135ff2 fix: using local clones if path is passed in get-app 2022-06-09 10:27:53 +05:30
Gavin D'souza
2005fde2cd Merge branch 'develop' into staging 2022-06-08 13:28:22 +05:30
Dany Robert
cd0fccfdb4
fix: Bump Nodejs v12 => v14 2022-06-06 17:18:54 +05:30
Devin Slauenwhite
e69b612035 feat: get-app ln -s 2022-06-03 04:47:23 +00:00
Orsiris de Jong
593c7b737f
feat(config): Add IPv6 listener to nginx site configuration (#1312) 2022-05-30 17:05:08 +05:30
Gavin D'souza
e0f6b1735d fix: Remove virtualenv dependency
Use virtualenv cli only if found in PATH. Else use
venv package of the invoker's Python installation.
venv was added in the std lib since PY33.

ref: https://docs.python.org/3/library/venv.html
2022-05-30 14:32:55 +05:30
Devin Slauenwhite
a88932592e
fix: replace certbot-auto with certbot (#1303)
* fix: replace certbot-auto references with certbot and add in prerequesites ansile tasks

* fix: config file flag fix

* fix: certbot path using find_executable instead of hardcoded

* fix: remove easy install entry for certbot

* fix: replace find_executable with which

* fix: no need to check and raise.

* fix: provide user with cerbot install instructions"

* fix: return certbot path

* fix: Use get_certbot_path instead of harcoded path

Co-authored-by: Abhishek Balam <abhishekbalam96@gmail.com>
Co-authored-by: gavin <gavin18d@gmail.com>
2022-05-23 12:44:25 +05:30
gavin
f7f7459c51 fix: Delete folder if --no-backup is passed 2022-05-19 13:09:18 +05:30
gavin
69e14e512f feat(remove-app): Options for no backup of app & force removal 2022-05-19 13:00:09 +05:30
gavin
a3b859bf50 fix(remove-app): Use App.name instead of App.repo for consistent App name 2022-05-19 12:58:24 +05:30
gavin
117d456b16 fix: Handle tag fetching failures of disk mounted App inits 2022-05-19 12:57:05 +05:30
Aradhya
e7055fc6d9 test: Added tests for frappe tags 2022-05-15 23:58:45 +05:30
Aradhya
19f932513f feat: verbose error messages 2022-05-15 23:20:15 +05:30
Aradhya
cb2b0b0d7c feat: using gitpython for branch validation 2022-05-15 17:26:05 +05:30
Revant Nandgaonkar
c943b30c66 fix: allow bench init with git tags 2022-05-15 15:39:08 +05:30
Aradhya
2c77dda3c0 test: updated tests 2022-05-10 03:03:15 +05:30
Aradhya
7980709a20 fix: updated apps.sync to support new app_name parameter 2022-05-10 02:58:30 +05:30
Aradhya
fd216f952a Merge branch 'fixes' of github.com:Aradhya-Tripathi/bench into fixes 2022-05-10 02:06:44 +05:30
Aradhya
1cc961ea55 style: removed unused imports 2022-05-10 02:05:25 +05:30