-
Notifications
You must be signed in to change notification settings - Fork 7
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
[FLI-856] Support Alpine/Musl #141
Comments
See: https://github.com/flipt-io/flipt-client-sdks/actions/runs/7962787687/job/21736987230?pr=140#step:5:1395 for POC of failing test using |
cc @piclemx |
@markphelps I would go with the second option also. |
What would option 2 look like in practice? For example, if I import the |
@markphelps Spent some time looking into this. I think a good example repo to look at is the confluent-kafka-go library since they use the For the Go SDK, it looks like they use Go build tags to support musl vs libc, which seems like a better option than different imports. If you look at the Also, see the It seems like the biggest downside to this approach is that it will download all the different pre-built binaries during the Some additional useful reading: |
Just checking in on this. We'd love to use the client-side evaluation SDK, but this is a blocker for us (not just musl, but also automatic arch selection). |
He @jalaziz sorry for the delay in replying. We can definitely take a look at building a MUSL compatible build and packaging like you mentioned above. Or if you are able to contribute we would ofcourse ❤️ that as well! We are also actively exploring leaning more into WASM, and building a proper WASM impl of the evaluator engine (not just for JS like we have now) and then using WASM runtimes in the various languages we support to call the evaluator. The main benefit of this approach would be that it would be architecture independent. First one would likely be Go since that's the language we use the most internally. Would this work for you and your team? |
That would work great. Our main use case is Go as well. I don't know if I'll have time to contribute the changes for the approach outlined above, but I'll definitely try! |
@jalaziz @piclemx we just released Can you try:
It should support both x86 and arm on Linux |
I'm implementing Flipt at alpine based Java microservices for my company. Is there some workaround or a roadmap planned for the Java version? This seems to be a big blocker for now |
I can get a Java version of the sdk built that works on musl. Will work on it today and keep you posted |
@willyw0nka we just released https://central.sonatype.com/artifact/io.flipt/flipt-client-java-musl could you try it and let me know if it works for you? |
Hi @markphelps , I'm a colleage of @willyw0nka and tried your solution. It still doesn't work for us. I integrated the dependency and built the project just fine, but when I tried to run it on my development machine (OSX) it throws me these errors.
Next thing I tried was to run the app.jar inside our Alpine Linux docker image and the errors are the same as with the regular java version.
hope you can help us. |
Hey @SultanICQ thanks for the detailed reply! I think there's two issues going on here:
I'll be sure to test this as well before declaring the next version good |
Hi @markphelps no worries. If you need me to test something dont doubt to reach me. |
I just released it seems to take a bit for it to make it to maven central however, so maybe can try in 30m or so? Im about to be traveling for the next couple hours but can follow up later today |
No worries! :) |
I just finished testing it and it worked like a charm in both scenarios. Well done! |
Thanks for your patience and for testing @SultanICQ !! |
Hi @markphelps, today one of our developers with a windows machine tested the new library and, as everybody would expect, it didn't work because the windows libraries are not included. Could it be possible for the musl version to add also de win dlls? |
Hey @SultanICQ yes I will work on getting a windows version built this week |
@SultanICQ does your colleague need 32-bit or 64-bit Windows support? |
oh nevermind i see x86-64 in the stack trace |
Work being done over 👉🏻 #433 |
Hey @SultanICQ we just released Can you have your coworker try |
Hi @markphelps ! I'll prepare a test for my colleage to try. I assume she'll do the test on monday at the earliest. I keep you posted. |
Hi @markphelps , I deleted my previous message, maybe you have received an email from github. With Windows now there is no library error but now there is a subtle error with the evaluateBoolean response. I see that now is not returning a Result. So I think that overall it works but I have to adapt my code with this method signature change. I keep you posted. |
Yes apologies we simplified the response type by not returning the wrapped Result type re: #353 Since these are pre 1.0.0 releases we decided to bump the minor version for this change in method signature.. sorry about that |
Well, all good and working fine with this new version from my side. Nice work!! |
Just getting back to this, but unfortunately a musl vs glibc dependency won't work for us long term. While all our built docker images are Alpine, we generally test locally on our machines which use glibc. It would be great if we could install one dependency that is universal. As I mentioned in a previous post, that should be doable with Go and build tags. Yes that means downloading both the musl and glibc libraries when building, but I don't think that's a major issue. |
Gotcha. I'll create a universal version to try this approach and ping you once ready |
Currently the engine is only compiled against GLibc which means the clients will not work in Alpine env
We should create musl compatible versions, targeting
x86_64-unknown-linux-musl
andaarch64-unknown-linux-musl
I think there are two paths we could take:
flipt-client-java
) should 'just work' on all architecturesflipt-client-x
library, putting the responsibility on the user/integrator to select the correct SDK for their use case.I'm leaning on 2 as it might be very difficult for us to figure out which version of the
fliptengine
Clib to 'load' at runtime when the clients initialize (ie likely not all languages allow you to know whichlibc
your os supports/requires). Also each additionalfliptengine
we package increases the overall library side by avg of 20-30mb (perhaps we can find a way to slim these down though?)I'd be interested to know what others think, also if there are any examples of other SDKs built with FFI and run on both libc and musl based OSes
From SyncLinear.com | FLI-856
SDKs to Support
The text was updated successfully, but these errors were encountered: