[bug]: USE_MINIO and AWS_S3_CUSTOM_DOMAIN do not align semantically when using external Minio / S3
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 59.6k
- Forks
- 5.8k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 49
Description
Is there an existing issue for this?
- I have searched the existing issues
Current behavior
When setting USE_MINIO to 1 while using an external instance at another domain, omitting the route through the Plane web proxy, asset URLs are malformed. This stops them from being loaded.
This is due to assuming an external S3 endpoint would always be served behind the Plane web proxy. For decoupling the two services in a distributed system, it would be preferred being able to differentiate between these cases:
USE_MINIO/USE_INTERNAL_MINIOUSE_EXTERNAL_S3
It appears USE_MINIO actually means USE_INTERNAL_MINIO. It's naming is further complicated, since setting the variable is required to use other S3 providers as well.
The common settings always assumes we deploy a non-AWS S3 behind the Plane web proxy
This works when AWS_S3_ENDPOINT_URL points to the internal http://plane-minio:9000. It fails when setting it to https://s3.example.com.
The cover image endpoint only recognises the AWS_S3_ENDPOINT_URL when USE_MINIO is set.
This leaves out the case where we want to set a custom AWS_S3_ENDPOINT_URL, but do not want to serve the bucket behind the same load balancer, e.g. via another host. This is useful for independently scaling out application and backing services.
There is a PR which only partially resolves this situation, by allowing to configure the Minio URL in the web proxy:
In the cover image example below, we receive this URL:
While we would like to see this:
The URLs are generated in:
The wrong assumption in common.py about AWS_S3_CUSTOM_DOMAIN is, that we always want to serve Minio/other S3 providers that are not AWS behind the Plane load balancer. This assumption is also present in the proposed partial fix https://github.com/makeplane/plane/pull/3278.
There should be cases possible in which we do not replace the AWS_S3_CUSTOM_DOMAIN, even when USE_MINIO is set.
Related issues:
- https://github.com/makeplane/plane/issues/1318
- https://github.com/makeplane/plane/issues/2345
- https://github.com/makeplane/plane/issues/3490
- https://github.com/makeplane/plane/issues/4248
- https://github.com/makeplane/plane/issues/5680
Steps to reproduce
- Upload a cover image to a new project
- Save the project
- Find a 404 GET request in the browser console.
Environment
Production
Browser
Mozilla Firefox
Variant
Self-hosted
Version
v0.25.1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.