feat(backblaze): Include milliseconds since epoch to bucket name #403

Merged
NaiJi merged 4 commits from better-bucket-name into master 2023-12-03 20:03:18 +02:00
Collaborator
- Resolve https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/263
NaiJi added the
Bug
Priority
High
labels 2023-12-02 22:45:32 +02:00
NaiJi self-assigned this 2023-12-02 22:45:32 +02:00
NaiJi added 1 commit 2023-12-02 22:45:33 +02:00
NaiJi requested review from inex 2023-12-02 22:45:36 +02:00
NaiJi added 1 commit 2023-12-03 11:55:04 +02:00
inex requested changes 2023-12-03 19:49:53 +02:00
@ -66,2 +66,2 @@
String bucketName = 'selfprivacy-$domain-$serverId';
// If bucket name is too long, shorten it
String bucketName =
'$domain-$serverId-${DateTime.now().millisecondsSinceEpoch}';

The milliseconds since epoch is 13 digits long right now. Our limit on the name is 49 letters. The server ID is 8-12 digits long. It is 26 letters left for the domain. I would propose to trim the domain to ~20 letters.

The milliseconds since epoch is 13 digits long right now. Our limit on the name is 49 letters. The server ID is 8-12 digits long. It is 26 letters left for the `domain`. I would propose to trim the domain to ~20 letters.
Poster
Collaborator

bucketName gets trimmed up to 49 characters after that. Could we rearrange it like '${DateTime.now().millisecondsSinceEpoch}-$serverId-$domain' then ?

So if we exceed 49 characters, the domain will get trimmed either way, as it's in the end

`bucketName` gets trimmed up to 49 characters after that. Could we rearrange it like `'${DateTime.now().millisecondsSinceEpoch}-$serverId-$domain'` then ? So if we exceed 49 characters, the domain will get trimmed either way, as it's in the end

yes, we might do this as well

yes, we might do this as well
NaiJi marked this conversation as resolved
NaiJi added 1 commit 2023-12-03 19:59:01 +02:00
NaiJi requested review from inex 2023-12-03 19:59:14 +02:00
inex approved these changes 2023-12-03 20:02:42 +02:00
NaiJi added 1 commit 2023-12-03 20:03:12 +02:00
NaiJi merged commit 4eb3dac101 into master 2023-12-03 20:03:18 +02:00
NaiJi deleted branch better-bucket-name 2023-12-03 20:03:18 +02:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: SelfPrivacy/selfprivacy.org.app#403
There is no content yet.