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

RFC: Update pact-node branch with latest ruby standalone binaries and support multiple architectures #489

Closed
YOU54F opened this issue Feb 23, 2024 · 1 comment
Labels
enhancement Indicates new feature requests

Comments

@YOU54F
Copy link
Member

YOU54F commented Feb 23, 2024

Previous issues

Problem

Some users are unable to migrate to the latest version of pact-js/pact-js-core which leverages the Rust runtime, due to various reasons.

They are beginning to encounter errors with the standalone package as it is outdated, and predates our work on the traveling-ruby fork to support the latest ruby runtimes and multiple archs.

Steps

  • PR to update pact-js-core to consume v2 pact-ruby-standalone
  • PR to update pact-js-core to support multiple arches (arm64 for linux and macos)
  • Release of pact-node from pact-node branch
  • Release of pact-js v9 to include new release of pact-node

Breaking Changes

None

User Actions

None

Potential Downsides/Caveats

Supporting the pact-node branch and pact-js v9.x.x even for an interim release, would probably warrant a dependency update.

We would probably not want to provide tier 1 support for this, but it may help unblock users as an interim measure

Has it previously been tested

Yes, when I created the new traveling-ruby releases, I tested against the pact-node branch in my fork.

https://github.com/YOU54F/pact-js-core/commits/pact-node-arm64/

Released to npm

https://www.npmjs.com/package/@you54f/pact-node?activeTab=code

and consumed in a pact-js-core fork

https://www.npmjs.com/package/@you54f/pact/v/9.20.0?activeTab=code

Other options

Users can provide their own binary docs ref and rename the latest release to match whatever is in pact-node's latest release.

However it is checksum validated. Another potential could be to remove the checks here, such that users can provide their own binaries, and we wouldn't have to do updates of pact-node / pact-js-core v9, if the standalone is updated.

For the example given above, Pact will look for the binary at /home/some-user/Downloads/pact-1.44.0-win32.zip for a Windows system. However, by using this method, you must use the correct Pact version binary associated with this version of Pact-Node. For extra security measurements, checksum validation has been added to prevent tampering with the binaries.

@YOU54F
Copy link
Member Author

YOU54F commented Mar 13, 2024

@pact-foundation/pact-node was updated to v10.18.0 contain

https://www.npmjs.com/package/@pact-foundation/pact-node/v/10.18.0

It contains the following pull request

#491

This results in v9.x users of pact-js picking up the changes via a caret filter in the package.json deps for @pact-foundation/pact-node

The benefits include

  • latest bundled ruby runtime (3.2.3)
  • arm64 native binaries for linux/macos

This is to serve as a stopgap for users for migrating onto pact-js v10 (migration to rust core) and onwards (currently v12.x)

Tested locally with 9.18.1

@YOU54F YOU54F closed this as completed Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Indicates new feature requests
Projects
None yet
Development

No branches or pull requests

1 participant