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(cli): Clean up pinning CLI flags #1012

Merged
merged 3 commits into from
Feb 17, 2021
Merged

Conversation

stbrody
Copy link
Contributor

@stbrody stbrody commented Feb 16, 2021

No description provided.

@stbrody stbrody self-assigned this Feb 16, 2021
@@ -269,8 +269,8 @@ class Ceramic implements CeramicApi {

const pinStoreProperties = {
networkName: networkOptions.name,
pinsetDirectory: config.pinsetDirectory,
pinningEndpoints: config.pinningEndpoints,
pinsetDirectory: config.stateStoreDirectory,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wasn't sure if I should also rename this args for the PinStoreFactory. The PinStoreFactory tries really hard to be flexible and agnostic about what the actually underlying pinning backend service is, but there would need to be more work done to make it actually possible to provide a different PinningBackend. Also as the entire PinningBackend API is built around CIDs, (and doesn't even give a way to load the IPFS record contents) it's hard to imagine any other backend other than IPFS.

I kind of feel like we have the wrong level of abstraction here. We have all this low-level machinery to allow different PinningBackends, except that capability is never exposed to higher layers and we'll probably never have another implementation. Meanwhile we have hard-coded logic to use a LevelStateStore, and here we are wanting a new StateStore implementation.

Anyway, I think for this PR it makes sense just to focus on the CLI flags, and then my next PR will have to make some bigger changes to the PinStoreFactory to allow plugging in different StateStores. I am however getting worried about this work colliding with the work that @ukstv is also doing in this area and causing some gnarly merge conflicts

@stbrody stbrody requested review from ukstv and oed February 16, 2021 23:04
Copy link
Contributor

@ukstv ukstv left a comment

Choose a reason for hiding this comment

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

🏇

@stbrody stbrody merged commit 8cf3a0b into develop Feb 17, 2021
@stbrody stbrody deleted the feat/cleanup-pinning-flags branch February 17, 2021 17:18
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.

2 participants