Giter VIP home page Giter VIP logo

roadmap's Introduction

Developer Relations @ Pact

Evangelism / Enablement / Advocacy / Community

Good communities are places where people ❀️ to be.

We are committed to making our Pact community, the go to place for all things contract-testing but also for people to get to know each, connect, meet, share experiences and become life-long friends.

As a Developer Advocate / Community Shepherd, I know that pact foundation has huge amount of GitHub repositories and maintainers hold a huge amount of weight on our shoulders, to ensure that people can use Pact day-in day-out to protect their deployments. It's a hard job to keep track of.

Let me make the Pact landscape a little easier to navigate

Links

Project Resources
Pact Broker Github / Github Actions / Docker
Pact CLI Github / Docker
Pact Ruby Standalone Releases / E2E example
Pact JS Github / Message docs
Roadmap Canny
Docs Homepage

Get involved!

The Pact ecosystem is vast, I will be sharing some posts over the upcoming months, showing the size of the estate, and looking to gain insight from you, the community, as to how we can reduce the signal-to-noise and help reduce the cognitive load required to navigate the path the Pact Nirvana in your own organisation.

There are a multitude of ways, and you don't need to be a code wizard to start:

πŸ«‚ Maintainer Sessions

We catch once every two weeks.

  • 10am-10:45am UTC (11am GMT / 8pm AEST)

You can download a calender invite from this repository, see Pact Community Meeting.ics

A google document holds our agenda which is openly editable and where anyone can table ideas for discussion.

πŸ“™ Docs

Our documentation is the primary way to communicate to our users, you can help out with small changes like a typo, help rewrite larger pieces, or add new content. Think of it as a open source contract testing wiki, and you are all the curators.

πŸš€ Code

We have implementations across multiple languages, and not all of them are at feature parity. Sometimes you might need that feature, or you've found a bug. Every pact-foundation repository is open-source, and contains a contributing guide to help you get started. Maybe you are building your own Pact tooling, let us know, we would love to shout about it.

Roadmap / Feature Requests

The Pact roadmap is available on Canny, where you can see some of the teams current and upcoming priorities in the OSS space. You can request new features, or browse the list and vote/comment on ones you would love to see. See one that particularly resonates? You could help work on it, reach out via Slack and we can help guide you through your contribution.

Recipes

The community use our tools in a variety of different ways, and solve various challenges that others could benefit. Got something to share? Why not add a new recipe to the site?

Workshops

We created a number of workshops, across several languages. Is there a language implementation not covered in the workshop? Maybe you've created or seen some amazing workshops out there in the wild? Add it to the list, or if you are the author, you can discuss bringing your workshop under the Pact-foundation, if you feel all Pact users could benefit

Blogs, Videos & Articles

Articles about contract testing are appearing left, right and centre, I can't keep up. Make sure our reading list doesn't get dry, by adding your favourite content to the list

Events

Meetups, in person, it feels like a distant memory, but as the doors start opening again, and dinner is provided, people are beginning to flock outdoors. Have you got a meetup or event planned? Already had one and recorded it? You can add them to the list, and let us and the community know about it on Slack.

Helping those in the community

We know many of you in the community love sharing your contract testing knowledge with others, you can see the various places our users land for help, sometimes in GitHub issues, Stack overflow, or Slack. You are welcome to help them out whether you are new to Pact, or a seasoned pro, all questions, opinions and thoughts are welcome.

Pact champions

Are you like our co-founder Beth Skurrie, who decided that Pact idea was the best thing since sliced bread, and she hasn't stopped yacking on about it since. Want to share your knowledge, and build your social profile in the world of tech with a global platform? Please get in touch, we want to support the amazing work you do!

Technical Info

This section contains technical information about the pact source code and builds. Go to pact.io for user documentation

Dependency Graph of Doom

To minimise the amount of code maintenance, many pact implementations depend on some shared libraries. When the shared libraries are updated, it is important to update the packages that use them.

This graph shows the dependency relationships to assist in updating the libraries.

See the Dependency Graph of Doom

Measurement

We want to track our GitHub repo usage, health, and cross-correlate with Slack, so we can reach the right people quicker, and ultimately save leaving you hanging.

I'd also love to build some tooling myself, but why reinvent the wheel, there is already plenty of stuff to do in Pact land!

So why Orbit? I'll let them explain in their own words

image

External pact repositories

The fact that Pact works across so many different languages these day is due to the contribution of many different people and companies. To acknowledge the support that many companies have made to Pact's open source code, some repositories still live under the github organisation of their original author. They are listed below.

roadmap's People

Contributors

bethesque avatar jp-ellis avatar mboudreau avatar mefellows avatar timothyjones avatar you54f avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

roadmap's Issues

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

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

Support messages without knowing who the provider is

Knowing who created an event in an event-driven system introduces a coupling that event driven systems aims to remove in the first place.
It would be ideal for consumers of an event to simply specify during a release, that there must be one or more providers that publish a particular event type.
The can-i-deploy check would then ask a question like this:
"Is there a provider in that produces compatible with schema ?"

https://pact.canny.io/admin/board/feature-requests/p/support-messages-without-knowing-who-the-provider-is

Video Conferencing Tooling

What video conferencing tools are users comfortable with, for open-source related projects.

Would users prefer to use OSS/FOSS tools, and have a strong preference to lean towards either one.

Which tools would you suggest?

Also what are peoples preferences for video communication

  • webinar style
  • group style

For personal meetings, I've always just grabbed a google meet, but I can imagine there will be restrictions for larger groups, and there may be concerns on AI, collecting data.

There are other options available to maintainers, through their employers, Zoom for example.

Both google meet/zoom are not OSS, and therefore may not be suitable for some members who simply won't use those platforms.

Just want to gauge interest. Do people care? I've often had to sign up to new platforms to watch a single event and then never used it again.

Webhook: Trigger job per tag

If a consumer has published a new contract and there are several tags connected to them, it should be possible to trigger a webhook per tag.
We currently do the tag matching via the branch names of consumer / provider and the publication triggers a jenkins build. When there are several tags associated with the consumer, the URL to the jenkins job will currently not match becaus of the comma separated list ${pactbroker.consumerVersionTags}.

It would be great if it was possible to execute the webhook per tag.

https://pact.canny.io/admin/board/feature-requests/p/webhook-trigger-job-per-tag

Pactober Workshop 2 - Pact workshop (Message Pact)

Pactober Workshop 2 - Pact workshop (Message Pact)

Event Details

Item Description
πŸ“… Date 11th October
πŸ• Time 15:00 BST / 10:00 EDT / 00:00 AEST
πŸ“Ή Webinar link https://smartbear.zoom.us/j/92661543192
YouTube Link https://www.youtube.com/watch?v=81N25-4x27E

Background

Aims

Introduce users to the evolution of Microservices, and event based systems, and how this is handled by Pact.

Provide a workshop which builds on the previous CI/CD example but shows a messaging consumer and provider, to highlight the differences

Agenda

  • Introduce users to the concepts of Message Pact introduced in Pact Spec v3
  • Discuss some of the limitations of the current approach
    • V3 named diff providers
    • V4 spec introduces async/sync messages
    • V4 spec allows http / message interactions to exist in the same pact
    • Only checks message contents, not transports.
  • Run a CI/CD workshop, showing users how to reach Pact Nirvana with Message Pact

Import/Export/Edit webhook in JSON

Would be good to update existing webhooks in json format instead of via the form as sometimes its easier to copy paste settings via json.

As an aside, the form has a basic auth setting with autocomplete="new-password" parameters set on the input, which will automatically enter my username/password in the form when editing even though i dont have or want one for the webhook. It means every time i need to update the webhook i have to clear the username and password too.

https://pact.canny.io/admin/board/feature-requests/p/importexportedit-webhook-in-json

Pactober Workshop 1 - Pact workshop (HTTP Pact)

Pactober Workshop 1 - Pact workshop (HTTP Pact)

Event Details

Item Description
πŸ“… Date 3rd October
πŸ• Time 15:00 BST / 10:00 EDT / 00:00 AEST
πŸ“Ή Video Recording https://www.youtube.com/watch?v=Gx-R2Cn1HZE
Course https://docs.pact.io/university/introduction/00_1_Intro
Repo https://github.com/pact-foundation/pact-workshop-js

Background

Aims

Warmup for the start of Pactober, introducing users to the core concept of contract testing, and Pact.

Provide a workshop where we take users through the recommended Pact setup.

Agenda

  • Introduce users to contract testing and pact
  • Run the workshop, showing users how to implement contract testing with HTTP Pact using NodeJS as a guide

RFC Process

Summary

Introduce a process to request for comments (RFC) for changes which will impact Pact as a whole.

Motivation

The Pact Foundation has always wanted to be transparent in the way new features are added to Pact, and while most of the information can be discovered (whether it be from some issue thread, Slack discussion or otherwise), the information may not always be as discoverable as desired.

By formalising a RFC process and storing the discussion in a centralised location, we hope to make the process much more discoverable.

Suggestion

In my experience, the Rust RFC process is excellent, albeit perhaps too rigorous for Pact's needs. I would suggest adopting a similar approach for Pact, with some adjustments made to be more lightweight.

Scopes

The Pact ecosystem is split across a number of languages, and therefore part of the initial discussion will be deciding what should go within the scope of the RFCs.

Publish images to GitHub Container Registry

Pactober Workshop 3 - CI/CD workshop (Plugin Pact)

Pactober Workshop 3 - CI/CD workshop (Plugin Pact)

Event Details

Item Description
πŸ“… Date 17th October
πŸ• Time 15:00 BST / 10:00 EDT / 00:00 AEST
πŸ“Ή Webinar link https://smartbear.zoom.us/j/94793760632
YouTube Link https://www.youtube.com/watch?v=0FpzPRSf2VA

Aims

Introduce the concepts of multi-protocol systems, and how the pact-plugin framework was developed to enable users to extend Pact to cover use cases that may not be applicable to all end users.

Provide a workshop which builds on the previous CI/CD example but shows a gRPC consumer and provider, to highlight the differences

Agenda

  • Introduce users to the concepts of the Pact Plugin framework introduced in Pact Spec v4
  • Discuss some of the benefits/limitations of the pact-plugin approach
  • Run a CI/CD workshop, showing users how to reach Pact Nirvana with Plugin Pacts (probably gRPC area calculator)

Allow the interaction for a particular provider state to be selected where multiple responses are found

If a pact has "a request for an order" given "an order exists" and, "a request for an order", given "an order does not exist", the first successful response will always be returned, meaning that you can't use the stub server to test error flows. The stub server could provide an endpoint to allow the response to the next request to be pre-selected by the provider state name.

https://pact.canny.io/admin/board/feature-requests/p/allow-the-interaction-for-a-particular-provider-state-to-be-selected-where-multi

Create pact-net e2e example that runs on appveyor (or similar) to help diagnose issues

Most of the pact developers don't not have or use windows, so their ability to troubleshoot is hampered. If we had an end to end pact net example that could run on a Windows cloud CI, that would help us diagnose issues more easily.

For reference: https://github.com/pact-foundation/pact-ruby-standalone-e2e-example

We would want it to generate a pact, publish it to test.pact.dius.com.au, and run the verification step, publishing results back to the broker.

https://pact.canny.io/admin/board/feature-requests/p/create-pact-net-e2e-example-that-runs-on-appveyor-or-similar-to-help-diagnose-is

Support a global configuration file

Currently, each project must specify both the Pact Broker (or Pactflow) host and any credentials to publish or retrieve pacts.
It would be nice to have a utility (similar to aws configure or travis init) that creates a global config file (e.g. ~/.pact/config) where this data can be stored once and is understood by all of our CLI tools and test frameworks.
This isn't as much of a problem for CI/automation, but it is particularly acute for setting up developers in large scale teams.

https://pact.canny.io/admin/board/feature-requests/p/support-a-global-configuration-file

Support feature branch matching for webhook triggered builds

If a consumer and provider use matching feature branches to add new features, the webhook could be configured to trigger the matching branch of the provider build, if there was a matching branch known about in the broker. This would mean there wouldn't have to be an intermediate build in the CI to trigger the build with the right branch.

"request": {
    "body": {
      "branch": "${pactbroker.matchingFeatureBranchOrMainDevelopmentBranch}",
      "commit": "HEAD",
      "message": "Build all the things! :rocket:",
      "env": {
        "PACT_URL": "${pactbroker.pactUrl}"
      }
    },
    "method": "POST",
    "url": "https://api.buildkite.com/v2/organizations/<ORG>/pipelines/<PIPELINE>/builds"
  }

https://pact.canny.io/admin/board/feature-requests/p/support-feature-branch-matching-for-webhook-triggered-builds

Slack

Hey team!

The community Slack linked to from the docs only allows user registrations for emails under the domains dius.com.au, smartbear.com and ae.com:
image

Is this a mistake or have you restricted it for a reason? Is there another way to connect with the community?

Access to internal test context information within a provider or consumer test

I'd like to be able to access test results information, especially in the Provider tests during a Junit4 test run.
Currently it seems as though there's no way to see the results of the tests in a Provider test outside of via the result reporter files.
I see that there is a context associated with the provider test, but it doesn't seem to be used. And there's also a callback collection that contains the results during the test execution. However, it appears to be private to the base class and there are no public/protected methods to access this information. Would it be possible to open up this information in a future release of the JVM libraries?

https://pact.canny.io/admin/board/feature-requests/p/access-to-internal-test-context-information-within-a-provider-or-consumer-test

Pact - 5 minute getting started guide in each language

Update https://docs.pact.io/5-minute-getting-started-guide

Skip SSL verification per webook

Currently in order to skip SSL verification for a webhook one must turn it off globally using the PACT_BROKER_DISABLE_SSL_VERIFICATION environment variable.
This is to request an option added in the webhook config to turn off SSL verification just for the webhook.
A use case for this is when there is a URL mismatch in certificate validation. (eg using a VPC endpoint to connect to the destination and the URLs are not matching)

https://pact.canny.io/admin/board/feature-requests/p/skip-ssl-verification-per-webook

Pact Language Implementations - Ensure sustainable CI process

  • Document all language implementations to cover, and add to list
  • Vulnerability scans
  • Dependency updates
  • ensure tests exist
  • ensure tests are isolated and do not depend on external setup
  • ensure CI build process
  • ensure CI test process
  • ensure CI release process
  • enable CI canary release process
  • enable scheduled build triggers
  • build external getting-started repo
  • trigger example repositories on CI releases

Pactober Workshops

Placeholder for workshop content.

Happy to incorporate feedback, or for suggesting of content topics etc.

Pactober Workshop 1 - CI/CD workshop (HTTP Pact)

Aims

Warmup for the start of Pactober, introducing users to the core concept of contract testing, and Pact.

Provide a workshop where we take users through the recommended Pact setup.

Agenda

  • Introduce users to contract testing and pact
  • Run a CI/CD workshop, showing users how to reach Pact Nirvana with HTTP Pact

Pactober Workshop 2 - CI/CD workshop (Message Pact)

Aims

Introduce users to the evolution of Microservices, and event based systems, and how this is handled by Pact.

Provide a workshop which builds on the previous CI/CD example but shows a messaging consumer and provider, to highlight the differences

Agenda

  • Introduce users to the concepts of Message Pact introduced in Pact Spec v3
  • Discuss some of the limitations of the current approach
    • V3 named diff providers
    • V4 spec introduces async/sync messages
    • V4 spec allows http / message interactions to exist in the same pact
    • Only checks message contents, not transports.
  • Run a CI/CD workshop, showing users how to reach Pact Nirvana with Message Pact

Pactober Workshop 3 - CI/CD workshop (Plugin Pact)

Aims

Introduce the concepts of multi-protocol systems, and how the pact-plugin framework was developed to enable users to extend Pact to cover use cases that may not be applicable to all end users.

Provide a workshop which builds on the previous CI/CD example but shows a gRPC consumer and provider, to highlight the differences

Agenda

  • Introduce users to the concepts of the Pact Plugin framework introduced in Pact Spec v4
  • Discuss some of the benefits/limitations of the pact-plugin approach
  • Run a CI/CD workshop, showing users how to reach Pact Nirvana with Plugin Pacts (probably gRPC area calculator)

Pactober Workshop 4 - Maintainer/contributor workshop How Pact is built

Aims

Introduce interested users into how Pact is built, distributed and used by client languages, by using our previous workshop examples as use cases.

This would be more aimed at maintainer/contributors, or those interested in the internals of Pact. This could be useful for users in languages who are unfamiliar with Rust (which our Pact reference core is written in)

Agenda

  • Introduce users to the Pact reference core and the FFI approach
  • Discuss some of the benefits/limitations of the new approach compared to the Pact ruby implementation.
  • Run a workshop showing how to the FFI is leveraged in our 3 tests used in the CI/CD workshop
    • HTTP Pact
    • Message Pact
    • Plugin Pact

Support separate "commit" field when publishing pacts and verification results

For the webhooks to be able to trigger builds for the right commit of a project, it needs the commit. Not every project uses the pure commit field as the version number when publishing a pact or verification. Supporting two separate fields will allow users to use their own version number format, while allowing builds to be triggered without having to reverse engineer the commit from the version number.

https://pact.canny.io/admin/board/feature-requests/p/support-separate-commit-field-when-publishing-pacts-and-verification-results

Alpine/Musl with Pact Rust based core, in Pact client libraries

Status

Rust Libraries

library alpine support version
pact_ffi βœ… - x86_64 .a from 0.2.4
- aarch64 .a from 0.4.15
- .so from 0.4.17
pact_mock_server_cli βœ… - 1.0.5
pact_verifier_cli βœ… - 1.1.1
pact-stub-server βœ… - 0.6.0
pact-plugin-cli βœ… - 0.1.2
pact-protobuf-plugin βœ… - 0.3.15
pact-csv-plugin βœ… - 0.0.6

Note:- With exception to the pact_ffi library, the other libraries are provided as executables, statically linked to musl libc, which means they should work on all Linux distributions, both musl based (Alpine, Void, Chimera etc) & glibc based (Debian, RHEL etc)

Client Libraries

library alpine support version
pact-js βœ… PR 13.1.0
pact-php βœ… PR 10.0.0-beta1
pact-net βœ… PR
pact-go 🚫

Background

Many teams choose to run builds on Alpine Linux due to its tiny footprint, and smaller security surface area.

Guidance for Alpine users, has been stored on our docs site here

For Pact implementations that use the Ruby shared core

Support is available by installing glibc compatibility layers due the underlying runtime being built on centos7

https://github.com/pact-foundation/pact-ruby-standalone/wiki/Using-the-pact-ruby-standalone-with-Alpine-Linux-Docker

For Pact implementations that use the Rust shared core

Alpine or other musl based distros have not be supported due to

  1. Lack of musl based artifacts from pact-rust based projects
  2. Potential issues requiring the project to possibly be rebuilt against specific versions of Alpine / musl.

Point 1 is now addressed, partially for the FFI library.

Pact-Reference is now publishing musl based versions of the Pact-FFI as of 0.4.15

We would like to investigate creating musl variants of all the pact-reference (rust) based artifacts, and incorporating them into client libraries

Support Level

Any of the musl based artifacts should be considered somewhat experimental and you may encounter issues, as they have not been used for a long time. I would strongly advise these are not used in production workflows, unless you are handy and don't mind investigating issues yourself

We would gratefully ask that if issues are raised, that two things are provided

  1. A minimal reproducible example of a Docker image/file based on Alpine that recreates the issue
  2. A minimal reproducible example of a Docker image/file based on Debian that recreates the issue

Note - The debian image, may not show the same behaviour, this will be useful to determine where there are bugs/issues or gaps in the musl implementation which can be communicated to others.

How to participate?

Drop a comment in this thread, or reach out via slack in #libpact_ffi-users

FFI

Investigate the possibility of incorporating into client libraries

Pact-Js-Core

Snags

  1. pact ruby standalone arm64 fail under qemu in GHA which fails test suite
  2. some inconsistent behaviour in node 16 (set /tmp cache) / 18 ( max sockets 1)
  3. prebuilds take a good while, but these could be limited to only running when the ffi, or native bindings are updated, or failing that just run on pull requests. regular test runs could just grab the latest pre build

Pact-JS

  • Pact-JS

Pact-PHP

Snags

  1. PHP can only load .so files, so requires converted .a musl library
  2. AMD64 musl images require shared-mime-info installing for consistent content type matching, ARM64 doesn't. If installed, they flip behaviour.
  3. Needs musl detection method in downloader/

Pact-Go

  • Pact-Go
    • Support for musl - delta
    • CI Test runs

Snags

  1. Some seg fauls, also occur on vanilla x86_64 build although not consistently reproducible.

Pact-Net

Snags

  1. .NET can only load .so files, so requires converted .a musl library
  2. ARM64 musl on GHA fails to build project, but passes on Cirrus
  3. Needs musl detection method in csproj file

add others

Mock Server CLI

Provider Verifier CLI

Stub Server CLI

Plugins

pact plugin cli

  • fork release
  • issue building existing x86_64 linux executable in CI (build with cross to retain known glibc version)
  • pact plugin driver rust
  • pact plugin driver jvm
  • support downloading non musl variants if not avail, via pact-plugin-cli (rust and jvm driver)

Pact-Protobuf-Plugin

Pact-csv-Plugin

Pact-matt plugin

Build with goreleaser and linked with musl, so existing binaries work with alpine.

  • support downloading non musl variants if not avail, via pact-plugin-cli (rust and jvm driver)

Client language FFI bindings that only support dynamic *.so libaries

For some languages, it is not possible to load a *.a static library.

  • PHP
  • Ruby
  • Others?

It is possible however to convert a .a file to a .so file.

ar -x libpact_ffi.a
gcc -shared *.o -o libpact_ffi.so
rm -f *.o

This shrinks our .a file from 115mb to a circa 41mb .so file, which looks inline with the size of the musl node prebuild for pact-js

Should pacticipant names be case insensitve?

It would be awesome if either:

  1. Pacticipant names were case insensitve
    or
  2. The broker warned when publishing or retrieving a pact if the pacticipant name differs only in case from another
    This was indirectly suggested by Subrahmanyam Rentala on slack:
    At the consumer side I provided the provider name as : ABc and at the provider side it was ABC, and again error was not user friendly to investigate

https://pact.canny.io/admin/board/feature-requests/p/should-pacticipant-names-be-case-insensitve

update maintainer sessions

Need to update cal invite to the following

Talked about β€˜the other meeting’ currently scheduled for 07:00 AEDT/22:00 UK.
The times are not great for either time zone and currently the community members attend this UK timezone meeting. We agreed to try running bi-weekly in the UK timezone for now. Next community meeting will be on 01 May at the new time of 11:00 UK/20:00 AEDT

  • Single event, every two weeks
  • BST 11AM
  • AEDT 8PM

https://github.com/pact-foundation/devrel?tab=readme-ov-file#-maintainer-sessions

  • Update README
  • Update Cal invite

Pactober Workshop 4 - Maintainer/contributor workshop How Pact is built

Pactober Workshop 4 - Maintainer/contributor workshop How Pact is built

Event Details

Item Description
πŸ“… Date 24th October
πŸ• Time 15:00 BST / 10:00 EDT / 00:00 AEST
πŸ“Ή Webinar link https://smartbear.zoom.us/j/92261666792
YouTube Link https://www.youtube.com/watch?v=QIza-D-f7DI

Aims

Introduce interested users into how Pact is built, distributed and used by client languages, by using our previous workshop examples as use cases.

This would be more aimed at maintainer/contributors, or those interested in the internals of Pact. This could be useful for users in languages who are unfamiliar with Rust (which our Pact reference core is written in)

Agenda

  • Introduce users to the Pact reference core and the FFI approach
  • Discuss some of the benefits/limitations of the new approach compared to the Pact ruby implementation.
  • Run a workshop showing how to the FFI is leveraged in our 3 tests used in the CI/CD workshop
    • HTTP Pact
    • Message Pact
    • Plugin Pact

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.