Skip to content
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

fix: download operators result #3241

Merged
merged 24 commits into from
Mar 4, 2025
Merged

fix: download operators result #3241

merged 24 commits into from
Mar 4, 2025

Conversation

aicam
Copy link
Collaborator

@aicam aicam commented Feb 2, 2025

This PR is in continuous of PR 3221 to implement download logic in backend.

Export request structure updates

In this PR, we update ResultExportRequest to include a new variable named destination. If its set to local, means the user wants to download operators result. Also, operatorIds is now plural so with one request, multiple operators can be exported (locally or to dataset).

Export endpoint updates

In this PR, we update ResultResource to support destination=local. In this regard, we have two cases:

  • If destination is local and one operator is selected, download one operator result based on export type
  • If destination is local and multiple operators are selected, download a zip file containing all
    The export to dataset follows the old logic.

Export service updates

In this PR, we update ResultExportService to have two core more new functions:

  • exportOperatorResultAsStream: For local download of a single operator. Streams the data directly.
  • exportOperatorsAsZip: For local download of multiple operators. Zip the output and stream back.

Demo video

2025-02-02.14-00-34.mp4

@aicam aicam requested a review from bobbai00 February 2, 2025 22:13
@aicam aicam self-assigned this Feb 2, 2025
Copy link
Collaborator

@bobbai00 bobbai00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments

Copy link
Collaborator

@bobbai00 bobbai00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left some comments

@aicam aicam requested a review from bobbai00 March 2, 2025 23:02
Copy link
Collaborator

@bobbai00 bobbai00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! left some minor comments

@aicam aicam merged commit 9ecd32c into master Mar 4, 2025
8 checks passed
@aicam aicam deleted the fix-download branch March 4, 2025 17:06
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