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

feat(blob-store): Add wasi-blob-store capability #361

Merged
merged 25 commits into from
Mar 31, 2023
Merged

feat(blob-store): Add wasi-blob-store capability #361

merged 25 commits into from
Mar 31, 2023

Conversation

Mossaka
Copy link
Member

@Mossaka Mossaka commented Mar 14, 2023

This PR is largely work-in-process. It's goal is to add wasi-blob-store proposal as a capability to slight.

I will make increment addition to this PR as seperate commits for easier review.

  • structure the blob-store WIT
  • implement AWS S3 on blob-store interface
  • write an example of using S3
  • write an integration test to fully test the APIs of blob store
  • do we want to implement available and close?

Signed-off-by: Jiaxiao Zhou <[email protected]>
@Mossaka Mossaka marked this pull request as draft March 14, 2023 07:31
@Mossaka Mossaka added the ⭐ epic A grouping of features or tasks label Mar 14, 2023
@Mossaka Mossaka linked an issue Mar 14, 2023 that may be closed by this pull request
@Mossaka Mossaka added this to the [KUBECON] March Milestone milestone Mar 14, 2023
Signed-off-by: Jiaxiao Zhou <[email protected]>
Copy link
Collaborator

@danbugs danbugs left a comment

Choose a reason for hiding this comment

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

Is this PR only for adding the interface or do you plan to add an implementor (i.e., possibly move azblob)?

@Mossaka
Copy link
Member Author

Mossaka commented Mar 15, 2023

Is this PR only for adding the interface or do you plan to add an implementor (i.e., possibly move azblob)?

I intended to work more on this PR to add at least one implementor. Possibly I will add aws s3

Mossaka added 6 commits March 20, 2023 23:08
Signed-off-by: Jiaxiao Zhou <[email protected]>
Modify the the read stream APIs to change read-into to read due to the
current limitation of wit-bindgen which does not support generating
a mutable resource reference.
Signed-off-by: Jiaxiao Zhou <[email protected]>
@Mossaka Mossaka marked this pull request as ready for review March 24, 2023 22:39
@Mossaka
Copy link
Member Author

Mossaka commented Mar 24, 2023

This PR is mostly ready for review, although there are some remaining tasks to finish before this is mergable. I will document the tasks on the PR description section.

Mossaka added 5 commits March 24, 2023 16:04
Signed-off-by: Jiaxiao Zhou <[email protected]>
Signed-off-by: Jiaxiao Zhou <[email protected]>
Signed-off-by: Jiaxiao Zhou <[email protected]>
Copy link
Contributor

@arschles arschles left a comment

Choose a reason for hiding this comment

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

Just some nit-picks, but overall looks great

crates/blob-store/src/implementors/aws_s3.rs Outdated Show resolved Hide resolved
crates/blob-store/src/implementors/aws_s3.rs Outdated Show resolved Hide resolved
crates/blob-store/src/lib.rs Show resolved Hide resolved
tests/blob-store-test/src/main.rs Outdated Show resolved Hide resolved
tests/blob-store-test/src/main.rs Outdated Show resolved Hide resolved
tests/blob-store-test/src/main.rs Outdated Show resolved Hide resolved
Copy link
Member

@devigned devigned left a comment

Choose a reason for hiding this comment

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

Mostly nits and questions. Looking pretty solid.

wit/blob-types.wit Show resolved Hide resolved
wit/blob-types.wit Show resolved Hide resolved
wit/blob-store.wit Show resolved Hide resolved
wit/blob-store.wit Show resolved Hide resolved
tests/blob-store-test/testfile.txt Outdated Show resolved Hide resolved
crates/blob-store/src/read_stream.rs Outdated Show resolved Hide resolved
crates/blob-store/src/implementors/aws_s3.rs Show resolved Hide resolved
crates/blob-store/src/implementors/aws_s3.rs Outdated Show resolved Hide resolved
Mossaka added 2 commits March 29, 2023 12:34
…store capability (#372)

add azure blob storage implementation to wasi-blob-store capability

Signed-off-by: Jiaxiao Zhou <[email protected]>
Signed-off-by: Jiaxiao Zhou <[email protected]>
@Mossaka
Copy link
Member Author

Mossaka commented Mar 29, 2023

I've merged the azure-blob implementation to this PR and unforunately this one became much harder to review... I would really appreicate if you could take a second look @devigned, @danbugs, @arschles

Copy link
Member

@devigned devigned left a comment

Choose a reason for hiding this comment

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

azblob implementation looks good. Nice work. I'm unsure as to what the expected behavior is of close and available. I have ideas about what behavior is expect of an implementor, but it would helpful to be clear about it.

crates/blob-store/src/read_stream.rs Show resolved Hide resolved
crates/blob-store/src/write_stream.rs Show resolved Hide resolved
Mossaka added 3 commits March 29, 2023 16:46
Signed-off-by: Jiaxiao Zhou <[email protected]>
Signed-off-by: Jiaxiao Zhou <[email protected]>
@Mossaka
Copy link
Member Author

Mossaka commented Mar 30, 2023

Could you please give another pass? @devigned , @danbugs . I'd like to get this merged in today

@Mossaka
Copy link
Member Author

Mossaka commented Mar 31, 2023

I will merge this PR in and have a follow-up PR to fix the delete-objects and keep wits up-to-date.

@Mossaka Mossaka merged commit e0fbb96 into main Mar 31, 2023
@Mossaka Mossaka deleted the blob-store branch March 31, 2023 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⭐ epic A grouping of features or tasks
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

implement wasi-blob-store interface
4 participants