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

Split start and finish block upload endpoints. #2486

Merged
merged 5 commits into from
Jul 20, 2022

Conversation

pstibrany
Copy link
Member

@pstibrany pstibrany commented Jul 20, 2022

What this PR does

This PR splits existing block upload endpoint /api/v1/upload/block/{block} into two:

  • /api/v1/upload/block/{block}/start
  • /api/v1/upload/block/{block}/finish

Primary motivation is that in PR #2471 we are going to change output of /api/v1/upload/block/{block}/finish to send progress of validation, and handling both operations in single handler, each with different outputs was cumbersome.

"start" only returns HTTP status code, while "finish" will send HTTP status code but also json objects, and client will need to parse the output to discover if upload of the block finished successfully or not. (This will be true after #2471 is ready)

Note that block upload API is still experimental and subject to change.

Checklist

  • [na] Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Signed-off-by: Peter Štibraný <pstibrany@gmail.com>
Signed-off-by: Peter Štibraný <pstibrany@gmail.com>
Signed-off-by: Peter Štibraný <pstibrany@gmail.com>
Copy link
Contributor

@56quarters 56quarters left a comment

Choose a reason for hiding this comment

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

Nice improvement!

Signed-off-by: Peter Štibraný <pstibrany@gmail.com>
pkg/compactor/block_upload.go Outdated Show resolved Hide resolved
pkg/compactor/block_upload.go Outdated Show resolved Hide resolved
Signed-off-by: Peter Štibraný <pstibrany@gmail.com>
@pstibrany pstibrany enabled auto-merge (squash) July 20, 2022 15:12
@pstibrany pstibrany merged commit 5da53cf into main Jul 20, 2022
@pstibrany pstibrany deleted the split-start-finish-block-upload-endpoint branch July 20, 2022 15:15
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.

None yet

3 participants