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/pact plugin detect musl #57

Closed

Conversation

YOU54F
Copy link
Member

@YOU54F YOU54F commented Feb 13, 2024

Create musl based variants of

  • pact-plugin-cli

Tracking issue:- pact-foundation/roadmap#30

Follows on from pact-foundation/pact-reference#372

Updates jvm and rust drivers

  • check for musl presence
    • compile time flag for rust
    • ldd lookup jvm
  • download musl variants, prefixed with -musl
  • fallback to non musl variant, if not provided and warn the user that issues may occur.

Additionally

  • pins cross to 0.2.5 to ensure we build against the correct version of glib, issue from pact-ref
  • fix pact-plugin-cli 0.1.1 missing linux x86_64 artifact #52 - there was an error before building (I believe it was linked to a path path = "../drivers/rust/driver" in the docker builder, but this context wasn't passed available. I switched it out to use cross 0.2.5 for consistency

Testing notes

Have tested out the pact-plugin-cli with the rust driver in pact-php and pact-go forked workflows. Haven't tested the jvm drivers post the update to fallback to non musl variants but will test it out.

@YOU54F
Copy link
Member Author

YOU54F commented Mar 4, 2024

I've tested this against various forks of our pact projects (pact-php, pact-js, pact-go), pact-ruby-ffi, and my project hello_ffi it is working well under alpine.

Failures are due to not having relevant access to tokens to publish pacts

Sample builds are available on my fork release which point to an updated repo index which points to my forks, to pull the musl builds.

https://github.com/YOU54F/pact-plugins/releases/tag/pact-plugin-cli-v0.1.2

Happy to take any feedback to get this merged @rholshausen, I could refactor some bits to make it a bit cleaner

@YOU54F YOU54F requested a review from rholshausen March 4, 2024 23:19
@YOU54F
Copy link
Member Author

YOU54F commented Mar 16, 2024

this PR will be reapproached to consider building only a musl variant for linux, and providing it with the name of the existing glibc based executable.

The resulting binary should work for all, and simplifies any musl or os detection requirements for linux

1 similar comment
@YOU54F
Copy link
Member Author

YOU54F commented Mar 16, 2024

this PR will be reapproached to consider building only a musl variant for linux, and providing it with the name of the existing glibc based executable.

The resulting binary should work for all, and simplifies any musl or os detection requirements for linux

@YOU54F YOU54F closed this Apr 25, 2024
@YOU54F YOU54F deleted the feat/pact-plugin_detect_musl branch July 5, 2024 02:08
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.

pact-plugin-cli 0.1.1 missing linux x86_64 artifact
1 participant