Commit graph

3013 commits

Author SHA1 Message Date
barredterra
15396ceb60 fix: add required_apps to hooks boilerplate 2023-06-22 15:48:04 +02:00
barredterra
d044b30522 fix: remove app_version from hooks boilerplate
It's not used by any frappe/erpnext code and linters complain about the
unused import
2023-06-22 15:47:34 +02:00
Ankush Menat
4f70200bd5 chore: track update actions per doctype
[skip ci]
2023-06-22 12:10:43 +05:30
Smit Vora
db6a06d204
fix: make sure number is not zero for bankers_rounding (#21431)
* fix: make sure num is not zero for bankers_rounding

* test: rounding near zero

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-06-20 12:00:22 +05:30
David Arnold
23dd8e9248
refactor: normalize redis invocation and unblock unix domain socket conn (#21309)
Prior to this change, given tat a unix domain socket string was passed
ad `frappe.conf.redis_queue`, then the url split would have failed.

With this change, the upstream API for `from_url` is invoked
transparently.

passing none values for username and password is inocuous; [proof](d95d8a24ed/redis/connection.py (L604)) and
[proof](d95d8a24ed/redis/connection.py (L594))

The [entrypoint](d95d8a24ed/redis/client.py (L868)) passes these parameters on transparently.
2023-06-13 21:06:06 +05:30
Ankush Menat
3d0888a5d5 refactor: set_value usage 2023-06-13 16:00:43 +05:30
Ankush Menat
3005e66e45 refactor!: Drop previously deprecated code 2023-06-13 16:00:43 +05:30
Ankush Menat
bd60c60d4e refactor!: remove legacy password hashing
It's been 5+ years, no need to add this compatibility layer anymore.
2023-06-13 16:00:43 +05:30
Ankush Menat
cfdbad6653 refactor!: Remove custom script import 2023-06-13 13:13:23 +05:30
Ankush Menat
74cbdbf07f refactor: Deprecate importing of fixturs/custom_scripts 2023-06-13 13:13:23 +05:30
Rucha Mahabal
1bab900e6f fix: skip custom script syncing for missing doctypes 2023-06-12 22:09:08 +05:30
Rucha Mahabal
f7abf3b1cf fix: handle fixture syncing for missing doctypes 2023-06-12 22:07:00 +05:30
Ankush Menat
32f54b6734 chore: remove socketio from boilerplate workflow
[skip ci]
2023-06-12 12:14:05 +05:30
Ankush Menat
6f4a7ddf10 Revert "build(deps)!: Require NodeJS 18 as minimum version (#21303)"
This reverts commit 67cd951013.
2023-06-11 11:40:22 +05:30
Ankush Menat
eb17c12dda fix: reuse redis connection if not rq auth 2023-06-11 11:40:22 +05:30
Ankush Menat
3414c0d063 refactor!: Merge redis_socketio and redis_queue
- realtime communication uses pub-sub and no storage. So using same
  redis server for both should be just fine.
- This is how FC works since quite a lot of time. We haven't seen any
  problem so far.
2023-06-11 11:40:22 +05:30
Ankush Menat
18e791a353 build(deps): PyPDF2 -> pypdf
closes https://github.com/frappe/frappe/issues/19861
2023-06-10 20:47:27 +05:30
Ankush Menat
8485ac5d62 build(deps): bump many dependencies
test: change code to adapt to new werkzeug client

fix: avoid setting charset

utf8 is default and assumed now by werkzeug, setting this manually is
deprecated.

fix: use string instead of bytes for setting headers

DeprecationWarning: Passing bytes as a header value is deprecated and will not be supported in Werkzeug 3.0.
12:23:34 web.1         |   response.headers["X-Page-Name"] = path.encode("ascii", errors="xmlcharrefreplace")
2023-06-10 20:47:27 +05:30
Ankush Menat
67cd951013
build(deps)!: Require NodeJS 18 as minimum version (#21303) 2023-06-10 19:22:57 +05:30
Ankush Menat
924ecc71f6
chore: vendor cgitb (#21288)
To Avoid:

```
/home/ankush/benches/develop/apps/frappe/frappe/utils/error.py:4: DeprecationWarning: 'cgitb' is deprecated and slated for removal in Python 3.13
  import cgitb
```
2023-06-08 17:52:21 +05:30
Ankush Menat
fa6dc03cc8
refactor: frappe.cache() usage to frappe.cache (#21282) 2023-06-08 11:47:17 +05:30
Ankush Menat
40b3cd82bc
feat!: frappe.cache() -> frappe.cache (#21279)
This is more intuitive and consistent with other things like `frappe.db`.

PS: This is quite likely to break some weird usage which I can't guess right now. Normal usage inside request/job cycles will continue to work as it used to.
2023-06-07 22:47:45 +05:30
Ankush Menat
a7413fe4a7 chore: separate out func call key for @redis_cache 2023-06-04 15:13:39 +05:30
Ankush Menat
26722b1a1c fix: ignore ConnectionError in frappe.cache().exists() 2023-06-03 22:53:10 +05:30
Ankush Menat
7d50ef19d3 perf: Delete multiple keys in O(1) redis calls
Currently we call redis for each key, redis already supports deleting
multiple keys in one go.
2023-06-03 22:53:10 +05:30
Ankush Menat
07e1d34568 refactor: RQ enqueue after commit and tests 2023-06-03 18:44:19 +05:30
Ankush Menat
6ce7444669 refactor: generic callback manager 2023-06-03 18:44:19 +05:30
Ankush Menat
6519651002 refactor: change implementation of enqueue_after_commit
if enqueue_after_commit then pass partial function after commit instead
of storing it in flags. SLIGHTLY less efficient, but uses consistent API.
2023-06-03 18:44:19 +05:30
Sagar Vora
9f5a994f70 fix!: improved filter validation in Engine.get_query 2023-05-31 14:16:52 +05:30
Ankush Menat
3df13ca392 feat: new operator - descendants of (inclusive)
Co-Authored-By: Faris Ansari <netchamp.faris@gmail.com>
2023-05-29 16:59:57 +05:30
Ankush Menat
2ed2f8747d chore: track doc creation
This is alternate to "Activation" level that already exists, activation
level will be phased out over time.
2023-05-29 13:34:24 +05:30
Ankush Menat
81c103a741 refactor: remove form tour settings 2023-05-25 15:04:38 +05:30
Maharshi Patel
639de716d5
Merge branch 'develop' into onboarding-tour 2023-05-25 12:30:04 +05:30
Richard Case
6354a018de
feat: wkhtmltopdf logging (#19935)
* feat: wkhtmltopdf logging

* fix: must supply output function
2023-05-24 16:00:32 +05:30
Maharshi Patel
5290bbb1c6 fix: reload form_tour_settings
reload form_tour_settings and form_tour_settings_item before form_tour because form_tour on_update have get_doc for form_tour_settings.
2023-05-24 15:40:48 +05:30
Gursheen Kaur Anand
49fe6e0c98
feat: patches.txt template added by default for new apps #21046 (#21070)
* Added patches.txt template in boilerplate

* test: new app patches.txt

* style: formatting

---------

Co-authored-by: Gursheen Anand <gursheen@frappe.io>
Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-05-24 14:47:06 +05:30
Maharshi Patel
5f91ed93ef
Merge branch 'develop' into onboarding-tour 2023-05-23 18:16:20 +05:30
Ankush Menat
5b881636bb chore: track route views for first few days
Identifying where users drop off is tricky without knowing what they are
doing in system. Tracking first few days routes will likely give some
insights.
2023-05-23 12:35:40 +05:30
Maharshi Patel
10628b9b06 feat: add onboarding and status on boot
Add List of all onboarding tours to frappe.boot and onboarding status on frappe.boot.user
2023-05-18 02:33:40 +05:30
Faris Ansari
fedd5886a7 fix: colwidth should be acceptable 2023-05-15 19:06:11 +05:30
Ankush Menat
ef6f4b5956
refactor!: Use job_id for bg job deduplication (#20951) 2023-05-10 12:45:05 +05:30
Ankush Menat
ecce4ba5a7 test: deduplication with unique job id 2023-05-09 14:23:07 +05:30
Ankush Menat
bc3871b657 refactor: standardize assigning job_id 2023-05-09 14:23:04 +05:30
Ankush Menat
4bd02a4ed1 perf: Faster scheduled job deduplication
O(n) to O(1) dedup by specifying unique IDs on scheduled RQ jobs.
2023-05-08 18:28:09 +05:30
Ankush Menat
cbbb6a7d85 chore: track onboarding progress
Easy self-onboarding has been hardest to get right in complex business
apps, even though we have worked on this for long long time we have no
clear idea on how well it works, or if it's severly lacking.

We want to improve this by first understanding how efficient current
system is.

This PR adds basic telemetry for which steps are being completed, which
are skipped and what onboarding group is dismissed completely.
2023-05-05 12:54:14 +05:30
Shariq Ansari
fa80cfd2cf
Merge pull request #20853 from rtdany10/bulk-print-changes 2023-05-05 11:27:26 +05:30
Ritwik Puri
f5ba787f4b
Merge pull request #20856 from resilient-tech/perf-private-file 2023-05-05 00:46:16 +05:30
Shariq Ansari
235c5d71ed
Merge branch 'develop' into bulk-print-changes 2023-05-04 19:57:13 +05:30
Sagar Vora
8418d3c7e2 fix: only call RQ synchronously as fallback during migration 2023-05-02 13:46:50 +05:30
Sagar Vora
9cf7f2b311 perf: get all file data at once when downloading private file 2023-04-27 16:12:02 +05:30