Commit graph

465 commits

Author SHA1 Message Date
Andrey Antukh
347276fb4e 🐛 Fix incorrect team features handling on onboarding team creation 2024-04-10 15:33:18 +02:00
Andrey Antukh
5f8d66e7eb Remove unnecesarry transaction wrapping on import-binfile 2024-04-08 13:23:59 +02:00
Andrey Antukh
6904cacd0c 🐛 Fix timeout error on large binfile import 2024-04-08 09:57:36 +02:00
alonso.torres
43faa06ac0 🐛 Fix problem with uploading temp files 2024-04-05 12:34:56 +02:00
Alejandro
81a271961f
Merge pull request #4323 from penpot/niwinz-staging-bugfix-2
 Several improvements
2024-03-26 07:32:05 +01:00
Andrey Antukh
b85c3bec18 Add better timestamp control on audit handler 2024-03-25 17:58:40 +01:00
Alejandro Alonso
22fd0ae306 🐛 Update modification date on publish/unpublish file as library 2024-03-25 14:17:07 +01:00
Eva Marco
1c65df69f3 🐛 Fix pinned project on creation 2024-03-21 10:59:44 +01:00
Andrey Antukh
91118bec70 Improve internal naming of setup/props
This reverts commit a6f70c77cb.
2024-03-14 10:48:23 +01:00
alonso.torres
a6f70c77cb Revert " Improve internal naming of setup/props"
This reverts commit f525c6df5e.
2024-03-13 16:21:12 +01:00
Andrey Antukh
f525c6df5e Improve internal naming of setup/props 2024-03-13 11:39:53 +01:00
Aitor Moreno
69ab02fc45
Merge pull request #4159 from penpot/alotor-bugfix-viewer
Alotor bugfix viewer
2024-02-19 17:46:50 +01:00
alonso.torres
619b557c80 🐛 Fix anonymous access to shared prototypes 2024-02-19 09:39:12 +01:00
Andrey Antukh
b718a282e0 ♻️ Add minor refactor to file migrations
Relevant changes:

- Add the ability to create migration in both directions, defaulting
  to identity if not provided
- Move the version attribute to file table column for to make it more
  accessible (previously it was on data blob)
- Reduce db update operations on file-update rpc method
2024-02-19 09:20:47 +01:00
Andrey Antukh
29d48f0a98 Add minor code cleaning on file-update ns 2024-02-14 17:38:53 +01:00
alonso.torres
af7142e97b New overlay for v2 information 2024-02-12 16:29:47 +01:00
Andrey Antukh
722cb6351d 💄 Add minor cosmetic changes to file-update ns 2024-02-12 14:55:42 +01:00
Andrey Antukh
f4ac607958 ♻️ Refactor srepl helpers 2024-02-12 10:21:47 +01:00
Andrey Antukh
6d35cb2eb4 Improve snapshot related internal API
This commit also adds the ability to take snapshot of all files
of the team in a single run/transaction.
2024-02-09 12:01:09 +01:00
Andrey Antukh
d2626ead0b Add better email cleaning mechanism
This commit separates the email cleaning mechanism to a separated
function, and enables a proper cleaning of `mailto:` prefix, usually
found on invitations because users just copy and paste from external
source.
2024-02-07 09:14:07 +01:00
Andrey Antukh
7a50cb3ff9 🐛 Fix broken restore snapshot function 2024-02-06 19:17:59 +01:00
Andrey Antukh
267045e113 Improve migration scripts 2024-02-06 17:22:20 +01:00
Andrey Antukh
a8cf072bda Add proper error report on binfile/v1 exportation 2024-02-02 10:54:33 +01:00
Andrey Antukh
a5c6d78ee5 ♻️ Fix some fundamental bugs on climit module
The climit previously of this commit is heavily used inside a
transactions, so in heavy contention operation such that file thumbnail
creation can cause a db pool exhaust.

This commit fixes this issue setting up a better resource limiting
mechanism that works outside the transactions so, contention will
no longer hold an open connection/transaction.

It also adds general improvement to the traceability to the climit
mechanism: it now properly logs the profile-id that is currently
cause some contention on specific resources.

It also add a general/root climit that is applied to all requests
so if someone start making abussive requests, we can clearly detect
it.
2024-02-01 17:37:49 +01:00
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