-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
v0.20.0-rc2: cannot build plugins #9839
Comments
This can be simply reproduced with |
Unfortunately, anything that imports badger suffers this: dgraph-io/badger#1777 |
So all plugins somehow importing badger at the version we use (i.e. via Kubo or boxo) are going to be broken. We would need to port the badger fix to the 1.6.2 branch. 🤦 @aschmahmann would it be ok to fork badger and have this fixed ourselves? Badger at 1.6.2 is fully unmaintained... |
Issue would be fixed by including something like:
in Kubo, plus switching boxo/gateway to v2. |
This is related to ipfs/kubo#9839. boxo still depends on badger, which still requires xxhash/v1, but at least doesn't require it xxhash/v1 itself directly anymore.
Out this week so can't take a look at this yet, but this sounds like you're reporting a regression of #8550. There are sharness tests that test building plugins and make sure they work. IIRC of the possible solutions here, the easiest was to just not build Badger as a plugin but just include the code (https://github.com/ipfs/kubo/pull/8815/files#r832461708)... awkwardly I probably neglected to file an issue about bringing back some external test building with plugins for after the dependency issues linked were resolvable. Is it possible that some of the tooling you're using to build the plugins (e.g. the bash scripts in the kubo repo) is buggy and has re-added building Badger as an external plugin rather than just included in the codebase? Side note: @hsanjuan I wonder if #9782 might work for you as an alternative to Go plugins. Easier/harder/similar. If you've got some thoughts and time to comment on that PR it might help motivate changing our documentation to really dissuade users from using Go plugins (as opposed to the other plugin options or using boxo) unless necessary. |
The issue is that I cannot build a plugin with buildmode=plugin when linking Kubo/Boxo. But I could perfectly do that a while ago while we merged #9750. I'm not using any Kubo tooling to build the plugin nor doing anything weird. Perhaps the issue depend on how dependencies are resolved and the order is not always the same and refactors have affected this. Or somehow before I didn't transitively require badger and now with Boxo things have moved around and everything comes in. #9782 is meh... I can always have kubo as submodule and patch things in and get custom binaries. What I would like to have is regular plugins working so they can be dropped in with any official builds. Anyways fix is simple and safe enough, even if not overly pretty. Without fix then I'm forced to fork. |
This is related to ipfs/kubo#9839. boxo still depends on badger, which still requires xxhash/v1, but at least doesn't require it xxhash/v1 itself directly anymore.
fwiw I've merged ipfs/boxo#285 and boxo/gateway no longer pulls-in the old xxhash. As for badger in kubo, badger v1 is unmaintained, and the entire company that maintained newer versions imploded 🙈
|
@lidel before adding in replace directives or forking I think we should figure out what changed and make sure the sharness tests are working again. We've been operating with this since we added Go1.17 support and IIUC nothing has changed except maybe some dependencies moved around/swapped during the boxo migration. Seems like fixing that will do the job. Edit: We should confirm when things broke. It's possible the "fix" linked above didn't actually do much of anything for people building plugins which if true would mean nobody has been able to build any external plugins for quite a while which could inform future directions here. Longer term yeah, we should remove badgerv1 being built-in to kubo by default and if we want badger still included use the latest version. |
2023-05-02 maintainer conversation:
|
It may be that this is broken for a long time. At least But I still could build the nopfs plugin with |
Closed by mistake. So before
Did not need to be in the go.mod. Now requiring v0.20.0-rc2 makes it appear. There is a good chance that bubbling ipfs/boxo#285 to Kubo fixes my issue since it will make xxhash only reachable via test code (again). |
go mod why: Before:
After:
I think it's clearly a refactor that made core/node import gateway and that imports xxhash. So releasing and bubbling boxo should fix it. |
@hsanjuan thanks for the clarification that the build used to succeed and then started failing in nopfs rather than if kubo was built with I think with things bubbled up now it should work. I've updated the dependencies in nopfs to work with kubo master in ipfs-shipyard/nopfs#1. Going to close this issue for now and we're planning to cut v0.20 on Monday so if you get a chance to let us know if something isn't working by then reopen and we'll try and figure it out. |
It seems v0.20 was cut with the wrong version of boxo (still 0.8.1). So I can't attempt to integrate with the official binaries or release. Needless to say, it's disappointing. Do I have to wait another month now? |
I understood that v0.20.0 was going to include the fix: #9694 (comment) |
@hsanjuan sorry I messed this up. Should've been obvious that some commits needed to be cherry picked and a boxo release cut, but I missed it. Will check with the other maintainers on if getting a patch release out soon is feasible. |
Reopening as a signal that we need to talk about the release of this. |
@hsanjuan : so as @aschmahmann shared, we messed up here. By default this will go out with the 0.21 release (currently scheduled for 2023-06-08). A Kubo release isn't free on our end, but we will do a 0.20.1 release on end if it impacts you to wait until 0.21. I'd obviously like to avoid doing extra work here, but we will certainly do it if this is impacting you. Please don't hesitate to say if it is. Thanks - our apologies on the delay here. In terms of how to prevent this from happening again in the future, I have created ipfs/kuboreleaser#6, which I'm hoping we can land for 0.21. |
Waiting for 0.21 is ok, thanks @BigLep ! |
Closing since there is a Boxo 0.9 release that has the required items and is in Kubo master. Thanks for your patience! |
Everything works now, thanks! |
Checklist
Installation method
ipfs-update or dist.ipfs.tech
Version
Config
No response
Description
Building plugins that link against Kubo v0.20.0-rc2 is not possible:
The issue has been fixed in cespare/xxhash#54. However, boxo/gateway pulls xxhash v1, which seems unmaintained and carries this issue.
I don't know why this hasn't shown up before... boxo?
The text was updated successfully, but these errors were encountered: