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

ref(*)!: Reorganizes the blobstore interface #23

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

thomastaylor312
Copy link
Collaborator

This is a relatively simple PR that mostly restructures things. This removes the container interface because there wasn't much you could do with it by itself, it always had to be used in conjunction with the blobstore interface. I also got rid of all of the type aliases for strings to make the types interface cleaner, as well as follow what we've been doing in the other wasi cloud interfaces with avoiding type aliases.

Additionally, I updated the timestamps to use the wasi-clock timestamps instead so we were using a concrete type. That was the only major change here, but it does solve an outstanding issue we have.

Closes #7

This is a relatively simple PR that mostly restructures things. This
removes the container interface because there wasn't much you could do
with it by itself, it always had to be used in conjunction with the
blobstore interface. I also got rid of all of the type aliases for
strings to make the types interface cleaner, as well as follow what we've
been doing in the other wasi cloud interfaces with avoiding type aliases.

Additionally, I updated the timestamps to use the wasi-clock timestamps
instead so we were using a concrete type. That was the only major change
here, but it does solve an outstanding issue we have.

Closes WebAssembly#7

Signed-off-by: Taylor Thomas <[email protected]>

// creates a new empty container
create-container: func(name: container-name) -> result<container, error>;
create-container: func(name: string) -> result<container, string>;
Copy link
Collaborator

Choose a reason for hiding this comment

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

perhaps we want an enum type for the error of blob store operations?

Copy link
Collaborator Author

@thomastaylor312 thomastaylor312 Jul 30, 2024

Choose a reason for hiding this comment

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

I thought about that, but didn't want to do too many changes here. I can open an issue and address in a follow up along with #5. Might also do as a separate commit to this PR if needed

@ossfellow
Copy link

@thomastaylor312, with the proposed update, how either of the following wit/blobstore.wit functions can work for a different container than the one these methods are invoked for?

# blobstore.wit
copy-object: func(src: string, dest: string) -> result<_, string>;
move-object: func(src: string, dest: string) -> result<_, string>;

Before the update object-id, which is replaced by string was defined as:

# types.wit
  // identifier for an object that includes its container name
  record object-id {
    container: container-name,
    object: object-name
  }

So it had a container-name property, but that's lost now.

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.

More explicit date-and-time resource
3 participants