Commit graph

3001 commits

Author SHA1 Message Date
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
Dany Robert
8d03f51dbe fix(multi-pdf): change response type to pdf 2023-04-26 14:05:54 +00:00
Ankush Menat
db4cd1a84b refactor: reduce duplication 2023-04-25 15:03:11 +05:30
Ankush Menat
f63c420798 feat: add python posthog library 2023-04-25 13:10:14 +05:30
Ankush Menat
87a88195ec feat: telemetry using posthog 2023-04-25 10:33:28 +05:30
Shariq Ansari
06c3ce09f6 fix: letterhead not working for multiple doc print 2023-04-19 16:00:07 +05:30
Maharshi Patel
1bae6a2b0b
feat: hooks added for print formats / pdf. (#20734) 2023-04-17 19:03:53 +05:30
barredterra
fcb705b41d chore: docstring for pretty_date 2023-04-11 15:50:17 +02:00
barredterra
9f1feaab02 refactor: pretty_date 2023-04-11 15:44:03 +02:00
Bread Genie
6248d8f062
fix(pretty-date): plural form when the value is 1 (#20619) 2023-04-11 10:56:52 +05:30
Sabu Siyad
a1aaed0a5f
feat(util): get_table_name: wrap in backticks (#20553) 2023-04-03 11:26:49 +05:30
Ankush Menat
5fff6698ad fix: use develop as branch name for new apps
dont ask me why
2023-04-02 15:26:32 +05:30
Saqib Ansari
32dbbb47bf
feat: redis cache decorator (#20452)
* feat: redis cache decorator

* fix: review changes

* fix: remove unintentional changes

* fix: remove unintentional changes

* refactor: cleanup and simplify code for redis

AIs suck

* fix: bug

* test: redis cache

* fix: remove unused import

* feat: make redis cache user specific

redis cache utils already support this, extending so everyone can use it

* feat: support @redis_cache without params

* test: flake in request site cache test

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-03-27 17:03:20 +05:30