-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Fix S3 file storage import #6893
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
When using cloud storage, a task created from an imported image has a relative URL (e.g., `upload/1/d0672b53-ff-template.jpg`) that breaks when enabling cloud file storage. The fix adds `CustomS3Boto3Storage::url` and utilizes it in the `FileUpload::read_task_from_uploaded_file` to make the app correctly display imported images.
👷 Deploy request for label-studio-docs-new-theme pending review.Visit the deploys page to approve it
|
👷 Deploy request for heartex-docs pending review.Visit the deploys page to approve it
|
This PR is stale because it has been open 45 days with no activity. Remove |
That is still a problem. Is there anything else I can do to make it merged? |
@nikitabelonogov could you please create a mirror fb-PR for this one to run all tests? |
This PR is stale because it has been open 45 days with no activity. Remove |
This PR was closed because it has been stalled for 10 days with no activity. |
PR fulfills these requirements
[fix|feat|ci|chore|doc]: TICKET-ID: Short description of change made
ex.fix: DEV-XXXX: Removed inconsistent code usage causing intermittent errors
I'm not sure what I can do, I don't have a ticket id.
Change has impacts in these area(s)
Describe the reason for change
When using cloud storage, a task created from an imported image has a relative URL (e.g.,
upload/1/d0672b53-ff-template.jpg
) that breaks when enabling cloud file storage.What does this fix?
The fix adds
CustomS3Boto3Storage::url
and utilizes it in theFileUpload::read_task_from_uploaded_file
to make the app correctly display imported images.What is the new behavior?
When manually importing, the task URL will have
s3://BUCKER_NAME/
prefix.What is the current behavior?
The task URL has no prefix (e.g.,
upload/1/d0672b53-ff-template.jpg
), so it fails to display in the app.What libraries were added/updated?
NA
Does this change affect performance?
NA
Does this change affect security?
NA
What alternative approaches were there?
The alternative was to resolve to the storage URL when displaying, but using the file storage instance was a more straightforward approach and matched the storage-imported task schema.
What feature flags were used to cover this change?
NA
Does this PR introduce a breaking change?
I'm not sure what was the current setup, but it was clearly not working for cloud file storage, but I can imagine there was a working setup that might get affected, but it is not clear from the source code if there was any.
What level of testing was included in the change?
(check all that apply)
Which logical domain(s) does this change affect?
(for bug fixes/features, be as precise as possible. ex. Authentication, Annotation History, Review Stream etc.)