banyancomputer / banyan-cli

Banyan's client, BanyanFS+CAR encrypted filesystem packer and metadata handler.
https://banyan.computer/
MIT License
25 stars 2 forks source link

Vera/ENG-463 Empty Data Bugfix #309

Closed organizedgrime closed 10 months ago

organizedgrime commented 10 months ago

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 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.

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

linear[bot] commented 10 months ago

ENG-463 Client Overwriting Buckets w/ Empty Data