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

coreapi/unixfs: don't create an additional IpfsNode for --only-hash #10184

Merged
merged 1 commit into from
Mar 19, 2024

Conversation

MichaelMure
Copy link
Contributor

It looks to me that we don't need to create a full IpfsNode for --only-hash, we only need a null blockstore to simulate adding the data.

This also remove entirely the NilRepo option when creating IpfsNode, as it looked like a no longer necessary workaround to me.

@MichaelMure MichaelMure requested a review from a team as a code owner October 20, 2023 14:44
@MichaelMure MichaelMure force-pushed the simplify-only-hash branch 2 times, most recently from 72d6494 to bb4212e Compare October 20, 2023 15:05
@MichaelMure
Copy link
Contributor Author

For a bit more context, we use Fx to override some data pipeline components. As the previous code was creating another IpfsNode, that would run Fx a second time, and notably try to open a leveldb twice. That would crash kubo on the first request with that option.

@BigLep BigLep mentioned this pull request Nov 9, 2023
11 tasks
@hacdias hacdias added the skip/changelog This change does NOT require a changelog entry label Feb 8, 2024
@MichaelMure
Copy link
Contributor Author

@hacdias can that be merged now?

Copy link
Member

@hacdias hacdias left a comment

Choose a reason for hiding this comment

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

This does seem like a sensible cleanup for me. I will merge.

@hacdias hacdias enabled auto-merge (rebase) March 19, 2024 11:29
@hacdias hacdias merged commit a3483e3 into ipfs:master Mar 19, 2024
14 checks passed
@MichaelMure
Copy link
Contributor Author

Thank you!

mvdan added a commit to mvdan/go-dvote that referenced this pull request May 6, 2024
The only API change is BuildCfg.NilRepo being removed as unnecessary
in ipfs/kubo#10184.
p4u pushed a commit to vocdoni/vocdoni-node that referenced this pull request May 8, 2024
The only API change is BuildCfg.NilRepo being removed as unnecessary
in ipfs/kubo#10184.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip/changelog This change does NOT require a changelog entry
Projects
No open projects
Status: 🎉 Done
Development

Successfully merging this pull request may close these issues.

2 participants