Ankush Menat
9244140816
fix!: Bind development server only to localhost ( #22397 )
2023-09-13 17:26:19 +05:30
0xsaif
aa7ee1c6b9
refactor: force ipv4 localhost ( #22394 )
...
* reafctor: force ipv4 localhost
Replacing "localhost" with "127.0.0.1" in the codebase; sometimes the name localhost force-resolves to ipv6
* revert: leave localhost usage in oauth tests
Change not required.
---------
Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-09-13 16:23:23 +05:30
Ankush Menat
970a740164
revert: #22308 ( #22389 )
...
* Revert "chore: move function to correct file"
This reverts commit ebfdfa283b .
* Revert "refactor!: merge get_site_url into get_url (#22308 )"
This reverts commit 2001bc278f .
2023-09-13 14:34:52 +05:30
Ankush Menat
64dd4b876b
fix: UI test dont start without init
2023-09-13 12:33:49 +05:30
David Arnold
2001bc278f
refactor!: merge get_site_url into get_url ( #22308 )
...
* chore: merge get_site_url into get_url
* fix: keep alias with deprecation notice
2023-09-11 15:09:05 +05:30
David Arnold
87684e2647
feat: add werkzeug proxyfix to development server
2023-09-07 01:30:25 +02:00
Ankush Menat
b29272c092
fix: ipython console
...
https://github.com/ipython/ipython/issues/13966
2023-09-03 19:59:41 +05:30
gavin
ddc4e4813a
Merge pull request #22253 from gavindsouza/trim_database-fix
...
fix(trim-db): Dont show confirm dialog on dry run
2023-08-31 11:26:38 +05:30
Gavin D'souza
d4fe4c7e02
fix(trim-db): Dont show confirm dialog on dry run
2023-08-30 13:04:33 +00:00
Raffael Meyer
8f7a4f6697
Merge pull request #21873 from blaggacao/dont-exceed-python-module-boundary
2023-08-21 17:10:27 +02:00
Ankush Menat
fd740b780b
fix: use vanilla eval
2023-08-21 12:09:45 +05:30
David Arnold
8dabd2bae6
refactor: make the app source accessor explicit
...
The parent folder of a python module (inside `./site-packages`) can be
`./lib`. Separate code paths that depend on the app source into its own
getter so that patching that function becomes easier in those cases
where the python module is not served from the source checkout.
2023-08-20 01:11:05 +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
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
441495b561
refactor!: Drop support for currentsite.txt ( #21536 )
...
* refactor!: Drop currentsite.txt
- `bench use` will continue to work.
- Instead of txt file use common_site_config to set default site using `default_site` key.
- `FRAPPE_SITE` environment variable also works
* fix(DX): warn if non-empty currentsite.txt is present
2023-06-30 17:57:40 +05:30
Ankush Menat
1092eef7bd
perf: faster pending jobs check
2023-06-29 17:31:06 +05:30
Ankush Menat
73bca16d77
feat: RQ WorkerPool
...
RQ now has experimental support for workerpools.
When to use this?
Roughly when you have more than 2 workers a workerpool might make
sense, below 2 it's overhead as master "pool" process will need to run
to manager workerpool itself.
Why is it any better?
Currently we just let supervisor duplicate the worker process N number
of times. This is inefficient from shared memory POV. Forking the
original process to create workers enables sharing of more memory thus
leading upwards of 60-70% reduction in memory usage with pool size of 8
workers.
2023-06-26 18:10:00 +05:30
Suraj Shetty
fe25fe1db1
feat: A flag (--save-metafiles) to save esbuild metafiles
...
- Useful for analysing bundle size
2023-06-26 09:14:17 +05:30
Ankush Menat
8a37d6d278
perf: reduce memory usage of background processes ( #21467 )
...
* perf: defer translation.py imports
This indirectly imports babel which isn't really required most of the
time.
* perf: defer gzip import
* perf: move validate_and_sanitize_search_inputs
This causes all sorts of indirect imports and increases memory usage
* perf: defer requests module imports
* perf: defer system settings import
* perf: defer LOG_DOCTYPES import
Causes many indirect imports
* perf: defer update_site_config
* perf: defer notifications import
* perf: remove unused import
* perf: defer safe exec import
* test: memory usage overhead
2023-06-23 12:51:45 +05:30
Alfredo Altamirano
c6b1b026c5
fix: data-import command fails with local files ( #20521 ) ( #21381 )
...
* fix: data is retrieved from db instead of local file
* fix: data import command only accepts absolute path
* fix: revert expanduser
- Shells expand it. Works fine with bash/zsh
- Doesn't work anyway as click wont let you init a path that doesn't
exist
* Revert "fix: data is retrieved from db instead of local file"
This reverts commit cbe50a26da61e01b5a9a7c51f8632defb0913aab.
* fix: allow local import if from console
---------
Co-authored-by: Alfredo Altamirano <Ahuahuachi@users.noreply.github.com>
Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-06-20 18:09:23 +05:30
Anand Baburajan
38960f4219
feat: migrate translations command ( #21362 )
...
* feat: migrate translations command
* chore: formatting
2023-06-19 18:19:07 +05:30
Ankush Menat
63a1a32594
chore: remove unused argument
2023-06-13 19:03:52 +05:30
Ankush Menat
3005e66e45
refactor!: Drop previously deprecated code
2023-06-13 16:00:43 +05:30
Ankush Menat
b3d370a0b1
refactor!: remove rollback_observers
...
use `frappe.db.after_rollback.add` instead
2023-06-03 18:44:19 +05:30
Devin Slauenwhite
6bda014406
fix: install cypress plugins in frappe namespace ( #20459 )
2023-03-28 14:34:45 +05:30
Ankush Menat
f089e9108e
fix: hard link environment variable ( #20467 )
...
On docker based deploys symlinking inside volume doesn't work.
[skip ci]
2023-03-27 15:58:43 +05:30
gavin
c3fa753ed2
Merge branch 'develop' into cli-scheduler-status
2023-02-14 16:13:56 +05:30
Gavin D'souza
01cc586e20
fix: Use yarn to figure out bin path instead of npm
...
Npm v9 doesn't have bin anymore. This causes run-ui-tests to fail
refs:
- https://docs.npmjs.com/cli/v8/commands/npm-bin
- https://yarnpkg.com/cli/bin
2023-02-13 13:42:59 +05:30
Gavin D'souza
32cf13cb29
chore: Cleanup imports
2023-02-10 14:45:39 +05:30
Gavin D'souza
4738a1422d
fix: Add format, verbose options to scheduler
2023-02-10 14:39:16 +05:30
Gavin D'souza
6b84c9ccf5
feat: Check scheduler status via CLI
...
new: `bench --site scheduler status`
2023-02-10 14:38:50 +05:30
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
gavin
ee80d6a504
feat(cli): Pass extra args to DB console ( #19809 )
2023-01-27 22:57:19 +05:30
Ankush Menat
ffc5447548
fix: set-config without -g must specify site ( #19782 )
2023-01-25 20:33:55 +05:30
Gavin D'souza
d357af1533
refactor: Add a maxsplit limit to string splits
2023-01-24 19:22:51 +05:30
Ankush Menat
87561940a4
feat: Interactively add a new patch ( #19722 )
2023-01-23 15:04:43 +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
3ff49ec0ad
fix: mariadb convert port to string for os.execv
2022-12-20 15:14:38 +05:30
Ankush Menat
db35431b8c
fix(postgres): psql with remote databases
...
If you dont use unix socket psql command doesn't work.
2022-12-20 15:14:38 +05:30
Ankush Menat
8107781f1c
fix: move filelock imports to functions ( #19300 )
2022-12-15 15:21:31 +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
d00b98f460
chore: typo
2022-11-25 13:10:43 +05:30
Ankush Menat
ed28626021
refactor: simpler deque strat selection
...
Co-authored-by: Ritwik Puri <ritwikpuri5678@gmail.com>
2022-11-25 12:14:37 +05:30
Ankush Menat
a8bf86ef75
feat: support dequeuing strategies for worker
2022-11-25 12:14:37 +05:30