From 9edd0d8c3d11ea8cf5169f86017897f09a2a3496 Mon Sep 17 00:00:00 2001 From: Johannes Fleck Date: Wed, 28 Oct 2026 16:07:49 +0100 Subject: [PATCH 1/3] fix(e2e): send an explicit empty body for directory markers (#369) The AWS SDK sets no Content-Length for an empty string body and warns about a stream of unknown length on every directory marker. --- e2e/storage/helpers.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/e2e/storage/helpers.ts b/e2e/storage/helpers.ts index 02a7fe25..d750d9a2 100644 --- a/e2e/storage/helpers.ts +++ b/e2e/storage/helpers.ts @@ -206,7 +206,10 @@ export async function putTextObject( } export async function putDirectoryMarker(client: S3Client, bucket: string, key: string) { - await client.send(new PutObjectCommand({ Bucket: bucket, Key: key, Body: '' })); + // The SDK sets no Content-Length for a falsy body, so '' triggers its stream warning. + await client.send( + new PutObjectCommand({ Bucket: bucket, Key: key, Body: Buffer.alloc(0), ContentLength: 0 }) + ); } export async function deleteKnownKeys(client: S3Client, bucket: string, keys: string[]) { From 7b34dd6b81b8dd80440e11adeed600f2d8f8a683 Mon Sep 17 00:00:00 2001 From: Johannes Fleck Date: Wed, 28 Oct 2026 16:07:55 +0100 Subject: [PATCH 2/3] fix(e2e): wait for the URL to be restored after a cancelled Back (#369) SvelteKit restores the URL of a cancelled popstate navigation with history.go, so the leave warning can be visible before the URL is back. This flaked on Firefox in CI. --- e2e/storage/upload.spec.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/e2e/storage/upload.spec.ts b/e2e/storage/upload.spec.ts index e8c0b050..d724796b 100644 --- a/e2e/storage/upload.spec.ts +++ b/e2e/storage/upload.spec.ts @@ -346,7 +346,8 @@ test.describe('Storage S3 — Upload', () => { const warning = page.getByRole('dialog', { name: 'Upload in progress' }); await page.goBack(); await expect(warning).toBeVisible(); - expect(page.url()).toBe(browseUrl); + // SvelteKit restores the URL of a cancelled Back asynchronously. + await expect(page).toHaveURL(browseUrl); await warning.getByRole('button', { name: 'Stay' }).click(); await expect(warning).toBeHidden(); await expect(page.getByRole('heading', { name: 'Upload', exact: true })).toBeVisible(); From 1d1aa648db1b49e4618c6f5bf488c6a634975755 Mon Sep 17 00:00:00 2001 From: Johannes Fleck Date: Wed, 28 Oct 2026 16:08:02 +0100 Subject: [PATCH 3/3] fix(e2e): tolerate a concurrent bucket creation in Garage setup Two workers provisioning the same bucket could both miss it in the lookup and the second CreateBucket failed with 409. Look the bucket up again when the creation fails. --- e2e/support/garage.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/e2e/support/garage.ts b/e2e/support/garage.ts index 9989bf78..2cd8a3eb 100644 --- a/e2e/support/garage.ts +++ b/e2e/support/garage.ts @@ -152,7 +152,17 @@ async function ensureBucket(bucketName: string): Promise { return existingId; } - const created = await adminPost('/v2/CreateBucket', { globalAlias: bucketName }); + let created: unknown; + try { + created = await adminPost('/v2/CreateBucket', { globalAlias: bucketName }); + } catch (err) { + // Another worker may have created the bucket since the lookup above. + const racedId = await findBucketId(bucketName); + if (racedId) { + return racedId; + } + throw err; + } const createdId = readString(created, ['id', 'bucketId', 'bucket_id']); if (createdId) {