Skip to content

fix(file-server): import minio Client as a value again - #5

Merged
TomasPalsson merged 1 commit into
fix/nsjail-no-cgroup-clonefrom
fix/file-server-minio-value-import
Sep 25, 2026
Merged

TomasPalsson merged 1 commit into
fix/nsjail-no-cgroup-clonefrom
fix/file-server-minio-value-import

Conversation

@TomasPalsson

Copy link
Copy Markdown

What

Import Client from minio as a value again in service/src/file-server.ts.

Why

The upstream sync (#4) changed the import to import type { ..., Client, ... } from 'minio', but this fork's createMinioClient() in the same file still calls new Client(...) (lines 90, 115, 122). Bun strips type-only imports, so Client is undefined at runtime. On apro-sandbox every file-server start at e0d62edb9 logged Critical: Could not initialize storage and exited with code 1, so ECS never got the new version running.

The build did not catch it because the image build does not type-check.

Check

  • Before: cd service && bunx tsc --noEmit -p . reports TS1361: 'Client' cannot be used as a value because it was imported using 'import type' at file-server.ts lines 90, 115, 122.
  • After: 0 errors in file-server.ts.
  • bun test ./src/file-download.test.ts ./src/file-object-resolver.test.ts: 13 pass, 0 fail.

The upstream sync (#4) turned the minio import into a type-only import,
but the fork's createMinioClient still calls new Client(...). Bun strips
type imports, so Client is undefined at runtime and file-server exits with
'Critical: Could not initialize storage' on every start (seen on apro-sandbox,
task def code-interpreter:25). tsc reports it as TS1361 at lines 90/115/122.
@TomasPalsson
TomasPalsson merged commit aacee18 into fix/nsjail-no-cgroup-clone Sep 25, 2026
10 checks passed
@TomasPalsson
TomasPalsson deleted the fix/file-server-minio-value-import branch September 25, 2026 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant