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

[DX Streamline] Offer prebuilt filecoin-ffi Go modules natively #209

Open
mvdan opened this issue Oct 12, 2021 · 11 comments
Open

[DX Streamline] Offer prebuilt filecoin-ffi Go modules natively #209

mvdan opened this issue Oct 12, 2021 · 11 comments
Assignees
Milestone

Comments

@mvdan
Copy link

mvdan commented Oct 12, 2021

Detailed design: https://hackmd.io/@mvdan/Hy7iK0TEY

Note that the design just outlines the problem and the high level design of how it would be fixed. I've deliberately left the implementation details vague, e.g. what kind of HTTP server to use for the proxy redirects.

@mvdan
Copy link
Author

mvdan commented Oct 14, 2021

One alternative discussed with @Kubuxu on Slack: make the "forwarding FFI module" be separate, such as a new filecoin-ffi-prebuilt, so all the noise related to code generation or continuous bumping of go.mod dependency versions doesn't affect the main repo that humans are working on.

@BigLep
Copy link
Member

BigLep commented Oct 28, 2021

Pasting from Slack...

From https://hackmd.io/@mvdan/Hy7iK0TEY , I get there is manual work and that it spreads to transitive dependencies. How big is that sprawl? I assume the Lotus repos is affected? Which others?

The sprawl reaches any repository that somehow ends up depending on filecoin-ffi. It affects 24 repositories in the filecoin org itself: https://github.com/search?q=org%3Afilecoin-project+filecoin+ffi+replace+filename%3Ago.mod

Is it correct to say that these repos that have a transitive dependency on filecoin-ffi can't be onboarded to unified CI?

Yes. We could teach Unified CI to special case filecoin-ffi, such as detecting the presence of the go.mod replace directive and acting accordingly, but that kinda defeats the purpose of Unified CI being generic and encouraging good practices :)

Is Unified CI itself held back in any way from this (or is the blast radius contained to the packages that have a transitive dependency on filecoin-ffi?)

Blast radius (i.e. inability to use Unified CI) is restricted to the modules which have the replace .../filecoin-ffi line, like the search results above.

The thread mentions #209 being owned by Filecoin Stewards, but this is ultimately changes in filecoin-ffi right (which I believe Filecoin Proofs owns)?

You might be right - my understanding of the Filecoin org is rather limited.


This is the list of filecoin org packages impacted:

filecoin-project/boost
filecoin-project/chain-validation
filecoin-project/dealbot
filecoin-project/eudico
filecoin-project/filecoin-datasets
filecoin-project/gfm-priv
filecoin-project/go-commp-utils
filecoin-project/go-fil-markets
filecoin-project/go-padreader
filecoin-project/go-sectorbuilder
filecoin-project/go-shared-types
filecoin-project/go-storage-miner
filecoin-project/lily
filecoin-project/lotus
filecoin-project/lotus-testground
filecoin-project/oni
filecoin-project/sector-storage
filecoin-project/sentinel-drone
filecoin-project/slingshot-stats
filecoin-project/statediff
filecoin-project/storage-fsm
filecoin-project/test-vectors
filecoin-project/venus
filecoin-project/venus-market
filecoin-project/venus-miner
filecoin-project/venus-sealer

@BigLep
Copy link
Member

BigLep commented Oct 28, 2021

Additional notes from Slack...

Unified CI isn't held up by this across PL. We're just unable to use Unified CI on a significant chunk of lotus-related repositories until we solve the problem.

As for my proposed solution with Go modules: it's certainly non-trivial, but we think it's in Filecoin's best interest to solve it sooner rather than later as well - not just for Unified CI, because it would also simplify building and development without manual steps.

@Kubuxu
Copy link

Kubuxu commented Jan 9, 2024

Of note, the redirect/forwarding can be achieved with Cloudflare workers, so no server/persistent infra is required.

@rvagg rvagg added this to the DX-Streamline milestone May 17, 2024
@rjan90 rjan90 changed the title offer prebuilt filecoin-ffi Go modules natively [DX Streamline] Offer prebuilt filecoin-ffi Go modules natively Jun 4, 2024
@rjan90 rjan90 changed the title [DX Streamline] Offer prebuilt filecoin-ffi Go modules natively offer prebuilt filecoin-ffi Go modules natively Jun 4, 2024
@rjan90 rjan90 assigned rjan90 and aarshkshah1992 and unassigned rjan90 Jun 5, 2024
@rjan90 rjan90 changed the title offer prebuilt filecoin-ffi Go modules natively [DX Streamline] Offer prebuilt filecoin-ffi Go modules natively Jun 5, 2024
@BigLep
Copy link
Member

BigLep commented Jun 6, 2024

Recent discussion about the pain in FIL Slack #fil-lotus-dev: https://filecoinproject.slack.com/archives/CP50PPW2X/p1717676403286179

@aarshkshah1992
Copy link
Contributor

POC is up at https://github.com/aarshkshah1992/ffi-app 🎉

Putting together a plan/executing on taking this to prod now.

@BigLep
Copy link
Member

BigLep commented Jun 10, 2024

Good stuff @aarshkshah1992 ! I assume you'll post the plan/steps here for review? You don't need to block on review, but I want to make sure we're all aligned.

Also, I think a sequence diagram / visual will be worth a lot here. I know there is some description in https://hackmd.io/@mvdan/Hy7iK0TEY and https://app.excalidraw.com/l/AtvYo7ZDrTn/57rJelzHyLp , but a fully accurate picture of the end state including request parameters, redirects, etc. I think could be useful.

@aarshkshah1992
Copy link
Contributor

@BigLep Yes, will post a detailed (plan + sequence diagram) here tomorrow to get buy-in as this workstream touches a LOT of touch points.

@aarshkshah1992
Copy link
Contributor

@BigLep Have detailed the work that needs to be done at https://github.com/aarshkshah1992/ffi-app/pull/1/files.

@BigLep
Copy link
Member

BigLep commented Jul 22, 2024

From @rvagg in https://filecoinproject.slack.com/archives/CP50PPW2X/p1721617496659179

More contributor pain that would be fixed by the filecoin-ffi Go prebuilds filecoin-project/lotus#12241

@BigLep
Copy link
Member

BigLep commented Jul 25, 2024

Another instance where not having this caused trip-ups: filecoin-project/lotus#12306 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ⌨️ In Progress
Development

No branches or pull requests

6 participants