Skip to content

fix(api): use the configured region for MinIO issue exports - #10480

Open
Bharath-K-Shetty wants to merge 1 commit into
makeplane:previewfrom
Bharath-K-Shetty:fix/regional-minio-exports
Open

Bharath-K-Shetty wants to merge 1 commit into
makeplane:previewfrom
Bharath-K-Shetty:fix/regional-minio-exports

Conversation

@Bharath-K-Shetty

@Bharath-K-Shetty Bharath-K-Shetty commented Dec 4, 2026 •

Copy link
Copy Markdown

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 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.

Revision Regional MinIO download
preview at 3ad2c27 HTTP 400
#10431 at f45458f 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.

@CLAassistant

CLAassistant commented Dec 4, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@coderabbitai

coderabbitai Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

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.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related issues

  • 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

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: Passed 4

Check name Status Explanation
Title check Passed 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 Passed 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 Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed 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.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 74364cba-87b5-48c1-9457-9da0506bbdb7
Commits

Reviewing files that changed from the base of the PR and between 3ad2c27 and 927b2e9.

Files selected for processing: 3

  • apps/api/plane/bgtasks/export_task.py
  • apps/api/plane/tests/smoke/test_regional_export_download.py
  • apps/api/plane/tests/unit/bg_tasks/test_export_task_upload.py

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
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.

2 participants