Skip to content

presigned-url plugin: resolve default bucket from the request's database - #1936

Open
pyramation wants to merge 1 commit into
mainfrom
feat/presigned-default-bucket-request-db
Open

pyramation wants to merge 1 commit into
mainfrom
feat/presigned-default-bucket-request-db

Conversation

@pyramation

Copy link
Copy Markdown
Contributor

Summary

resolveDefaultBucket no longer passes a database id; function_resolution.resolve_default_bucket takes the database from the request.

- resolve_default_bucket($1, $2, $3, $4, $5)  -- [databaseId, scope, entityId, publicAccess, bucketKey]
+ resolve_default_bucket($1, $2, $3, $4)      -- [scope, entityId, publicAccess, bucketKey]

The databaseId parameter is dropped from resolveDefaultBucket and its two callers (plugin.ts, managed-upload.ts); managed-upload.test.ts expectations updated to the new argument list.

Link to Devin session: https://app.devin.ai/sessions/5f832b92b1d24c2ab1058f507aeacea5
Open in Devin Desktop: https://app.devin.ai/desktop/session/5f832b92b1d24c2ab1058f507aeacea5?variant=devin
Requested by: @pyramation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@tenki-reviewer

tenki-reviewer Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Review complete. No issues found — approved ✅.


This PR updates the presigned URL plugin's managed upload path so the default bucket is resolved through the function_resolution.resolve_default_bucket Postgres function instead of the previous client-side lookup, removing the now-unused databaseId parameter and updating the plugin wiring and tests accordingly.

Files Change
graphile/graphile-presigned-url-plugin/src/default-bucket.ts Reworks default-bucket resolution to call the Postgres resolver without databaseId
graphile/graphile-presigned-url-plugin/src/managed-upload.ts Adjusts managed upload flow to consume the new bucket resolution result
graphile/graphile-presigned-url-plugin/src/plugin.ts Updates plugin schema wiring for the changed resolver signature
graphile/graphile-presigned-url-plugin/__tests__/managed-upload.test.ts Updates tests for the new resolution behavior

Reviewed commit: 46c1780

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