Commit graph

44641 commits

Author SHA1 Message Date
Ankush Menat
2dfef73ae8
Merge pull request #22915 from akhilnarang/dont-extract-backup-unconditionally
perf: don't extract gzipped backups
2023-12-26 12:19:10 +05:30
Xiaoguang Sun
68d4a5ad82
Do not call begin in updatedb after syncing (#23934)
Do not call begin in updatedb after syncing as commit does it already.

Signed-off-by: Xiaoguang Sun <sunxiaoguang@gmail.com>
2023-12-26 12:12:19 +05:30
Akhil Narang
43021911ff
fix: simplify parsing version for older backups
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-12-26 11:09:08 +05:30
Akhil Narang
6e8f32af58
chore: don't pipe output through pv
No point if we're using `execute_in_shell()`

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-12-26 11:09:08 +05:30
Akhil Narang
3fe840fb31
fix(postgres): make use of common helper
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-12-26 11:09:08 +05:30
Akhil Narang
76c9fbd0cd
fix: use source before changing its contents
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-12-26 11:09:08 +05:30
Akhil Narang
b010dc584f
chore(installer): fix output when prompting user about downgrade
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-12-26 11:09:08 +05:30
Akhil Narang
9bf818eb4a
chore: add in some tests for backup
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-12-26 11:09:08 +05:30
Akhil Narang
7f433b84af
feat: allow creating a backup with the older metadata style
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-12-26 11:09:08 +05:30
Akhil Narang
998f2c10d6
fix: handle older gzipped backups as well
Also fix the actual comparison

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-12-26 11:09:08 +05:30
Akhil Narang
a06e402f38
refactor: use a function with context manager for backup decryption
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-12-26 11:09:08 +05:30
Akhil Narang
2e382040cd
fix: simplify version detection logic
Our version detection code is relatively simple, so we shouldn't have any exceptions arising there
Just check for a None return value to decide whether we should use the older logic

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-12-26 11:09:08 +05:30
Akhil Narang
148efbc3ed
refactor(restore): adjust downgrade check
First actually check whether its a downgrade, then check for the force flag

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-12-26 11:09:08 +05:30
Akhil Narang
012b0fdb7e
fix(postgres/setup): use gzip to get backup contents if the file is an archive
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-12-26 11:09:08 +05:30
Akhil Narang
50d21677b8
chore: drop use of magic library, run file command directly
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-12-26 11:09:08 +05:30
Akhil Narang
2b7c74dd5e
feat(restore): handle encrypted backups better
Determine the mimetype based on the file contents instead of waiting for an exception
Cleaner + no need of duplicate code

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-12-26 11:09:08 +05:30
Akhil Narang
0b508e2a96
feat(db_manager): avoid extraction of DB dump if gzipped
Use `gzip -cd` to directly get the contents onto stdout and pipe to mariadb

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-12-26 11:09:08 +05:30
Akhil Narang
7db8baa7c4
feat(installer): drop actual gzip file extraction
Use `zgrep` to check for table name match where required

Also use a table that's at the top of the dump files (`__Auth`)

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-12-26 11:09:07 +05:30
Akhil Narang
cb7c0e653c
fix(Backup): automatically rollback decryption when object is being deleted
This allows us to not have to call it everytime before returning

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-12-26 11:08:48 +05:30
Akhil Narang
3b0f6de883
perf: don't extract backup files unless required
Read from the gzipped file wherever possible

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-12-26 11:08:48 +05:30
Shariq Ansari
77f04c9fc4
Merge pull request #23921 from shariquerik/minor-fix-1
chore: minor fix
2023-12-23 11:54:13 +05:30
Shariq Ansari
fc13ff5f29 chore: minor fix 2023-12-23 11:39:39 +05:30
Raffael Meyer
c26ccad9e2
Merge pull request #23914 from barredterra/email-linking-hotfix 2023-12-22 11:44:54 +01:00
Raffael Meyer
5fc3cb6d79
Merge pull request #23915 from frappe/de-missing-comma 2023-12-22 11:43:05 +01:00
Raffael Meyer
f2b9f759ab
fix: missing comma in translations file 2023-12-22 11:41:16 +01:00
barredterra
62d634eab4 Revert "fix: check the correct email account"
This reverts commit 2507c6af97.
2023-12-22 11:28:05 +01:00
Ankush Menat
4d68a46b10
fix: Set default child table fields on save (#23913)
We set defaults on creation of new doc but when you append a new child
doc on existing document it doesn't seem to set the defaults.

This seems like a bug and not a deliberate choice.
2023-12-22 08:02:36 +00:00
Akhil Narang
7c9fbb637d
Merge pull request #23912 from akhilnarang/fix-redirect-mandatory-default
fix(redirect): make the status codes a `select` field instead of `int`
2023-12-22 12:59:47 +05:30
Akhil Narang
ff4dca3e16
fix(redirect): make the status codes a select field instead of int
Drop mandatory, assume sane defaults
The current implementation broke old users of redirects like helpdesk app

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-12-22 12:25:41 +05:30
Corentin Flr
1d23888475
fix(translations): Add context to Image Cropper text (#23908) 2023-12-21 23:20:25 +05:30
Ankush Menat
5e2ace4c08
perf: Use set for tracking whitelisted methods (#23905)
List look ups are O(N). This is still a microoptimization at best
considering other overhead.
2023-12-21 23:19:06 +05:30
Akhil Narang
25ba2822be
Merge pull request #23431 from barredterra/newsletter-welcome-url
feat(Newsletter): redirect to welcome URL
2023-12-21 17:10:06 +05:30
Shariq Ansari
fad6cff1ad
Merge pull request #23893 from shariquerik/allow-crop-attach-image-sidebar
fix: allow aspect ratio options to crop from sidebar image field
2023-12-21 14:31:20 +05:30
Shariq Ansari
9004578044
Merge pull request #23894 from shariquerik/bump-datatable-3
build(deps): bump datatable to latest
2023-12-21 14:24:05 +05:30
Shariq Ansari
cf69a6e340 build(deps): bump datatable to latest 2023-12-21 14:20:31 +05:30
Ankush Menat
36451b6951
Merge pull request #23765 from akhilnarang/http-307-redirect
feat: allow setting a custom http status code for redirects
2023-12-21 13:53:51 +05:30
Shariq Ansari
2fc3e2cddd chore: close sidebar was failing 2023-12-21 12:13:06 +05:30
Ankush Menat
0fd6f5eed7
Merge pull request #23827 from frappe/api-docs
docs: add Python API missing docstrings / type hints
2023-12-21 12:13:05 +05:30
Shariq Ansari
25c75cacc2 fix: allow aspect ratio options to crop from sidebar image field 2023-12-21 12:12:38 +05:30
Akhil Narang
2224d86c94
refactor: cache status code as well
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-12-20 17:47:16 +05:30
Akhil Narang
6819a38fbe
fix: set correct response code for redirections
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-12-20 17:36:42 +05:30
Akhil Narang
c8816a8b6a
fix(tests): fix redirect tests by adding new field + add another test scenario
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-12-20 17:36:42 +05:30
Akhil Narang
44667901bf
feat: allow setting a custom http status code for redirects
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-12-20 17:36:42 +05:30
Akhil Narang
91dce0b007
feat(sentry): drop events which have frappe.throw (#23886)
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-12-20 17:34:43 +05:30
bourouffala
3015852ce1
fix: Error when displaying dashboard with number card using average and sum functions (#23883) 2023-12-20 11:13:20 +00:00
Kunhi
b4d3132bf4
fix: optimize clear_permissions_cache method (#23858)
* fix:optimize clear_permissions_cache method

* fix: faster clear user cache on perm change

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-12-20 16:26:17 +05:30
Ankush Menat
052a2527dd
Merge pull request #23874 from ankush/del_check_links
fix: don't allow deleting original doc if amendment exists
2023-12-20 14:13:41 +05:30
Daizy Modi
5213915d66
fix: render new doctype dialog box if doctype is not copied (#23854) 2023-12-20 14:11:01 +05:30
Hussain Nagaria
369844a9cb fix: type hint 2023-12-20 14:09:01 +05:30
Hussain Nagaria
ecdd7b3e37 docs: consistency 2023-12-20 14:02:32 +05:30