-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Aim
- Identify all Ruby codebases which need updating to Ruby 3.1 or higher
- Identify all consumers of ruby codebases
- Document "Rube Goldberg" machine for
- Pact Ruby Reference Core as referenced here in the dependency graph of doom
- Pact Rust Reference Core
- Update to at least, Ruby 3.1, preferably Ruby 3.2 across all affected repos
- Update all affected repos
- Test all affected repos
Why?
- Users of our pact-ruby-standalone project, have been stuck on a packaged Ruby 2.4 run-time due to the build system traveling-ruby, being out-of-maintainence. It has been revived by your very own Devo Avo, into the 21st century with
- Update to Ruby 3.1.2 & 3.2.2
- Support for Arm64 Darwin
- Support for Aarch64 Linux
- Support for x86 and x64 windows
What happened?
- pact-ruby-standlaone 2.0.0 was released
- Issues identified by users / maintainers
- Requirement to install
libyaml-devfor debian based users
- Requirement to install
- Error when writing pact files for
pact-go-v1where users are asked to pin the version of the standalone, but provided a script which returns the latest.
Root cause?
- An error in
pact_mock-servicewas reproducible in CI, when using Ruby3.2.2- Downgrading to Ruby
3.1.2resolved the issue.
- Downgrading to Ruby
What are we doing about it?
- Set
pact-ruby-standalone2.0.0release topre-releaserather thanlatestto avoid breaking existing users scripts - Updated
pact-ruby-standaloneinstall.shscript to allow users to fix to particular tag when downloading, over its previous behaviour of usinglatest - Updating all ruby gems to be tested from
2.7through to3.2in CI across- macOS / windows / linux
- x86_64 versions
- macOS / linux
- arm64 versions
- macOS / windows / linux
- Identifying the root cause of the error above, stopping us moving to
3.2and looking to help resolve - Releasing pact-ruby-standalone with ruby
3.1.2 - Releasing
homebrew-pact-ruby-standalonewith versioned revisions so you can switch between or pin in your CI
But aren't we moving to the rust core?
Yes! But we understand not all languages are there right now, and we don't have 100% feature parity in the pact-ruby-standalone package compared to the Rust reference core. There is actually very little, with potentially the only limitation being the pact_broker-client functionality.
Happy to be shown otherwise! If anyone is interested in build out CLI tools in Rust, we have some examples you can follow, if anyone wanted to make a Rust based implementation of the pact_broker-client. Whilst we know it has value, the core maintainers are busy delivering other features, and fixes to users, and therefore it isn't something we are likely to pick up soon, but we are always happy to guide.
Related issues
Repositories affected and associated PR's
- Pact Broker Client
- Pact Provider Verifier
- Pact Support
- Pact Message Ruby
- Pact Mock Service
- Pact Ruby
- Pact Ruby Standalone
- Pact Ruby Stadalone
- Ruby 3.1
- Ruby 3.2 Feat/ruby3 2 2 plus arm64 pact-standalone#100
- Homebrew Pact Ruby Standalone
- Pact-Js-Core
- Pact-Python
- Pact-PHP
- Pact-Net 3.x
- Pact-Go 1.x
- Pact Ruby Stadalone
Dependency chain releasing instructions
Note Some of these are out of date, or don't have release note pages, so will be captured for snagging
Ruby Goldberg Machine
graph TD;
pact-support;
pact-support-->pact-mock_service;
pact-support-->pact-message;
pact-mock_service-->pact-message;
pact-message-->pact-provider-verifier;
pact-->pact-provider-verifier;
pact_broker-client;
pact-->pact-ruby-standalone;
pact-mock_service-->pact-ruby-standalone;
pact-support-->pact-ruby-standalone;
pact-provider-verifier-->pact-ruby-standalone;
pact_broker-client-->pact-ruby-standalone;
pact-message-->pact-ruby-standalone;
pact-->pact-ruby-cli;
pact-ruby-standalone-->homebrew-pact-ruby-standalone;
pact-ruby-standalone-->pact-python;
pact-ruby-standalone-->pact-php;
pact-ruby-standalone-->pact-node-->pact-js-v9;
pact-ruby-standalone-->pact-js-core-->pact-js-v10
pact-js-v9-->jest-pact;
pact-js-v9-->mocha-pact;
pact-js-v9-->nestjs-pact;
pact-js-v10-->jest-pact;
pact-js-v10-->nestjs-pact;
pact-ruby-standalone-->pact-go-v1;
pact-ruby-standalone-->pact-net;
pact-ruby-standalone-->pact-consumer-swift;
Ruby Standalone Consumers Goldberg Machine
graph TD;
pact-->pact-ruby-standalone;
pact-mock_service-->pact-ruby-standalone;
pact-support-->pact-ruby-standalone;
pact-provider-verifier-->pact-ruby-standalone;
pact_broker-client-->pact-ruby-standalone;
pact-message-->pact-ruby-standalone;
pact-ruby-standalone-->homebrew-pact-ruby-standalone;
pact-ruby-standalone-->pact-python;
pact-ruby-standalone-->pact-php;
pact-ruby-standalone-->pact-node-->pact-js-v9;
pact-ruby-standalone-->pact-js-core-->pact-js-v10
pact-js-v9-->jest-pact;
pact-js-v9-->mocha-pact;
pact-js-v9-->nestjs-pact;
pact-js-v10-->jest-pact;
pact-js-v10-->nestjs-pact;
pact-ruby-standalone-->pact-go-v1;
pact-ruby-standalone-->pact-net;
pact-ruby-standalone-->pact-consumer-swift;
Rust Goldberg machine
graph TD;
pact_cli;
pact_models-->pact_cli;
pact_matching-->pact_cli;
pact_consumer;
pact_models-->pact_consumer;
pact_matching-->pact_consumer;
pact_mock_server-->pact_consumer;
pact_ffi;
pact_matching-->pact_ffi;
pact_models-->pact_ffi;
pact_mock_server-->pact_ffi;
pact_verifier-->pact_ffi;
pact_matching;
pact_models-->pact_matching;
pact_mock_server;
pact_matching-->pact_mock_server;
pact_models-->pact_mock_server;
pact_mock_server_cli;
pact_matching-->pact_mock_server_cli;
pact_models-->pact_mock_server_cli;
pact_mock_server-->pact_mock_server_cli;
pact_models;
pact_verifier;
pact_matching-->pact_verifier;
pact_models-->pact_verifier;
pact-plugin-driver-->pact_verifier;
pact_verifier_cli;
pact_models-->pact_verifier_cli;
pact_verifier-->pact_verifier_cli;
pact_wasm;
pact_models-->pact_wasm;
pact-plugin-driver;
pact_models-->pact-plugin-driver;
pact_ffi-->pact-js-core-->pact-js-v10;
pact-js-v10-->jest-pact;
pact_ffi-->pact-net-v4;
pact_ffi-->pact-go-v2;
pact_ffi-->pact-swift-->pact-swift-examples;
pact_ffi-->pact-dart;
pact_ffi-->pact-cplusplus;
pact_mock_server-->pact_elixir;
Rust FFI Consumers Goldberg machine
graph TD;
pact_ffi;
pact_ffi-->pact-js-core-->pact-js-v10;
pact-js-v10-->jest-pact;
pact_ffi-->pact-net-v4;
pact_ffi-->pact-go-v2;
pact_ffi-->pact-swift-->pact-swift-examples;
pact_ffi-->pact-dart;
pact_ffi-->pact-cplusplus;
Java Goldberg machine
graph TD;
pact_jvm;
pact_jvm-->pact4s;
Pact Ruby Standalone Consumers
Versions
Tested using
- traveling ruby release https://github.com/YOU54F/traveling-ruby/releases/tag/rel-20230504
- with Ruby 3.1.2
- pact-ruby-standalone release https://github.com/YOU54F/pact-ruby-standalone/releases/tag/v2.2.1
- with Ruby 3.1.4
Test runs
- homebrew-pact-ruby-standalone
- x86_64
- arm64
- pact-python
- pact-node
- pact-js-core
- pact-php
- pact-go-v1
- pact-net
- x86_64
- arm64
- pact-consumer-swift
- x86_64
- arm64
- example-consumer-golang