You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(api): use the configured region for MinIO issue exports - #10480
On a self-hosted Plane instance with USE_MINIO=1, issue exports could show completed while the download link returned HTTP 400. The export task creates two S3 clients, one for the internal upload endpoint and one for the public download URL. Both used boto3's default region even when the operator set AWS_REGION.
Pass the configured region to both clients. An empty setting passes None so boto3 can still resolve its default.
Type of change
Bug fix
Verification
I reproduced this with Plane's pinned Silo object server in ap-southeast-1 and a boto3 default of us-east-1. The smoke test posts a JSON export through Plane's API, reads the URL from export history, downloads the ZIP over HTTP, and checks the work item's name in the archive. PostgreSQL, Valkey and S3 are real local services. The Celery task runs inline.
HTTP 400 in MinIO mode. Its custom S3 endpoint case passes.
This change
HTTP 200, correct signing region and expected JSON contents
The unit tests also cover an empty region. To run the live smoke test against a disposable regional server, set PLANE_TEST_REGIONAL_S3_URL, AWS_REGION, and the usual test bucket and credentials, then run pytest plane/tests/smoke/test_regional_export_download.py from apps/api.
All eight focused export tests, backend Ruff checks, and all 56 tasks in pnpm check passed. The full local API suite had 1,841 passes and four failures. I reran those four tests on clean preview and reproduced all four failures (two generic asset upload tests and two public asset disposition tests).
Related to #10426 and #10431. This patch covers the MinIO branch.
Summary by CodeRabbit
Bug Fixes
Fixed JSON issue export downloads for regional S3-compatible storage by applying the configured region to uploads and download links.
No actionable comments were generated in the recent review.
Walkthrough
The MinIO export upload and presigning clients now receive the configured AWS region, or None when no region is set. New tests check client configuration and verify downloads from a regional S3 endpoint.
Changes: Regional MinIO export
Layer / File(s)
Summary
Configure the MinIO client region apps/api/plane/bgtasks/export_task.py, apps/api/plane/tests/unit/bg_tasks/test_export_task_upload.py
Both MinIO clients receive AWS_REGION, or None when it is empty. The unit test checks both settings for the upload and presigning clients.
Validate a regional export download apps/api/plane/tests/smoke/test_regional_export_download.py
The smoke test runs a JSON export against a regional S3 endpoint. It checks completion status, the region in the signed credential scope, and the ZIP contents, then deletes the S3 object.
makeplane/plane#10426 — Reports export links signed for us-east-1 when an endpoint-based S3 client omits the region. This PR changes the MinIO client path for the same region-signing behavior.
Possibly related PRs
makeplane/plane#10431 — Passes the configured region to the endpoint-based S3 client in a separate export code path.
makeplane/plane#10479 — Describes the same MinIO client region changes and validation.
Merge Risk: Minimal · up to 927b2
This change passes the configured AWS region to the MinIO upload and download-URL clients so self-hosted regional exports sign correctly. The change is small, and the unit and smoke tests cover it. No concrete merge-blocking risk was found.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: MinIO issue exports now use the configured AWS region. It matches the raw summary, which shows both S3 clients in the USE_MINIO branch receiving region_name from setti…
Description check
The description follows the template well. It has a Description section that explains the bug (HTTP 400 on download with USE_MINIO=1) and the fix (pass AWS_REGION to both boto3 clients, with None for …
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: MinIO issue exports now use the configured AWS region. It matches the raw summary, which shows both S3 clients in the USE_MINIO branch receiving region_name from settings.AWS_REGION. The 'fix(api)' prefix is a conventional-commit style and does not hurt clarity.
Full details: Description check
Explanation
The description follows the template well. It has a Description section that explains the bug (HTTP 400 on download with USE_MINIO=1) and the fix (pass AWS_REGION to both boto3 clients, with None for empty). It has a Type of change section with Bug fix checked. It has a Verification section that serves as Test Scenarios, with reproduction steps and results. The Screenshots section is absent, but it is conditional (if applicable). The References section is present in substance through the 'Related to #10426 and #10431' line, though it does not use the template's 'Link related issues' form exactly.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
On a self-hosted Plane instance with
USE_MINIO=1, issue exports could show completed while the download link returned HTTP 400. The export task creates two S3 clients, one for the internal upload endpoint and one for the public download URL. Both used boto3's default region even when the operator setAWS_REGION.Pass the configured region to both clients. An empty setting passes
Noneso boto3 can still resolve its default.Type of change
Verification
I reproduced this with Plane's pinned Silo object server in
ap-southeast-1and a boto3 default ofus-east-1. The smoke test posts a JSON export through Plane's API, reads the URL from export history, downloads the ZIP over HTTP, and checks the work item's name in the archive. PostgreSQL, Valkey and S3 are real local services. The Celery task runs inline.previewat3ad2c27f45458fThe unit tests also cover an empty region. To run the live smoke test against a disposable regional server, set
PLANE_TEST_REGIONAL_S3_URL,AWS_REGION, and the usual test bucket and credentials, then runpytest plane/tests/smoke/test_regional_export_download.pyfromapps/api.All eight focused export tests, backend Ruff checks, and all 56 tasks in
pnpm checkpassed. The full local API suite had 1,841 passes and four failures. I reran those four tests on cleanpreviewand reproduced all four failures (two generic asset upload tests and two public asset disposition tests).Related to #10426 and #10431. This patch covers the MinIO branch.
Summary by CodeRabbit