Commit graph

441 commits

Author SHA1 Message Date
Andrey Antukh
658c26014b 💄 Define a RPC schema as standalone var for create-file-thumbnail 2024-02-01 17:24:42 +01:00
Andrey Antukh
16a051d7e0 Improve efficiency of thumbnails creation RPC methods
Moving the retry mechanism out of the transaction
2024-02-01 17:24:42 +01:00
Andrey Antukh
82b10ecb87 Refactor comments RPC methods to use schema instead of spec 2024-02-01 17:24:42 +01:00
Andrey Antukh
7f60946204 ♻️ Refactor exportation and duplicate mechanism
Previously the file processing was implemented 3 times using similar
approaches bug each own with its own bugs. This PR unifies the
loging to a single implementation used by the 3 operations.
2024-01-30 16:27:16 +01:00
alonso.torres
c8593b1c18 🐛 Fix get name from file when importing 2024-01-26 09:26:32 +01:00
Alejandro
d5aa4f3ee4
Merge pull request #4050 from penpot/niwinz-staging-bugfix-8
🐛 Fix incorrect props handling on profile registration
2024-01-25 16:14:19 +01:00
Andrey Antukh
6ad6e6f856 🐛 Fix objects-map and pointer-map issues on file crud 2024-01-25 16:03:29 +01:00
Andrey Antukh
944d167bbb Simplify SVGO module API 2024-01-25 15:59:45 +01:00
Andrey Antukh
69ffd57447 🐛 Fix incorrect props handling on profile registration 2024-01-24 17:12:41 +01:00
Aitor Moreno
03931da17a
Merge pull request #3989 from penpot/niwinz-staging-bugfix-1
🐛 Bugfixes
2024-01-15 16:03:23 +01:00
alonso.torres
9ea440b6f7 🐛 Fix import from components v1 to v2 2024-01-15 10:10:13 +01:00
Andrey Antukh
77564531eb 🐛 Fix incorrect features setup on persist-temp-file rpc method 2024-01-10 13:50:30 +01:00
Andrés Moya
b7b7b9d580 🐛 Touch modified file when ignore sync, to avoid ETAG caching 2024-01-09 18:28:32 +01:00
Andrey Antukh
8919a7067e 🐛 Fix incorrect thumbnail queries on file related rpc methods 2024-01-09 15:00:23 +01:00
Andrey Antukh
0b29aaecc4 💄 Format backend code 2024-01-08 09:32:50 +01:00
Andrey Antukh
4899b3af6e 🐛 Fix incorrect pointer deref on validating file on update operation 2024-01-04 16:31:57 +01:00
Andrey Antukh
41287d8fc5 Improve migration script performance and api usability 2024-01-04 14:40:22 +01:00
Andrey Antukh
746d898245 Improve the db api efficiency
Mainly setup proper defaults and reduce unnecesary allocations
on every db api call.
2024-01-04 12:41:16 +01:00
Alejandro Alonso
9cfc00ce97 🐛 Fix remap colors on binary import 2024-01-04 11:59:00 +01:00
Andrey Antukh
addb392ecc Add safety mechanism for direct object deletion
The main objective is prevent deletion of objects that can leave
unreachable orphan objects which we are unable to correctly track.

Additionally, this commit includes:

1. Properly implement safe cascade deletion of all participating
   tables on soft deletion in the objects-gc task;

2. Make the file thumbnail related tables also participate in the
   touch/refcount mechanism applyign to the same safety checks;

3. Add helper for db query lazy iteration using PostgreSQL support
   for server side cursors;

4. Fix efficiency issues on gc related task using server side
   cursors instead of custom chunked iteration for processing data.

   The problem resided when a large chunk of rows that has identical
   value on the deleted_at column and the chunk size is small (the
   default); when the custom chunked iteration only reads a first N
   items and skip the rest of the set to the next run.

   This has caused many objects to remain pending to be eliminated,
   taking up space for longer than expected. The server side cursor
   based iteration does not has this problem and iterates correctly
   over all objects.

5. Fix refcount issues on font variant deletion RPC methods
2024-01-03 10:56:57 +01:00
Andrey Antukh
0ebf9564b2 Add internal helper for team duplication 2024-01-02 12:01:07 +01:00
Andrey Antukh
15f81e557c 🐛 Fix unexpected exception on importing some binary files 2023-12-15 17:54:26 +01:00
Eva Marco
89c14b25ab
Merge pull request #3915 from penpot/alotor-fixes-ui
Fixes new UI
2023-12-15 16:28:51 +01:00
Andrey Antukh
ca50486639 Simplify feature handling on duplicate-file 2023-12-15 15:18:04 +01:00
Andrey Antukh
0ad2e8a0f2 Make retrieving fdata for thumbnail to no modify the file
This prevents that file to be considered opened just for creating
the thumbnail for it.
2023-12-15 15:18:04 +01:00
Andrey Antukh
ac20451ae7 Simplify feature handling on get-file 2023-12-15 15:18:04 +01:00
Andrey Antukh
47baa21d53 🐛 Fix some edge cases on feature handling on binfile import process 2023-12-15 15:18:04 +01:00
Andrey Antukh
78260fbc42 🐛 Fix no migration are applied on accessing to a file 2023-12-15 15:18:04 +01:00
Andrey Antukh
611594a392 Add general features handling improvements 2023-12-14 10:35:24 +01:00
Andrey Antukh
bdb1742d59 🐛 Fix incorrect feature checking on move project 2023-12-14 10:35:24 +01:00
Andrey Antukh
ba01f314dd 🐛 Fix incorrect feature context setup on file update 2023-12-14 10:35:24 +01:00
Andrey Antukh
517c913af9 Improve feature handling on file importation process 2023-12-14 10:35:24 +01:00
Andrey Antukh
08b9178a65 🐛 Fix incorrect behavior on set-file-shared rpc method 2023-12-14 10:35:24 +01:00
Andrey Antukh
b19a6321de 🐛 Fix feature validation on moving projects 2023-12-14 10:35:24 +01:00
Andrey Antukh
2dbe7bca07 Add general improvements to file validation and repair api 2023-12-14 10:35:24 +01:00
Alejandro
47bf817462
Merge pull request #3906 from penpot/palba-bugfixing9
🐛 Bugfixing
2023-12-14 06:41:52 +01:00
alonso.torres
030ff398ed Improved dashboard thumbnails 2023-12-13 16:12:41 +01:00
Andrey Antukh
d5e3cba92c 🐛 Fix issue on set-file-shared 2023-12-13 14:20:07 +01:00
Andrey Antukh
55f7656b77 🐛 Fix incorrect internal features handling on duplicating a file
Mainly because of incorrect collection of new features on file migration
when a file is duplicated. The original file is not touched.
2023-12-13 14:20:07 +01:00
Andrey Antukh
417366d998 Reorganize fdata/pointer-map feature helpers
Mainly move all pointer-map related helpers from app.rpc.commands.files
to the the app.features.fdata namespace and normalizes codestile around
feature handling on all affected code.

This commit also comes with several features related bugifxes on the
components-v2 migration code:

- properly migrate legacy feature names on apply components-v2 migration
- start using new fdata feature related functions
- prevent generation of a ephimeral pointer on each graphic migration
  operation; on large files this caused a very noticiable overhead of
  creating a big number of completly unused pointer maps
- do persistence after validation and not before
2023-12-13 14:20:07 +01:00
Andrey Antukh
03518a8da1 Add the ability to stream events on rpc methods 2023-12-13 14:20:07 +01:00
Andrey Antukh
76a6f077a6 🐛 Fix incorrect feature handling on absorb-library! fn
Used in shared flag assignation and library deletion
2023-12-13 11:56:20 +01:00
Andrey Antukh
0a77bae8a7 Improve options handling on db module 2023-12-13 11:56:20 +01:00
Pablo Alba
b41f63c16e 🐛 Fix component restoration is not notified to files using the library 2023-12-12 23:39:16 +01:00
Andrey Antukh
bfc124b907 🐛 Fix incorrect feature checkong on get-viewer-bundle rpc method 2023-12-11 19:00:37 +01:00
Andrey Antukh
afa735a9c1 Add protection for version inconsistency on opening or editing file 2023-12-11 17:14:20 +01:00
Andrey Antukh
ad0378270f Add missing sm/define on some file and file-thumbnails rpc methods 2023-12-11 17:14:20 +01:00
Andrey Antukh
f1d8abf160 Migrate file feature names when fdata migrations are applied 2023-12-11 17:14:20 +01:00
Andrey Antukh
f5ec818fc7 Use sm/define on management rpc comnand schemas 2023-12-11 17:14:20 +01:00
Andrey Antukh
daec51bb7d Add feature naming migration on file importation 2023-12-11 17:14:20 +01:00