During the wasm mounting stage, banyan-cli was creating a new mount and pushing it if it failed to pull one.
This was incorrect, and so was removed.
That said, we still needed a way to perform WasmMount::new on drive creation. A wasm mount will fail to pull if it has not been initialized, but this is not definitive indication that it wasnt initialized.
To accomplish this, create_bucket was refactored to create_bucket_and_mount (createBucketAndMount) which performs the necessary mounting initialization in tandem with the bucket creation, returning a simple WasmBucketMount type with getters for both internal fields.
Another minor fix was also implemented to fix an error in the write_read wasm test case, and wasm testing was modified to fit this new bucket creation paradigm.
Description
During the wasm mounting stage, banyan-cli was creating a new mount and pushing it if it failed to pull one. This was incorrect, and so was removed. That said, we still needed a way to perform
WasmMount::new
on drive creation. A wasm mount will fail to pull if it has not been initialized, but this is not definitive indication that it wasnt initialized.To accomplish this,
create_bucket
was refactored tocreate_bucket_and_mount
(createBucketAndMount
) which performs the necessary mounting initialization in tandem with the bucket creation, returning a simpleWasmBucketMount
type with getters for both internal fields. Another minor fix was also implemented to fix an error in thewrite_read
wasm test case, and wasm testing was modified to fit this new bucket creation paradigm.Link to issue
https://linear.app/banyan/issue/ENG-463/client-overwriting-buckets-w-empty-data
Link to corresponding PR
https://github.com/banyancomputer/banyan-core/pull/252
Type of change