Skip to main content

28 posts tagged with "oss"

View All Tags

· 4 min read

Pact Almanac 2023

Grab your hoverboard, and get prepared for another trip back to the future, with our round up of this years Pactivities in our seasonal Pact Almanac.

image

We had a raft of code features, patches, fixes and new projects added to the Pact-Foundation over the year. If you haven't read our monthly blog posts, you can read a round-up of the most significant changes from each month in there. Check out the side-bar to the left to view the older posts.

I've mainly focused on video content this time round, where you can find multiple advocates of Pact, spreading the word of not just how to do contract testing, but the why. I hope you'll enjoy them, be sure to like and comment on the videos, whether it's to show your appreciation or you just fancy a debate.

Oh, and if you are the debating type, why not join us in a fireside chat next year?

Anyhow, let see what each month has in store for us.

January

Kicking off the year, we introduce a blog post from eBay titled API Evolution Is a Challenge. Could Contract Testing Be the Solution? You can read it here

Feb

Diego Herrera introduced spoke at at EdinburghJS with a talk titled Testing services with Pact. Watch it here

Mar

Holly Cummins discusses how contract tests combine the lightness of unit tests with the confidence of integration tests, and should be part of your development toolkit. Watch it here

Apr

Lewis Prescott caught up with Janet Gregory and Lisa Crispin (Authors of the famed Agile Testing book), where they talk about how to use holistic testing with microservices and contract testing. You can watch it here.

May

In this k6 Office Hours episode, Developer Advocates Marie Cruz (long time Pact friend) and Paul Balogh discuss what contract testing is, if schema testing is the same as contract testing, and how to do schema validation testing using Grafana k6. Check it out here

June

gRPC and Protobufs are increasing in popularity, however, there are multiple classes of problems that may result in API breaking changes. In this video, we show how you can apply contract testing to gRPC and Protobufs systems using Pact and its Plugin framework. Watch Matt, show a quick demo of it in action here

July

Dave Farley from Contiunuus Delivery explains why Contract Testing For Microservices IS A MUST, in his video here

For our Polish speaking friends, you can watch Jakub Małyjasiak from Ocado Technology, talk about How Pact is more than just contracts and tests, here from a local meet up Wrocław.

Aug

DPoint, helped demystify contract testing, in this video here, you can also see it in action with Spring Boot demos for both producers and consumers.

Sept

Ebay explains Consumer-Driven Contract Testing and how could they use it to improve testing their Microservice APIs with Pact? Watch their video where dive into the theory of Contract Testing, the potential benefits of using it, and some practical examples, here

Oct

It was Pact's 10th Birthday, and you can find your map to all the resources that came out of our month long celebration in this blog post.

LambdaTest spoke with Bas Djistrka about Solving the Integration Testing Puzzle with Contract Testing, as part of the Voices of Community series. You can watch it here

Nov

Matt Fellows spoke at Testing Talks Conference in Melbourne, where he provides a comprehensive guide to Pact. Watch it here

Dec

Angelo kicked off December with a tutorial showcasing interoperability with a PHP backend and JavaScript frontend powered by contract testing, watch it here

See you next year folks

Thanks for everyone's efforts in using, promoting, and preaching about Pact to everyone you know, now its our time to repay the favour.

If you've done something great, and want to share it, get it listed - the site is open source and you can edit any page, we want to give you a platform to help amplify your voice!

Maybe there is time to get one last video/blog or PR in before crimbo! No, only joking, that’s a wrap for this year's Pact Open Source Almanac, pop your feet up, enjoy your puds and hope to see your name in the book next year.

· 6 min read

Happy November everyone! I'm sure holidays for most are fast approaching, and as it's the season for giving, we'll be sharing all the updates across the Pact community and giving you a heads-up about our latest webinar where you can see all of SmartBears open source tools in action, including yours truly, Pact.

OSS Updates

  • Pact Compatibility Suite
  • Pact Reference
  • Pact PHP
  • Pact Python
  • Pact Broker Client
  • Pact MSW Adapter

Pact Compatibility Suite

Tien Vo (Pact-PHP), and Josh Ellis (Pact-Python), have both been working on verifying their Pact client implementations against the new Pact Compatibility Suite.

It will help root out inconsistencies in implementations and ensure feature parity. If you are interested in checking it out, or contributing, please jump in. You can retrospectively apply the tests against existing implementations to ascertain their completeness/correctness.

This will be a massive boost to end users, so we would appreciate any help!

Pact Reference

As Tien as been working through the compatibility suite, he has noted some improvements that can be made to the Pact-FFI, which would otherwise has been found sporadically usually through end-user issues.

Pact-PHP

Tien brings more features to the ffi branch of pact-php

Pact Python

Josh implemented the Pact (Consumer) Compatibility Suite (V1) in this PR utilizing the pact_ffi core, great steps in progress towards full specification compatibility, and that juicy V3 and V4 Pact Spec goodness, you Pythonista's have been waiting for.

Pact Broker Client

Two new features arrive in the Pact-Broker Client.

  1. pact-broker publish PACT_DIRS_OR_FILES --auto-detect-version-properties
    1. When publishing Pacts, by setting --auto-detect-version-properties, you can now automatically detect the repository commit, branch and build URL from known CI environment variables or git CLI.
    2. Supports Buildkite, Circle CI, Travis CI, GitHub Actions, Jenkins, Hudson, AppVeyor, GitLab, CodeShip, Bitbucket and Azure DevOps.
    3. --auto-detect-version-properties is aliased to -r to ease of use
    4. The recent feature improvement introduces the detection of the commit and buildUrl, rather than only the branch, greatly simplifying our recommended Pact Nirvana workflows for users
  2. delete-branch
    1. Users now can delete branches from the CLI

Pact MSW Adapter

Mock Service Worker (MSW) has fast been becoming the industry standard API mocking for JavaScript, we heard that cry, and created a project to help you leverage the contract testing goodness of Pact, with the power of MSW.

At the end of October, Artem, MSW's creator announced the launch of MSW v2.0, with a raft of changes to improve the life of end-users and plugin authors.

Not long after, Jakub Riedl from CultureAmp, long time friends of Pact, helped bring our adapter in line with MSW v2.0. You can check out the PR here. This is actually his third contribution to the adapter, which is awesome to see.

Not only that, Joel Whalen has been working on support for GraphQL, in the adapter. Already supported by MSW, this would allow for MSW gql interactions to generate Pact contracts. You can check out his progress here.

I also noted whilst I was npm surfing, a new pact-msw package has been launched, this isn't an officially supported version but it's always great to see people working with Pact in the wild, so it might be worth your time checking it out.

Maintainer Meets

Want to help shape the future of Pact? Why not join us?

We catch up every week with alternating times for the sessions, to aid with syncing with Europe / Austrailian members

  • 9am-9:45am UTC
  • 9pm-9:45pm UTC

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

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

Pact in the wild

Bazel + Pact

We spoke with Olivier Picaud back in July, about the work he was doing with Bazel & Pact, and why it was so important, personally for him.

We have an update

Hello,

I have worked to associate Pact within Bazel by providing rules_pact The good news is that rules_pact has been accepted to be part of the official Bazel Central Registry

Happy to share this contribution with you guys and again thanks to help teams to facilitate their testing journey :)

Voilà :)

Olivier

You can check out the GitHub repo https://github.com/opicaud/rules_pact and a full worked example in https://github.com/opicaud/monorepo

Community Events

Are you hosting a Pact event? Let us know and we can feature it in the blog and list it on our events section.

Show and Tell: Discover the Benefits SmartBear’s Open-Source Tools Bring to the SDLC

On Tuesday Dec 5th 2023 at 10am ET, the SmartBear Dev-Rel team will be showcasing OpenAPI, Swagger, Stoplight, Pact and SoapUI and how they can be used across your SDLC, along with tips, links and pointers on how to get involved with these open-source tools and communities.

You can register here, where if you can't make it, you'll be sent an recording for on-demand viewing.

Dec 5th OSS Webinar

Community Corner

Omer Morad introduces Automock

We spoke to Omer Morad back in June 2022, where he introduced NestJS-Pact into the Pact Foundation fold. We caught up with him this week, to find out what he's been up to.

Welcome Omer, we heard from you around a year ago in one of our community corner updates. I hear you’ve been working on a new open source project, would you like to tell our readers a little about it?

I've been working on Automock, an open-source mocking framework. Much of my time has been spent manually mocking for unit tests in dependency injection environments like NestJS. It may cause test suites to become unmanageably large and convoluted. For this reason, I made Automock. By creating mock objects for class dependencies automatically, it simplifies the unit testing procedure. Compatibility across multiple DI and testing frameworks will make the unit testing process easier by allowing developers to focus on writing test cases rather than manually configuring mock configurations.

Awesome! Thanks for sharing with us, hopefully this Automock is useful to others. You can find Omer in our Pact Slack group where you can talk about all things open source.

Thats a wrap

That’s it for this month. Stay safe and carry on coding!

  • Yousaf Nabi — Developer Advocate at PactFlow and Community Shepherd at Pact.

· 9 min read

👻 Happy Halloween all! This month you can look forward to our round up of all things Pactober that happened this month to celebrate 10 years of Pact and the usual open-source updates from across the Pact ecosystem.

Pactober

Your 🗺️ to the months events.

Pactober Workshops

Want to learn more about Pact, how it works, and how you can get hands-on?

Watch one, or the series of workshops over on our YouTube channel & check out the supporting material

OSS Updates

  • Pact Rust
  • Pact PHP
  • Pact Python
  • Pact Go
  • Pact Mock Service
  • Pact Broker

Pact PHP

Tien Vo showcased the work he has been doing in Pact-PHP during our Pactober birthday bash, you can check it out 📺 here.

However if you just want to jump into the code, Tien has published a new release 10.0.0-alpha3

You can find lots of examples in the ffi branch showcasing the new functionality.

Check out the merged pull requests, for all the latest work to date, and the open pull requests for anything you can help review!

Pact Python

Joshua Ellis said Hello World to the Pact community during our Pactober birthday bash, you can check it out 📺 here.

He has also been super busy in the world of Pact-Python where we've seen a hive of activity.

Josh published his first release, v2.1.0 which is the first to include pre-built wheels published to GitHub.

This release also drops support for Python 3.6 and 3.7, allowing for improvements to the build-system that will keep Pact-Python healthy and maintainable long into the future.

Josh is now working on implementing the FFI feature set, in order to deliver v3 and v4 Pact functionality to the Pact-Python project, which can be tracked in the following issue

If you want to get involved, why not reach out via the GitHub repo, or via #Pact-Python Slack channel.

You'll also notice new issue templates, and labelling across the project, which should hopefully make the triaging process slicker for everyone. Please feel free to try it out and give us feedback, good, bad or ugly!

Pact Go

Stanislav Vodetskyi helped deliver both a fix and an enhancement to Pact-Go

Alex also managed to add a change to our v1 (Ruby-backed) pact-go implementation, which will help him out with running multiple pact verifiers in parallel.

Are you using Pact-Go v2? Fancy lending a hand updating the pact-go workshop, to use pact-go v2?

Let me know, and I'm sure I can dig up some swag!

Pact Mock Service

As our Pact ruby ecosystem progressed onto Ruby 3.x, it allowed Pact-mock_service to be updated to provide compatibility with Rack 3.

This was kindly provided by provided in this PR via Adam Forsyth.

Pact Broker

Ben Brugman made his first PR ever :hooray: - This one upgraded Supercronic, which is a core dependency in our Pact Broker Docker image.

Pact in the wild

Sngular OSS presents PactBuilderDSL for Java users

PactBuilderDSL is a Java library that automates the generation of DSL for bodies in contract definition.

Do you struggle with writing the body validations for contract testing? If you're working with Java... I'm pretty sure you do.

It's pretty common to have huge methods with very similar code to generate them.

This is a need the Sngular team have detected many times not only in the community but also with our clients.

If all this is familiar to you, and you're interested in learning more, watch their talk on 📺 PactBuilderDSL.

Itching to see the code? You can see it in their GitHub repo sngular/pact-annotation-processor and published to the Maven repository.

How we reached Pact Nirvana

Nathan Deamer, long time friend and Pact advocate, works over at GoCity where he looks after a team of incredible engineers.

We remember Barry Irvine's post from February about his adventures with Pact & Android.

Nathan shows us Pact through a wider lense at GoCity, as he shows us how they reached Pact Nirvana. It's a great read and motivating if you are on your own Pact journey yourself.

Check it out here

Community Corner - Jo Laing

If you have tuned in you the Pactober events, you'll probably be bored of my voice, so how about hearing from the lovely Jo Laing, your Pact community manager.

Hello Jo, without further ado, you’ve been getting to know the Pact community this year, how’s it all been going?

I can’t deny on being a little apprehensive having come from managing the Cucumber community group where I am super comfortable and familiar, so it was a relief when I realised this community was actually a very similar space and I even recognised some of the member names from the Cucumber community which has helped me join some dots between Cucumber/BDD and Pact/Contract Testing (win, win). Having the support of the amazing team at Pact has been a big bonus too. I’ve also had to face my fear of GitHub and am happy to say it’s honestly not as bad as I thought 😉

Can you tell us anything about what’s coming up for the Pact community?

We’ve started hosting a weekly maintainers community meeting (Check out the open agenda here) which a few maintainers attend. I’d love to see more attendee’s at those meetings and foster those relationships to build a healthy core maintainer group.

GitHub triage is the next big focus for the group. Pact has many repositories so we need to do some housekeeping and get a process in place for managing those.

Looking forward to 2024, there will also be a focus on improving and sharing the educational material we have around Pact and contract testing to help guide people who are interested/starting out.

I’d also love to host more Fireside Chat type sessions too, as the session we held at Pactober was just getting juicy when we had to call time. Reach out to me if this appeals to you.

We worked together to deliver the Pactober event this month 🙌 what were your highlights from the event?

Oh so many! Jamming with you on the organisation of the event was fun! I really enjoyed the freedom we had to manage the whole event end to end. Meeting the speakers was awesome too, what a lovely bunch of people. I’d like to give a big thanks and shout out to everyone from the community involved who helped deliver the event.

I’m excited to see what we can all collaborate on in the future.

Your role changed this year to Open Source Community Manager at SmartBear and you now have three open source communities to shepherd – how is that shaping up?

Yes, I’ve been set quite a challenge here! Alongside the Cucumber and Pact open source communities, I’ve also been tasked with trying to establish a new community group for another of SmartBear's open source tools, Swagger. Now the Pactober event is mostly wrapped up, I have more time to focus on the planning and setting up of whatever works for this group - so lots of outreach, asking, listening and experimenting with our Swagger users in order to shape up the right community setting. So much to do!

So much to do indeed Jo, thank you for taking the time to share with the readers! Couldn't have done this event without you, and looking forward to helping share some of the support, in your journey with the Swagger community and beyond.

Community Events

Are you hosting a Pact event? Let us know and we can feature it in the blog and list it on our events section.

Thats a wrap

That’s it for this month. Stay safe and carry on coding!

  • Yousaf Nabi — Developer Advocate at PactFlow and Community Shepherd at Pact.

· 11 min read

👋 Hello, it's September, and we are a week away from Pactober - A celebration of 10 years of Pact.

I'll be letting you know what you can look forward to, recapping this month's activities in our repos, and introducing a new starter to PactFlow, who is living the dream - getting to work on open-source - as their job. Feel inspired? Join us! We are always hiring.

Pactober

We've been squirrelling away behind the scenes organising Pactober's main event on the 10th October and we are pleased to announce some of our stellar speakers.

Your links for reference:

Want to attend?

We will be providing links in Slack, but for all the latest updates, be sure to fill out our Pactober registration form

Speakers

Just some of our fantastic line-up that you will hear from over the month.

Sam Newman

J.B Rainsberger

Seb Rose

Bas Dijkstra

Lewis Prescott

Dave Farley

Got something to say?

Love Pact as much as Jameshd?

Why not shout about it, in whatever way suits you and we will be sure to feature it throughout Pactober’s Birthday session.

Ways you can do this

  • Fill out the Pactober registration form
  • Catch up with us in Slack
  • 👋 Send a 30s video wishing Pact a happy birthday, telling us a short story, or a written message to either Matt Fellows, Jo Laing or I (Yousaf) and we'll ❤️ you forever
  • Find us in GitHub, in our DevRel repository

Pactober Builders

During Pactober, we'd love to invite you to help build something on our roadmap, take part in a Bug-Bash or in our Doc-Drive.

Need some inspiration?

We've got plenty of requests on our Canny roadmap, and although many are not planned, you can see from the votes, as to how well received it may be from the community.

Alternatively, we can look at outstanding issues and PR's as they can often serve as a good source of inspiration, or things that can easily be sewn up.

Finally, don't forget to check out more ways you can help, https://docs.pact.io/contributing if any of these take your fancy?

You can find your fellow builders over in the #pactober-builders channel in Slack.

Pactober Workshops

We already have a few Pact HTTP based workshops, in a few languages, listed here.

I'll be hosting four sessions throughout Pactober, walking users through the existing workshop, and running some all new ones in the process.

We will need to build out workshops for Message & Plugin Pact, and also our various existing workshops, could do with some love, to utilise the latest features and versions of not only Pact but the client language itself.

We would love any support in helping work on these, but if not, and you just fancy participating along with others during the workshops, then feel free to join me!

OSS Updates

It has been another busy month in the world of Pact, I've pulled out some changes from the community to showcase in our latest round of Open Source updates.

  • PactFlow's New Starter, and what it means for you
    • Pact Python
  • Pact Rust
  • Pact PHP
  • Pact Plugins
  • Pact Broker
  • Pact Broker Client
  • Pact JS
  • Pact Broker Chart
  • Feature requests
    • Dont Massl the Hoff (Massl based authentication)

PactFlow's New Starter, and what it means for you

We ❤️ open source. We created Pactflow because we wanted to create a sustainable avenue to work on open source projects, and solve big problems that benefit a global developer community. Instead of the train rides, late nights and weekends where most of our contributions previously originated, this would be our day job.

We said that back in 2021. It would be awesome to work on an open-source project, and get paid for it, as part of your job. For me, its a dream come true. We've wanted to share that opportunity with others, especially as Pact grows in popularity, and gaining active maintainers is a challenge for many an open-source project, even those much larger than our own. Just look at Curls contributor graph!

We also are actutely aware that some of our libraries are suffering from bit-rot, languishing whilst each client implementations native language comes out with new features, and additions, that could be utilised, and they are missing core Pact features, implemented in Rust but not delivered in the client library, which causes struggles in documentating a cohesive Pact experience, in your own multi-language/multi-protocol landscapes.

That being said, we are proud to be able to announce a new starter to the PactFlow family, and by default extension, the Pact Family, who will help alleviate some of that burden. Enter Josh.

Joshua Ellis

We've been honoured to have Joshua Ellis enter the team, based in Australia, he will be working closely with Beth, Matt and Ron, and comes with a distinguished history, and open source background.

Joshua Ellis

I have an academic background in theoretical particle physics. I am the developer of the LaTeX package TikZ-Feynman to draw Feynman diagrams, and spent the majority of my PhD creating a Rust library to help solve Boltzmann equations to calculate the evolution of particle number densities during the Big Bang. I also did a one year stint in KPMG’s Data & Cloud team, helping architect and build cloud infrastructure, data pipelines, and helping new recruits get up to speed with DevOps and coding.

I'm a big fan of open source software and collaboration, and love to automate everything and anything; even if it sometimes takes me longer to automate the task than to actually do it 😅 Outside of work, my wife and I love finding good food spots in Melbourne. We have a small rescue dog called Cooper (no idea what breed he is), and if I’m not at my computer, you’ll either find me cooking something (perhaps in my smoker), playing piano or trying to learn the cello, or getting a coffee.

So what will Josh be working on?

Proficient in Python and Rust, we will see him help bring Pact-Python up to modern standards, and implement Pact V4 functionality, in a production ready manner, rather than my hack it to get something working xD.

I have recently onboarded with SmartBear, and my focus to begin with will be the Python code. I'm looking forward to working with you all, and improving the Python code! In particular, I will be building upon the amazing work done in #367 to get pact-python working with the Rust core. As a bit of ground work, I have created two issues above to get my feet wet, before tackling the much larger task of supporting V4 fully.

In any case, please feel free to message me with any ideas, or just to say hi :blobwave:

Josh has been tackling the build system and examples for starters, check out the progress, and even better, why not drop us a review, he would love the feedback, and gives him a chance to connect with you all.

Long live Python, Long live pact, long live Pact-Python!

Love Pact? Want to join the team? Why not give us a shout!

Pact Rust

We were meant to have done some rust stuff, but we've been too busy laughing at this interview with a senior rust developer

But seriously though, what's been happening?

Pact PHP

Tien Vo has been busy again, bringing more features to the ffi branch

The last one could do with some eyes, and we would still love to know if you have tested this out. Please let us know in the #pact-php channel or via GitHub.

Pact Plugins

Rohit G Krishnan has been trying out the Pact plugin framework, and raised a PR to fix a bug. Find it, fork it, fix it. The beauty of open-source! Thanks a bunch!

Pact Broker

Beth introduced a branch endpoint, supporting GET & DELETE in this PR

Expect to see this extend into the Pact Broker client, to let you interrogate the Pact Broker for pacticipants by branch

Pact Broker Client

Utilising the above change, was the Pact Broker client, for provider-contract publishing.

Whilst the above PR, and pactflow command, is for integrating with closed-source tool PactFlow, please be reminded that this can serve as a useful pointer for implementing your own provider driven contract flow, in an open source broker.

Check out an example repo https://github.com/pactflow/pactflow-jsonschema-example and supporting blog post https://pactflow.io/blog/contract-testing-using-json-schemas-and-open-api-part-2/

With a bit of tinkering, you can agument your workflows with https://github.com/pactflow/swagger-mock-validator, itself a fork of Atlassians original

I've been thinking about how we could potentially create an extendable mechanism, whereby users could provide their own provider schemes, for alternate sources, other than OpenAPI, such as AsyncAPI.

If this floats your boat, why not join us, as a Pactober builder, or just give us a shout.

Pact-JS

Mat Dodgson delivered a fix: MessageConsumerPact merge pact file correctly

Pact Broker Chart

Love Kubernetes and Helm?

Chris J Burns & Sherif Ayad have got your back.

Dont Massl the Hoff

A feature request landed for Providing MASSL based auth support

This is to add the support on adding a 'cert' and a 'key', regarding a self-hosted Broker that requires a 'cert' and a 'key'. This will make the availability to call the 'Pact::VerificationTask' adding the 'cert' and 'key' to interact with the Self-Hosted Broker.

As an example: -

--cert /path/to/client/cert.pem --key /path/to/client/key.pem

NB:- - I don't think it will be cli opts, but rather environment variables, to match the existing conventions for using TLS

PR's

Thanks to Lluís Xavier Casals Garcia for raising and Gerald Molina for the PR's

Pact in the wild

Open edX

Open edX is a community-driven, open-source project powering edX.org and thousands of other online education sites around the world.

We couldn't be more proud to see they are using Pact in their projects, and have written a brilliant post for their engineers. You can read it here

It also features Dawoud Sheraz, who we mentioned earlier in the year about his talk at Python Web Conf. The video is referenced in the above post, but you can watch it here

GitLab

GitLab are using Pact and have written some great documentation to support its use in their project.

If you haven't tried about GitLab, why not look at testing it out, you can run the community edition for free, on your local machine, see the existing Pact tests (and run them) for yourself.

Community Events

Are you hosting events about Pact? Why not let us know?

We can't wait for you to get involved, whether you attend one of the sessions throughout the month of Pactober, or you decide to host something yourself. Long live Pact and its awesome community!

Dont forget that throughout October, we will be providing links in Slack, but for all the latest updates, be sure to fill out our Pactober registration form

Thats a wrap

That’s it for this month. Stay safe and carry on coding!

  • Yousaf Nabi — Developer Advocate at PactFlow and Community Shepherd at Pact.

· 7 min read

👋 Hello, its August, hope you've had a great summer so far, and enjoyed a nice well-deserved break.

However if you've been in the office, not worrying about your deployments because you use Pact, huzzah.

Whatever you've been up to, the community has been busy as well, so we've rounded up some of the latest happenings in the world of Pact to sink your teeth into.

OSS Updates

It has been another busy month in the world of Pact, I've pulled out some changes from the changes from community to showcase in our latest round of Open Source updates.

  • Pact Docs
  • Pact Getting started
  • Pact Go
  • Pact Broker
  • Pact Rust
  • Pact JVM
  • Pact Ruby
  • Pact Python
  • Pact PHP
  • Pact Erlang
  • Pact CLI Tooling

Pact Docs

MUnit (Mule4) with Pact Recipe

Are you an MuleSoft user running MUnit? If so, check out the latest recipe on our site, kindly provided by Grace Sandford!

Got something you want to share? Why not drop in a pull request. You can find out ways you can help here

Pact Getting Started

Our Pact getting started guide has been updated to the latest pact-js version, which prepackages the pact ffi runtime, meaning it will be even easier for users with only a current version of node to get up and running.

https://github.com/pact-foundation/pact-5-minute-getting-started-guide

Fancy creating one in your favourite Pact client language? What's stopping you?

Pact-Go

Thanks Boreyuk for picking up this golintci task in the following pull request

A great quality of life improvement for maintainers and contributors of pact-go, and a better user experience, with some of the changes made.

It just goes to show that not all improvements need to be big, and you can drop in and help out maintainers anywhere. If you don't know where to start, just ask!

Pact-Broker

Beth making us all laugh again with this comment whilst she took some time out on cold Aussie Saturday arvo to bust out a beast of a feature, improving performance of the matrix when multiple selectors are specified.

Pact Rust

Beth did Rust!

https://github.com/pact-foundation/pact-reference/pull/312

Looking to improve on the error messages returned in various scenarios during provider verification.

Why not hop into Slack or GitHub and let us know what would be on your wish list, to help you when it goes wrong.

Pact-JVM

  • The maintainer of Kotlin-Logging Osad Shai, dropped in and upgraded his library in Pact-JVM in this PR. It's awesome to see some real-world testing from a package maintainer, I like doing the same when I am fixing up open source projects. The best subjects are the one's already using your libraries. It is also why I get stoked to see public repos showcasing Pact.

  • Victor Enaud spotted a bug in Pact-JVM, applied a fix which ultimately was rejected in favour of another solution, but we are super grateful for both the excellent report, and an attempted solution!

Pact-Ruby

Pact-Python

Checkout a sample of the PactV3 interface, powered by the Pact FFI in the following pull request

You can also find more V3 examples here and a grpc example here

I'm inviting Pythonistas who are itching for that V3 and V4 functionality to collaborate with me on the aforementioned PR to help bring your Python projects up to speed with all the latest pact features.

"""pact test for product service client"""

import logging
import os

import pytest
from pact import PactV3
from pact.ffi.native_mock_server import MockServerStatus
from pact.matchers_v3 import Like, Format
from src.consumer import ProductConsumer

log = logging.getLogger(__name__)
logging.basicConfig(level=logging.INFO)
print(Format().__dict__)

PACT_MOCK_HOST = '127.0.0.1'
PACT_MOCK_PORT = 8888
PACT_DIR = os.path.dirname(os.path.realpath(__file__))


@pytest.fixture
def consumer():
    return ProductConsumer(
        'http://{host}:{port}'
        .format(host=PACT_MOCK_HOST, port=PACT_MOCK_PORT)
    )


@pytest.fixture(scope='session')
def pact(request):
    pact = PactV3(
        'pactflow-example-consumer-python-v3',
        'pactflow-example-provider-python-v3',
        hostname=PACT_MOCK_HOST,
        port=PACT_MOCK_PORT,
        pact_dir="./pacts",
    )

    return pact

def test_get_product(pact: PactV3, consumer):
    expected = {
        'id': "27",
        'name': 'Margharita',
        'type': 'Pizza'
    }

    (pact
     .new_http_interaction('interaction')
     .given('a product with ID 10 exists')
     .upon_receiving('a request to get a product')
     .with_request('GET', '/product/10')
     .will_respond_with(200, body=Like(expected), headers=[{"name": 'content-type', "value": 'application/json'}]))

    with pact:
        pact.start_service()
        user = consumer.get_product('10')
        assert user.name == 'Margharita'
        result = pact.verify()
        assert MockServerStatus(result.return_code) == MockServerStatus.SUCCESS

Pact-PHP

Tien Vo has been working hard in the pact-php ffi branch, introducing an auto-installing plugins feature in this PR.

You can pick this up in the latest alpha from packagist. See the release here

Have you tried this out in your project? Why not let us know in #pact-php in Slack.

Pact-Erlang

Srijan Choudhary announced pact_erlang version 0.2.0 has been released with the new map-based DSL: https://github.com/greyorange-labs/pact_erlang

PactRef = pact:v4(<<"myapp">>, <<"animal_service">>),
AnimalObject = #{<<"name">> => <<"Mary">>, <<"type">> => <<"alligator">>},
{ok, Port} = pact:interaction(PactRef,
#{
    given => <<"an alligator with the name Mary exists">>,
    upon_receiving => <<"a request to GET an animal: Mary">>,
    with_request => #{
        method => <<"GET">>,
        path => <<"/animals/Mary">>
    },
    will_respond_with => #{
        status => 200,
        headers => #{
            <<"Content-Type">> => <<"application/json">>
        },
        body => thoas:encode(AnimalObject)
    }
}),
?assertMatch({ok, AnimalObject}, animal_service_interface:get_animal(Port, "Mary")),
{ok, matched} = pact:verify(PactRef),
pact:write(PactRef, <<"./pacts">>),
pact:cleanup(PactRef).

Pact CLI tooling

Would you want to see all our pact CLI tooling, in a single place?

Is file size a concern to you?

I had a go at a consolidated bundle of our ruby/rust tooling, to aid migration.

Why not take a look at this PR and let us know your thoughts?

What about getting them all in a single file? :O

Hop onto Slack, or drop us a message in GitHub and provide your input!

Community Events

Are you hosting events about Pact? Why not let us know?

DevOps Playground: Get hands-on with Pact, Mule 4 and MUnit (London) - August 31, 2023

The DevOps Playground meetup event is hosting another event showcasing Pact at the end of August.

https://www.meetup.com/devopsplayground/events/295147445/

You can check out the one they performed last year Pact-NET and dotnet.

Youtube: https://www.youtube.com/watch?v=VDigIOV7lzM

How to avoid common pitfalls with modern microservices testing (Boston,MA) - September 14, 2023

Eric Deandrea who has been touring the conference circuit this year, is on fire and hosting a meeting local at his local Java Users Group about Pact & contract testing with Quarkus.

If your based in Boston, MA, you should pop over.

https://www.meetup.com/nejug1/events/294642505/

Pacto - A blast from the past

Have you ever heard of Pacto?

Nope, that's not a typo, Pacto is another Ruby implementation of a library that provides a mock service and provider verification using consumer driven contracts, originally cooked up at ThoughtWorks.

It's now fallen out of maintenance, but many of our long-standing community contributors both remember and tip our hats to Pacto and its champions, for helping raise contract-testing awareness.

Marthinus Engelbrecht updated our docs to reflect this in this PR

Pactober

We've been squirrelling away organising an awesome lineup for Pactober's main event on the 10th October. You can see the updated pages in the below links.

Add your own event!

We can't wait for you to get involved, whether you attend one of the sessions throughout the month, or you decide to host something yourself. Long live Pact and its awesome community!

Thats a wrap

That’s it for this month. Stay safe and carry on coding!

  • Yousaf Nabi — Developer Advocate at PactFlow and Community Shepherd at Pact.

· 12 min read

👋 Hello, its July, it's scorching so I hope you've got an ice cream to accompany you this episode or maybe a brolly if you are stuck in a rain-shower!

For the keener of our readers, you may note we missed our June episode. I was on holiday ( a rare treat! ) which was spent mainly away from the keyboard, with the exception of a little flurry in pact-python.

Never fear, a double-dose of Pact Open Source updates are here!

OSS Updates

It has been a busy two months in the world of Pact, read on for updates on

  • Pact Docs
  • Pact Reference
  • Pact Net
  • Pact Go
  • Pact JS
  • Jest Pact
  • NestJS Pact
  • Pact Broker
  • Pact Python
  • Pact PHP
  • Pact in the community

Pact Docs

The path to Pact Nirvana guide is now updated to cover

  • Branches
  • Recording Deployments
  • can-i-deploy --to-environment
  • contract_requiring_verification_published webhook
  • New diagrams courtesy of MermaidJS

Want to see can-i-merge functionality incorporated into the broker? Vote on this feature request

Pact-Reference

A raft of bug-fixes and features have been applied across the pact-reference project.

Features

Fixes

Latest Releases

Pact-Net

The PactNet 5.0 RFC is complete with PactNet 5.0.0.beta.1 now released.

This bring in the ability to generate V4 Specification Pact's using the same API as V3 sync and async pacts and utilise combined pact files for both http and message based interactions. This removes the limitation requiring services which comprise of both http and message-based interactions to be named differently.

See the migration guide for upgrading to PactNet 5.x

Pact-Go

Pact-Go V2 has officially been released, following an extended beta period. We are very grateful to our many early users who provided invaluable feedback.

You can check out the full release notes here

and for those migrating from v1, you can check out the migration guide here

This update replaces the pact-ruby core, with the pact-rust core, utilized through the pact_ffi library, bringing support for V3 and V4 Pact specifications and the ability to load pact-plugins to extend the capabilities of pact-go.

  • Supported platforms.
    • Linux x86_64 / arm64
    • MacOS x86_64 / arm64
    • Windows x86_64

Please note that Alpine Linux is not supported at this time.

New Features

Pact-JS

JavaScripters/TypeScripters/Nodemads

We listened to our community, who struggled with requiring python to install pact-js in order to get at that lovely rust pact-core functionality in pact-js v10 & v11 and pact-js-core v13

You can now find they both come fully charged with batteries included, meaning that supported platforms can use pact js v12 and pact-js-core v14 with --ignore-scripts true and no additional install time build requirements

In addition, the new releases now support versions of Node 16 and greater, CI testing has been dropped for earlier versions, and we explicitly set the engines value in the package.json of both pact-js and pact-js-core to honour this restriction. We would advise updating your projects to an in support LTS version, (Node 18 LTS is probably most sensible at this point and node 16 is due to EOL on 11th Sept 2023)

New Features

  • Support for eachKey and eachValue matchers has been added to pact-js via pull #1303 which closes issue #952

Jest-Pact

Updated to reference peer-dep of pact-js 12.x

NestJs-Pact

Updated to reference peer-dep of pact-js 11.x and nest-js 10.x

Pact-Broker

Pagination support was added via pull #622

You can find the current documentation and supported endpoints here

A few performance enhancements were made at the same time.

Pact-Python

Pact-Python 2.0.0 has been released

  • What does it contain?
    • ARM64 for both Linux & MacOS is now natively supported by Pact Python
    • Linux Support for x86 platforms (32-bit) has been dropped
    • The ruby standalone now runs the latest ruby 3.2.2 (big bump - from a deprecated Ruby 2.4)
    • Plus a few other fixes and enhancements from the community and maintainers.
  • Release notes
  • PyPi Release

Whats next for Pact-Python?

Pact-PHP

Pact-PHP 9.0.0 has been released

  • What does it contain?
    • ARM64 for both Linux & MacOS is now natively supported by Pact PHP
    • Linux Support for x86 platforms (32-bit) has been dropped
    • The ruby standalone now runs the latest ruby 3.2.2 (big bump from a deprecated Ruby 2.4)
    • Plus a few other fixes and enhancements from the community and maintainers.
    • The CI Pipeline has dependabot hooked up, to ensure our dependencies stay up to date
    • Release documentation has been added to aid future maintainers
    • Support for PHP 7.4 has been dropped. You should be on 8 by now though, surely
  • Release Notes
  • Packagist Release

Whats next for Pact-PHP?

Oh Hi FFI :blobwave:

#326 Support for V3 / V4 + Plugins Via FFI

What is the current status

Pact-PHP does not currently support v3+ features of the rust core, in the mainline branch.

V3+ features are now available for beta testing in ffi branch, in a view to stabilise and release into the mainline.

We would <3 your support

How can I test this today

Anyone can start testing pact-php with pact_ffi code by updating their composer.json

"pact-foundation/pact-php": "dev-ffi as 10.0.0"

How can I submit feedback

All feedback is gratefully received, positive feedback is great, as it allows us to ascertain how well the package is doing for users. Constructive criticism is okay too, but see the next section

  • Reply in this issue
  • Raise a new issue, clearly stating you are using the ffi branch

How can I contribute

If you want to help improve Pact-PHP, read the DEVELOPING.md documentation, fork the repo and have a play!

Pact in the community

Pact-graph-network

We mentioned Guillaume Camus's pact-graph-network tool back in December. It's just been updated to support multiple target architectures, and now supports authentication mechanisms whether you have a basic auth protected Pact Broker, or a Bearer token protected PactFlow Broker.

So what are waiting for? Go forth and generate some broker charts, and why not share us your graphs via https://twitter.com/@pact_up or pact-slack.

Hello Jo

I imagine you've heard of Cucumber, the testing tool, not the veggie, If not, Cucumber is a tool for running automated acceptance tests guided by a technique called BDD (Behaviour-Driven Development), written in plain language called Gherkin. It has strong overlaps with our principles of contract testing and the Pact DSL, and is often part of a development teams tool-set alongside Pact for developing robust, quality systems. The similarities don't end there, it also has a thriving community which has been spearheaded by Jo Laing, across Slack and in many events across the globe.

That leads us nicely into what has Jo been up to this week!

Jo volunteered at AgileConf Scotland, where she was tasked with speaker support duties for a workshop.

A principles-based approach to create test automation strategies that work at scale, hosted by none other than Antonello Caboni (a Pact community speaker) & Nicola Sedgwick (a former CukenFest speaker). It's a smöl ol' world.

The penny dropped as slides for contact testing appeared and Jo had to declare her new role in the Pact community.

jo_anton_agilescotland


So that leads me to announce to you, that I have the pleasure of inviting her to join me in my role as community shepherd, and know she will be helping to bring some organisation to the fold, including things like maintainer sessions and training, she has worked on the Cucumber school which is an incredible free resource to help those learn about BDD, I would ❤️ a Pact School - if such a thing would float users boats.

Community Corner - Olivier Picaud

Autonomy within development teams is really valuable, tied with standardisation and goverance in an organisation, it can empower your teams. However it isn't all roses, it can also lead to fragmented tooling across the landscape, especially when developing microservice-based architectures in the dream of multiple protocols and languages all working in harmony. The landscape is always moving quickly but we are going to shine the spotlight on how open-source, both in terms of its tools, its users and contributors are helping to push things forward.

gRPC makes it easier to build high-performance microservices by providing generated service entrypoints in a variety of different languages. Bazel complements these efforts with a capable and fast polyglot build environment. Pact now offers the ability to test gRPC services via its extensible plugin mechanism, and it complements both gRPC and Bazel well, affording engineers the confidence to build applications in a stable repeatable manner, all whilst gaining that rich feedback from contract-testing.

We caught up with Olivier Picaud, who felt the draw, and utilised the power of open-source not only to power his journey of learning, but to share his progress, so that others can follow along. You can find his pull request showcasing his work here

Olivier Picaud

To learn monorepos, i put in place some grpc microservices using pact to validate interactions. Also, to facilitate the monorepo building, i am using Bazel and so i "bazelify" protobuf-plugin and pact-reference to get a >pact_verifier_cli and protobuf-plugin compiled from source --> Today, local consumer/provider testing is working well.

From Docker (and then from Kubernetes) i am trying to use the image you provide https://hub.docker.com/r/you54f/pact_verifier_cli, with the addition of protobuf-plugin from Bazel :) (still currently in dev)

EDIT1: Docker is not used anymore, it has been replaced by OCI images

EDIT2: Tests are not running from Docker images anymore, but directly from the build via pact_verifier_cli and pact-protobuf-plugins. To ensure a deterministic build, pact_verifier_cli and pact-protobuf-plugin are compiled "just in time" during build process (or use cache if already built).

EDIT3: Idea for the community : providing a "rules_pact" Bazel rule --> to use directly Pact from Bazel projects with pact_verifier_cli and other Pact tools as embedded toolchains ?

See here:

What I learned and still learning is :

  • improving cohesion of teams by pulling them in a monorepo structure
  • improving local development and determinism by providing one tool and the necessary toolchains for different platforms coming with the monorepo --> pact-reference and pact-protobuf-plugin was "bazelifed" for this purpose
  • optimizing test strategy (and notably with pact-grpc) to provide enough confidence to just run health checks when products are deployed. providing an unique pipeline to build / test / release and deploy using gitops magic monorepo's components in less than 10 minutes to accelerate feedback (incremental builds are amazed for this purpose)
  • I am currently migrating to bazel 6.0 because they use a new way of dealing with dependencies and then i will need to realign my fork to your master to pull out few updates that you made guys :) and then continuing to provide an end-to-end flow (i do not have an cli for instance to "play" with the entire product)

It's also very nice to participate to the community, i've participate to few others bazel-project by testing PR, providing feedback and red tests :)

Thanks Olivier for taking the time to share with us. It's exciting to hear about pull requests dropping in other areas outside of Pact as part of this effort. I hope this empowers others to take on journeys of discovery through code, through collaboration, as that is how our open source ecosystem is enriched.

Are you using Bazel in your organisation? Are you building tooling on top of pact-reference? Why not let us know! We could bring it into the codebase as part of an external builds directory as suggested by Ron so don't by shy!

Pactober

Celebrating Pact's 10 Year Milestone

2023 marks 10 years of Pact Open Source. To celebrate, during the month of October – which we’ve coined Pactober – we’re facilitating community events across the globe to celebrate and acknowledge the journey and look forward to the future of Pact.

Be sure to bookmark our Pactober event page where you can register to keep up to date, or to join us in hosting an event. We want to bring you all in to the celebrations, and help bring more contributors to the Pact family and help it live for another 10 years and beyond

Thats a wrap

That’s it for this month. Stay safe and carry on coding!

  • Yousaf Nabi — Developer Advocate at PactFlow and Community Shepherd at Pact.

· 9 min read

It's May, the sunshine ☀️ is upon us, and you might be reading this in the park 🏞️. If you are, watch out, theres a cyclist 🚴coming. 🛎️ 🛎️

Phew, that was close. Right, well now we are sorted, we've got some goodies lined up for this month, as the city of open-source never sleeps.

OSS Updates

Pact-Net

Repo Slack

V4 of Pact-Net is about to support V4 of the Pact-Specification.

The OCD gods have been appeased. You can all rest easy now, thanks to Adam Rodger.

Pact-PHP

  • pact-php ffi-dev branch
    • Tien Vo has been working hard on ffi support in pact-php and we are grateful to have had a couple more reviewers join the party. We've wanted to make it easier to consume, for beta testing, in order to get feedback from users, who may be more familiar in their own codebase, than pact-php's. You can read more details about it in this PR on how you can get involved.

Pact-Python

  • pact-python has put out a deprecation notice, noting that CI testing will soon be switched off for Python 3.6.
    • You can check the Python EOL dates and get prepared. 3.7 will be dropping support shortly, so you might as well take the time to jump up to 3.11 whilst you are there.

Pact-JS

  • pact-js & pact-js-core have put out deprecation notices, noting that CI testing will soon be switched off for Node 14.
    • You can check the Node EOL dates and get prepared. 16 will be dropping support shortly, so you might as well take the time to jump up to 18 which is the latest LTS but also check that you are compatible with 20, the upcoming LTS
  • pact-js-core will soon come will batteries included - PR
    • All supported platform/arch combo's for libpact_ffi will come pre-packaged in pact-js-core and pact-js, this means users will be able to
    • npm install @pact-foundation/pact --ignore-scripts
    • Not require a full developer tool-chain included Python to run node-gyp in order to generate the required node bindings. We'll do the grunt work, so you don't have to.

Pact-Broker

pulls stars

As the Pact-Broker nears its birthday, it decided that it better get ready. You'll now find the latest pact_broker and pact_broker-docker projects have been upgrades to support Ruby 3.2, and pact_broker-docker now comes in the following flavours via this PR.

size: amd64 size: arm64 size: arm

New Tagging Format

On 3 May 2023, the format of the docker tag changed from starting with the Pact Broker gem version (2.107.0.1), to ending with the Pact Broker gem version (2.107.1-pactbroker2.107.1). Read about the new versioning scheme here.

Docker Multi-Arch Info

You'll be able to pull multi-arch builds for arm/arm64 machines soon, by adding the -multi flag to your pact_broker tag.

By default, vanilla tags, are built only for amd64

docker run --platform=linux/amd64 --rm -it --entrypoint /bin/sh pactfoundation/pact-broker:latest -c 'uname -sm'

returns

Linux x86_64

We need some binfmt emulators, to run multi-arch. - Thanks to tonistiigi for his project.

Note: You only need the binfmt emulators, if you plan on running a non-native image. Unless you are testing, you wouldn't normally want to do this :)

docker run --privileged --rm tonistiigi/binfmt --install all

We can now run multi-arch images

docker run --platform=linux/arm64 --rm -it --entrypoint /bin/sh pactfoundation/pact-broker:latest-multi -c 'uname -sm'
docker run --platform=linux/amd64 --rm -it --entrypoint /bin/sh pactfoundation/pact-broker:latest-multi -c 'uname -sm'
docker run --platform=linux/arm/v7 --rm -it --entrypoint /bin/sh pactfoundation/pact-broker:latest-multi -c 'uname -sm'

returns

Linux aarch64
Linux x86_64
Linux armv7l

Armageddon - Go Forth and multi-manifest

info

Why not drop into your favourite repo, and see if you can help them build multi-platform images, it's simpler than you might think.

Prepare your docker builder

docker buildx create --platform linux/arm64,linux/arm/v8,linux/amd64 --name multi_arch_builder
docker buildx use multi_arch_builder

Building your own multi-arch images

Note: (this will push the multi-manifest image to Dockerhub), remove push=true if you don't want to.

  • Replace DOCKER_IMAGE_ORG_AND_NAME & TAG with your required values
docker buildx build --platform=linux/amd64,linux/arm64,linux/arm \
--output=type=image,push=true \
-t ${DOCKER_IMAGE_ORG_AND_NAME}:${TAG} .

Pact-Ruby-Cli

pulls stars

Not to be outshone, by the Pact Broker Docker, Pact Ruby Cli now comes in the following flavours

size: amd64 size: arm64 size: arm

New Tagging Format

On 23rd May 2023, introduced in this PR , the format of the docker tag changed from ending with the Pact Cli Gem version (0.51.0.4), where .4 noted a change to the one of the packaged gems, to ending with the Pact Cli gem version (0.52.0-pactcli0.52.0). Read about the new versioning scheme here.

Alpine 3.18 & Ruby 3.2.2

Alpine 3.18 is out, and Pact-Ruby-Cli is now up to date

Pact-Ruby-Standalone

pact-ruby-standalone 2.0.1 is out!

but most importantly, the latest Ruby runtime, and native arm64 architecture.

Supported Platforms

Ruby is not required on the host platform, Ruby 3.2.2 is provided in the distributable.

OSRubyArchitectureSupported
MacOS3.2.2x86_64
MacOS3.2.2aarch64 (arm64)
Linux3.2.2x86_64
Linux3.2.2aarch64 (arm64)
Windows3.2.2x86_64
Windows3.2.2x86
Windows3.2.2aarch64 (arm64)🚧

🚧 - Tested under emulation mode x86 / x86_64 in Windows on ARM

You'll see the roll out of improved CLI documentation on our main site, more distribution methods and a slicker experience overall soon.

Pact FFI

Pact Plugins

Pact Erlang

Oh yeah, you heard that right!

With thanks to community contributor Priyaranjan Mudliar, Pact-Erlang is alive.

It describes itself as

An OTP library for contract testing using pact and generating consumer pacts

and is proudly using the new Pact Rust core, via the FFI. We've been pleased to help guide Priyaranjan along the journey, its a first pass and doesn't contain a full feature-set. Be sure to drop him a ⭐ on his repo to show your support, and even better, if your an Erlang user, why not give it a go.

Check out the repo here https://github.com/silverblaze404/pact-erlang

Pact Broker Client

Cucumber community contributor David Goss paid us a visit and dropped a fix in whilst he was there.

If you are like Homer and often leave a trailing slash on your PACT_BROKER_BASE_URL or --broker-base-url values, consider yourself sorted.

You may notice some improved next steps when publishing provider contracts, and highlighted URL's, hopefully indicating to the user, useful next steps.

We hope this helps, please try it out and let us know!

Pact Ecosystems

I've been introducing a fellow Dev Rel colleague to the history of Pact and vastness of the estate. We've been working through a few things, so we thought it would be awesome to share some of the outcomes so far.

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

Rube Goldberg

Beth often refers to the Ruby Goldberg machine, in a nod to Rube Goldberg.

image

Wondered what it looks like?

You can see our newly published Pact Ecosystem page here

Pacticipate in our Ecosystem

Sorry Beth!

Did you know, we've used many CI systems here at Pact, now using GitHub Actions extensively, after migrating from Travis CI when they stopped being so friendly towards open-sourcerers. That has been great for x86_64 / Intel Architectures, but we've had a missing link, namely Arm64/Aarch64 architecture, for those of use with shiny new Macs, or perhaps using some cheaper cloud hardware like AWS Graviton's or Oracle clouds free tier offering.

We've documented some details about our CI systems in a new contributing page, on our docs site, you can check them out here

did you know?

You can drop into any repository with a .github/workflows/*.yml or .cirrus.yml file and run the CI systems workflows ephemerally on your own machine.

🐱‍💻 Local Machine - GitHub Actions

  1. Download Act
  2. Download Docker (or Podman)

Linux workflows

act --container-architecture linux/amd64

🐱‍💻 Local Machine - Cirrus CLI

  1. Download Cirrus CLI
  2. Download Docker (or Podman)
  3. If on an arm64 mac, download tart.run

Linux or MacOS workflows

cirrus run --output github-actions

Community Corner - Adam Cox

Adam Cox

If you've been around our GitHub repos or Slack, over the last couple of months, you can be sure to have seen Adam Cox's name pop up.

Well this month, we have an absolute treat. We have the pleasure of opening a new community corner section on our site, dedicated to your voice.

We are equally as honoured to help the community put a name to the face, as we speak to Adam Cox about his journey at Sky, from introducing Pact to the team, to adventures with embedded devices, websockets, and how the Pact Plugin framework is helping them push the envelope.

Be sure to check it our here

Thats a wrap

That’s it for this month. Stay safe and carry on coding!

  • Yousaf Nabi — Developer Advocate at PactFlow and Community Shepherd at Pact.

· 6 min read

Welcome all, Yousaf here, your Pact Community Shepherd. This month I’ll be sharing all the good things happening in the world of Pact.

OSS Updates

Pact Broker on Kubernetes

Chris Burns, has been maintaining the pact-broker-chart repository, which is currently the easiest way to run a Pact Broker on Kubernetes.

He's just hooked it up to the Pact documentation site and you can find the page in its new home here https://docs.pact.io/pact_broker/kubernetes

Pact-Net

Pact-Netizens

got some goodies for you, wouldn't mind some eyes across them :)

I think we may in the very near future, to consolidate all the things.

PS. I have to say, the DSL is pact-net 4.x is quite nice, and the delta between 3.x -> 4.x isn't bad at all, especially once you've got one test converted, the rest is relatively plain sailing. Great work Adam!

If you want to build out your own workshop to share with others, please do join in!

Pact Broker

ARM64 & ARM builds of the Pact Broker are brewing, you can check them out here

I have proposed we publish multi-manifest builds with the $TAG-multi prefix so it is an opt-in arrangement until we get further feedback.

Pact Broker CLI

Good things, come in two's! Plus Beth made common scripts across the libraries many moons ago which means applying changes in one repo can easily be applied across others

Pact Ruby Standalone

Well okay, maybe there are like busses and they come in three.

The current state of packaging Ruby applications, hasn't kept up with the times, and it's left our pact-ruby-standalone package, stuck on Ruby 2.4.x

The maintainer of the build system wrote about it a few years back https://www.joyfulbikeshedding.com/blog/2021-01-06-the-future-of-traveling-ruby.html

Traveling Ruby hasn't seen updates for quite a while now, but it's still being used. Yesterday, the author of the Pact contract testing framework asked me to do a new release, because he needed a bug fix for supporting paths that contain spaces. So I gave it a try. Predictably, the build system is broken due to all the changes in Linux and macOS the past few years, and fixing it all takes a lot of effort.

It leaves our current state of play of support like this.

OSRubyArchitectureSupported
MacOS2.4.xx86_64
MacOS2.4.xaarch64 (arm64)🚧
Linux2.4.xx86_64
Linux2.4.xaarch64 (arm64)
Windows2.4.xx86_64
Windows2.4.xx86
Windows2.4.xaarch64 (arm64)🚧

🚧 are supported under emulation.

Due to open source, the build system being available on GitHub, the power of ARM processors (via M1/M2 processors found in Apple machines), and leaps and bounds in virtualization / emulation technologies, it's really easy to spin up ephemeral build boxes, than ever before. The build systems themselves are still incredibly complex, but thankfully I managed to munge a few community forks, into one gotta-build-em all solution.

You can check out the current PR here

This means our support table will possibly extend now to

OSRubyArchitectureSupported
MacOS3.2.2x86_64
MacOS3.2.2aarch64 (arm64)
Linux3.2.2x86_64
Linux3.2.2aarch64 (arm64)
Windows3.2.2x86_64
Windows3.2.2x86
Windows3.2.2aarch64 (arm64)🚧

I have got some very alpha arm64 osx and linux standalone packages you can trial

https://github.com/YOU54F/pact-ruby-standalone/releases/tag/v3.1.2.2-alpha

Note these aren't official builds so your mileage might vary and you shouldn't rely on them at the moment until we get some feedback

HomeBrew

Our Homebrew repo now supports installing the x86_64 ruby standalone on Linux

https://github.com/pact-foundation/homebrew-pact-ruby-standalone

brew tap pact-foundation/pact-ruby-standalone
brew install pact-ruby-standalone
OSArchitectureSupported
OSXx86_64
OSXaarch64 (arm)🚧
Linuxx86_64

You'll need rosetta on M1/M2 Mac's until we get my PR's merged, watch this space

Windows users

We are sorry, we've probably not given you as much love as we should have been. I've long been a windows fan boi, but got a Mac with work in 2015, and rarely fire the windows machine up for anything other than games. I did set it up for devvin' a while back and was incredibly surprised at how awesome the experience is now, and for everything else there is WSL2. That is how I felt about MacOS when I first joined the party.

Anyway, it could be better! Want the pact-ruby-standalone, but don't want to manually unzip a file, I mean cmon' sheesh, it's not the 90's and is Clippy even still a thing?

I've got your back. And because you might be a Scoop VS Choco, kinda person, I've got you both covered.

Let me know if these work, and we can move them under the Pact-Foundation!

Scoop

scoop bucket add pact https://github.com/you54f/scoop scoop install pact

https://github.com/YOU54F/scoop

Choco

choco install pact --version=0.0.1

https://github.com/YOU54F/choco

SmartBear Supported

We spoke last month about what SmartBear supported means for Pact on our newly published page. We started engaging with our core maintainer group and are listening intently to the feedback before we share it out with the wider contributor group to get your valued input.

We all want to ensure Pact is here forever!

That’s it for this month. Stay safe and carry on coding!

  • Yousaf Nabi — Developer Advocate at PactFlow and Community Shepherd at Pact.

· 12 min read

Welcome all, Yousaf here, your Pact Community Shepherd. This month I’ll be sharing all the good things happening in the world of Pact.

So sit back, relax, and join me for some contract testing in the wild. Hear from community experts and some of the latest initiatives in the Pact ecosystem.

Another month, another milestone

In case you missed it, Pact is 10 this year. In our last POST, we celebrated Pact coming into existence with the first implementation on February 19, 2013.

As we roll into April, we celebrate Ron Holhousen’s (Pact-JVM/Rust core maintainer + PactFlow co-founder) first commit on April 3, 2013.

Rons first Pact commit

We are glad you stuck around, Ron, to help drive the Pact V3 & V4 Specification, the Rust core, and the Pact Plugin Framework, amongst others.

You can check out a young Ron in the early days spreading the news about Pact-JVM at this Melbourne meetup and Ron back in 2021 priming the community on what was in store for Pact V4 and beyond.

So while we are talking about memorable moments, it’s not all about looking into the past. We’d love to celebrate all the achievements to date, with the people that helped make it, and where Pact is going in the future. We’ve been planning ideas for our Pact 10th birthday, and we’d love to share our overall aims.

  • Contributor engagement: a thriving open source community is one that provides value to contributors and users of the software, alike. This milestone is an opportunity for us to share with the world the great aspects of Pact and to attract and excite new contributors and friends to the ecosystem
  • Awareness: contract testing is becoming well adopted across the software development landscape but there’s still a way to go – our hope with this milestone event is to further grow awareness of contract testing
  • Celebration: and of course, we want to celebrate 10 years of Pact in a fun way! It’s so important to us that we acknowledge the founders, maintainers, contributors, and community who have put in time and energy to make Pact what it is today

We would like to invite our own community to be a part of it – as a participant or to lend a hand to host a local event/meet up or speak on a specific topic. If you are interested, please get in touch at yousaf.nabi@smartbear.com or find me on Pact Slack.

Missed our last one? You can catch up with our last community event here.

Events for your calendar

Python Web Conf

  • March 13 – 17 – Online: Syed Muhammad Dawoud Sheraz Ali (Software Engineer - Arbisoft) spoke at Python Web Conf 2023 with his talk, “Why you should contract test your microservices.” - He covered the need for contract testing and how Pact can help in that. We’ll keep an eye out for the video and share on our community videos page.

DevBcn

  • July 3 – 5 – Barcelona, Spain: Join Eric Deandra (Senior Principal Developer Advocate, Red Hat) and Holly Cummins (Senior Principal Software Engineer, Red Hat) as they demonstrate, through a test-driven development approach, how the combination of Pact contract testing and Quarkus developer joy can help prevent your microservices from breaking in production. You can check out more details on the Barcelona Developers conference here.

Are you running an event featuring Pact this year? Let us know, and we can help promote it. If you want to build your brand profile, get in touch at yousaf.nabi@smartbear.com or find me on Pact Slack.

Eye candy – community content to tune into

EdinburghJS February ’23 Meetup – Testing services with Pact

I grew up in Edinburgh, and I know the folks there are very active in agile meetups, so it was awesome to see Pact make an appearance at EdinburghJS:

  • EdinburghJS February ’23 Meetup – Testing services with Pact – watch here

Quarkus Insights #117: Contract Testing with Pact and Quarkus

If you can’t wait for Holly and Eric’s conference talk in July, you can get a piece of their wisdom showcasing Pact and Quarkus, this time in a live insight session:

  • Quarkus Insights #117: Contract Testing with Pact and Quarkus – watch here

Contract Testing of HTTP Services using Pact.NET

The team at Execute Automation show .NET users how to get started with Pact

  • Contract Testing of HTTP Services using Pact.NET – watch here

Pact theory, frontend, and backend application

This three-part Pact chronicle covering Pact theory, frontend, and backend application from Kirill Ushakov is a must-watch for Pact newbies:

  • Consumer Driven Contract Testing with Pact – Theory – watch here
  • Consumer Driven Contract Testing with Pact – Frontend – watch here
  • Consumer Driven Contract Testing with Pact – Backend – watch here

Consumer-driven contract testing using Pact with Java

Helmut Siegel introduces Java and Pact in this 12 minute video

  • Consumer-driven contract testing using Pact – watch here

Hot reads – I spy, with my API

Matt Post

Matt Fellows wrote a piece for NordicAPI about the future of API contract testing and how the Pact Plugin Framework (which we launched late 2022) is there to support practitioners build with confidence. Read it here.

Frank Post

We’ve all seen ChatGPT in the news, as it has become a living room conversation piece. Frank Kilcommins explores what AI means for the future of APIs in this blog.

Pact community corner

This month, I caught up with Tien Vo, who has been helping bring the Rust core to Pact-PHP, about why Pact caught his eye, what brought him to contributing, and how we can help him out!

Tien Vo

What brought you to using Pact in the first place?

I heard about Pact from my ex-employer. AFAIK they are still not using Pact. I was introduced to microservices architecture long ago. Till today, it is complex to me. Too many techniques, too many tools need to be learned. But I think I need to find the answer for this question first: how to prevent someone from changing the code in a provider, and it breaks the consumers.

I tried to learn Pact via Pact-PHP, but I think it’s quite old at that time (only support v2, while other projects migrated to v3 and supported FFI). So I think I will contribute to Pact-PHP and hope I can learn something while doing that.

We see you’ve been doing some PRs in the pact-php project. How have you found the experience?

I have a confession to make: I don’t have real experience working with Pact/contract testing before working with pact-php. All I know are theories I read from Pact’s documents and YouTube/posts. That’s why I am starting a personal project so I can test new pact-php code and get some experience from it.

Is there anything that the community could do to help you?

I hope someone with real experience on pact/contract testing can test the new pact-php code early to find some problems with it.

Do you have any advice for those wanting to get involved in open source?

I think patience is very important while working/using any open source projects. We mostly contribute using our free time. So don’t expect a bug to be fixed soon, a question will be answered soon, so a PR will be reviewed and merged soon.

When you’re not behind a computer, what are you doing?

I hope a day has 48 hours so I can sit on the computer more. So many things that I need to learn. The more I learn, the less I think I know. Just kidding, I hope I have more time to play with my kid, relax, and watch films on Netflix.

Thanks, Tien, the community is really grateful for your time and efforts. If you want to help Tien and the Pact-PHP community out, why not take a look at some of the PRs.

While we love people jumping into the code, if you are new to Pact, we would always recommend running through some starter material first:

If you’re more familiar with Pact, and don’t see a workshop in your favored language, why not help us create one following the other workshops as a guide.

It’s a great way to share your skills back to the community. A PHP workshop may have helped get Tien up to speed far more quickly. Visit our how to contribute page to learn more or contact us via Pact Slack.

OSS Updates

We are pleased to have just launched a SmartBear DevRel OSS metrics repository.

You can check out Pact & PactFlow’s entry, which currently shows

  • Stars
  • Forks
  • PR Opened & Merged (split by community and maintainers)
  • Issue & discussion Participation
  • Slack activity

We are very proud of our thriving community and want to make sure we keep giving back to you in valuable ways. Feel free to let us know what you think.

Pact V4 Support

We’ve just raised two new cards on the PactFlow roadmap to help support V3/V4 Pact specification & Plugin support to both Pact-Python and Pact-Net as we understand that unblocking Python and .NET users to be able to utilize our newest feature-set will be invaluable, especially as many of you operate with multiple languages in your microservice stacks.

Pact-Rust

Pact FFI v0.4.0 was released, adding FFI functions for plugin authors to parse Pact JSON and get matching rule.

Pact Protobufs

gRPC metadata is now supported in v0.3.0+

A big thanks to early users of the plugin, who have provided invaluable feedback:

Amongst others!

If you’ve tried out any of our Pact Plugins, or built your own: Let us know!

If you haven’t, try out building your own plugin: here’s a workshop to get you started.

The community is after plugins too!: See the Pact Roadmap filtered by plugins for ideas.

Pact-JS

Timothy Jones is again providing quality-of-life improvements for TypeScript users. We really appreciate your work, and those who take the time to provide great bug reports and root-cause identification (and sometimes fixes) as this greatly aids us as maintainers, who have a large estate to cover.

We do have an ask of our users. We updated Pact-JS to the latest Rust core, and it still includes the Ruby binaries so that users can programmatically use the Pact-CLI tools. We are considering removing them, but it would have an impact, depending on your workflow.

Many users are using this API for pact publishing, and it is re-exported by Pact-JS. There should be a discussion on whether it is acceptable to remove the programmatic use of Pact before merging.

If we find a lot of users are, it might be worth considering backing the existing broker API with the Rust implementation instead of removing it. We would love your thoughts in this discussion.

Our current recommendation for publishing pacts is to use the Pact CLI tools directly, as these will get the latest updates and not have to wait for a Pact client library to incorporate the changes.

Pact-Python

Serghei Iakovlev recently joined the pact-python community and has dropped a raft of PRs to help bring pact-python up to speed. We would love to get our fellow #pythonistas across these, so if you can offer any support from a review or testing perspective, join us in our pact-python Slack channel, or see our pinned call out for maintainers and support of the v3 Pact specification to register your interest

You can check out his Python consumer and provider examples, which are listed on our community projects page.

Serghei Example Project

Have you built a sample project and want to share with the community? You can edit the page and add your own.

SmartBear Supported

You might have seen the label smartbear-supported or a comment that looks like this cropping up across our open source repos and be wondering what it means.

Screenshot 2023-03-20 at 15 04 05

SB Supported Comment

Last year, PactFlow was acquired last year by SmartBear.

We wrote about what that meant for the OSS Pact Framework then (read it here).

SmartBear wants to be true to that promise and part of that is allowing our engineers time to spend in the open source during their work hours. We want to foster an environment where open source contributions are welcomed, valued, and rewarded, and as we know Pact is integral to the future success of PactFlow. It is also part of its inherent heart, we know that we need to spend time defining our full feature set, and spending SmartBear supported time in bringing those languages to parity. This will benefit our complete user base, whether you choose to use your own Pact Broker, or one provided by PactFlow.

You can read more about what SmartBear supported means for Pact on our newly published page.

It’s better with friends

We would love to give a big shout out to our friends at Sngular, who have partnered with PactFlow since the early days and have helped clients implement Pact, PactFlow, and quality engineeering at scale.

Particular praise goes to Francisco Moreno Sanz, Juan Monzón Fabregat, Alejandro Pena Lorenzo & Alma Miller.

We are proud to let you know that they have been recognized as the Best Newcomer partner by SmartBear. Read more about it and Sngular here.

Sngular Award

Some great contributions so far:

That’s it for this month. Stay safe and carry on coding!

  • Yousaf Nabi — Developer Advocate at PactFlow and Community Shepherd at Pact.

· 4 min read

Welcome all, it’s February, we are live, and this is another update from the Pact Open Source team.

Let’s Pact Party like it’s 1999

2023 marks a special celebration for Pact, 10 years since the first commit brought it to life.

first commit

Read more about the history to date here

We intend to celebrate that fact with the people who helped make it great, the community, its maintainers and advocates. We want to help make it an experience that you won’t forget, but we also want it to help bring in new contributors and ideas to the field.

Keen to get involved?

If you would be up for hosting a community event around Pact and contract testing in your local area, contact the team and we can arrange a Pact Party Pack, with some materials to help make the meeting a success.

If you have a story to share, or wish to host or attend these sessions, register your interest by contacting yousaf.nabi@smartbear.com or reach out to us in Slack.

Help build your personal brand with Pact

We would love to help you amplify your voice and give you a creative outlet to share the wonderful work that you do. We can help amplify your personal brand and are always on the lookout for new content like:

Community PRs merged 🚀

December and January are usually quiet months, but we saw several features and fixes provided by the community.

Check out a selection of the merged ones below.

Big thanks to everyone, especially if you aren’t individually called out.

Pact Broker Chart

This is picking up traction, thanks to Chris Burns for bringing this into the pact-foundation. A number of users have brought in improvements.

Pact JS

Fixes

Pact JVM

Feats

Fixes

Pact Go

Feats

Pact PHP

With <3 to Tien Vo Xuan and others, we now have Rust support in Pact-PHP

See the next section for how you can help him and other pact-php users, with some other PR’s awaiting review

Pact NET

Pact Docs

Jest Pact

Community PRs awaiting review – we would appreciate your eyes

“Given enough eyeballs, all bugs are shallow.”

It’s true. We would love your support in helping review any of these PRs, as would the authors. These have all come from the community.

Pact PHP

Rust

Community fixes

Community Enhancements

Pact Go

Community Posts

  • Barry Irvine from GoCity, wrote a great post about Pact contract testing in Android. you can read it here

Getting involved with Pact

We have <3 for all our contributors and maintainers – we have reached the heights of today because of the hours and work many people have put into the Pact ecosystem.

Getting involved with an open source project – Pact or otherwise – can be extremely rewarding and allow you to give back to a community in a meaningful way. If you’re passionate about Pact, you can find a way to get involved here.

That's all for now, catch you next month!

  • Yousaf Nabi — Developer Advocate at PactFlow and Community Shepherd at Pact.