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

Identify key Pact core assets - Update to Ruby 3.1 - Document Pact Universe #10

Closed
YOU54F opened this issue May 11, 2023 · 2 comments
Closed

Comments

@YOU54F
Copy link
Member

YOU54F commented May 11, 2023

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-dev for debian based users
  • Error when writing pact files for pact-go-v1 where 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-service was reproducible in CI, when using Ruby 3.2.2
    • Downgrading to Ruby 3.1.2 resolved the issue.

What are we doing about it?

  • Set pact-ruby-standalone 2.0.0 release to pre-release rather than latest to avoid breaking existing users scripts
  • Updated pact-ruby-standalone install.sh script to allow users to fix to particular tag when downloading, over its previous behaviour of using latest
  • Updating all ruby gems to be tested from 2.7 through to 3.2 in CI across
    • macOS / windows / linux
      • x86_64 versions
    • macOS / linux
      • arm64 versions
  • Identifying the root cause of the error above, stopping us moving to 3.2 and looking to help resolve
  • Releasing pact-ruby-standalone with ruby 3.1.2
  • Releasing homebrew-pact-ruby-standalone with 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

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;
Loading

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;
Loading

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;
Loading

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;
Loading

Java Goldberg machine

graph TD;
    pact_jvm;
    pact_jvm-->pact4s;
Loading

Pact Ruby Standalone Consumers

Versions

Tested using

Test runs

@TimothyJones
Copy link
Contributor

AMAZING work, @YOU54F!

@YOU54F
Copy link
Member Author

YOU54F commented Aug 3, 2023

So the big update is complete and working well.

The pact ecosystem is documented here

https://docs.pact.io/diagrams/ecosystem

I need to provide some more links to the ruby libraries on the website at some point.

Thanks for the kind words Tim :)

@YOU54F YOU54F closed this as completed Feb 8, 2024
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

No branches or pull requests

2 participants