Skip to content

Commit 452b6c6

Browse files
authored
Merge pull request #314 from pact-foundation/blog/mar_2024
docs: mar 2024 blog draft
2 parents 11f9328 + af4ee77 commit 452b6c6

File tree

1 file changed

+321
-0
lines changed

1 file changed

+321
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,321 @@
1+
---
2+
title: Pact Open Source Update — Mar 2024
3+
author: Yousaf Nabi
4+
authorURL: https://twitter.com/you54f
5+
tags: [pact, oss, community]
6+
keywords: [pact, oss, community]
7+
date: 2024-03-26
8+
draft: false
9+
hide_table_of_contents: false
10+
---
11+
12+
Welcome everyone, to that time of year when the 🕒 shifts an hour forward, the 🌞 shines on for a bit longer, which is nice, after a 🥶 and 🌧️ winter. It's March and we are live for another Pact Open Source update.
13+
14+
We've got lots of community contributions this month, and pleased to announce that Pact-PHP v10 is wrapping up for an official release, which will bring that Pact Rust core to more users, bringing speed and reliability benefits over the existing implementation. Huge props go out to [Tien Vo](https://github.com/tienvx) 👨🏻‍💻 for the incredible coding marathon, and [Lewis Cowles](https://github.com/Lewiscowles1986) 🕵️ for the code reviews.
15+
16+
## Pact OSS Updates
17+
18+
## Specific language updates
19+
20+
### PHP
21+
22+
Pact-PHP: V10 is nearly here. 🚀 This brings the Pact Rust core to Pact-PHP allowing support up to the Pact V4 specification, which includes http / async & sync message / plugin interaction support, as well as allowing these to all co-exist in a single Pact file.
23+
24+
Here is a bit of a timeline of activities:
25+
26+
-[`10.0.0-alpha7` release](https://github.com/pact-foundation/pact-php/releases/tag/10.0.0-alpha7) just went live
27+
- ✅ Creation of a [`release/9.x`](https://github.com/pact-foundation/pact-php/tree/release/9.x) branch from current `master` branch for anyone who still want to work on Ruby Standalone code.
28+
- ✅ Merging of [`ffi`](https://github.com/pact-foundation/pact-php/tree/ffi) branch into `master`
29+
- [PR](https://github.com/pact-foundation/pact-php/pull/326)
30+
- 🔜 Official release of Pact-PHP v10
31+
- `alpha` -> `beta` -> `release`
32+
33+
Once again we want to thank [Tien](https://github.com/tienvx) and [Lewis](https://github.com/Lewiscowles1986) for their efforts in bringing this across the line. It is a testament to open-source collaboration across the globe, and has been really fun to watch. I really hope you enjoy using the new release. Be sure to drop us feedback like [Steve Taylor](https://github.com/slt) did in this [_Github Issue_](https://github.com/pact-foundation/pact-php/issues/377)
34+
35+
>Not an issue as such, just want to say I love it. (I'm using 10-alpha3)
36+
>It's so much faster and simpler, and I'm looking forward to using some of the newer Pact specification features.
37+
> My API tests came across easily without much fuss.
38+
39+
Chat to us in: [#pact-php](https://pact-foundation.slack.com/archives/C9W94PXPY).
40+
41+
### Pact-Reference
42+
43+
Pact-Reference:
44+
45+
- Multi-Arch Docker images.
46+
- You [asked](https://github.com/pact-foundation/pact-reference/issues/397) for it, you got it!
47+
- `--platform=linux/amd64`
48+
- `--platform=linux/arm64`
49+
- DockerHub Images
50+
- [pact-ref-verifier](https://hub.docker.com/layers/pactfoundation/pact-ref-verifier/1.1.1/images/sha256-585fcb7ec5b6815efa7e598fb45b33c0fe252d2d3d62431128af57d8863b16dd?context=explore)
51+
52+
```sh
53+
docker pull pactfoundation/pact-ref-verifier:1.1.1
54+
```
55+
56+
- [pact-ref-mock-server](https://hub.docker.com/layers/pactfoundation/pact-ref-mock-server/1.0.5/images/sha256-7d6cf711e4503efde9d7a768d9cb6d4277229add2e7b263dcd84c2bbcd8c91aa?context=explore)
57+
58+
```sh
59+
docker pull pactfoundation/pact-ref-mock-server:1.0.5
60+
```
61+
62+
- [pact-stub-server](https://hub.docker.com/r/pactfoundation/pact-stub-server/tags)
63+
64+
```sh
65+
docker pull pactfoundation/pact-stub-server:0.5.3
66+
```
67+
68+
- Whats left?
69+
- CI pipeline to automate building/publishing of Docker images
70+
- Publishing of images to GitHub container registry
71+
72+
- Alpine Support
73+
- Linux binaries are now built with `musl` statically linked rather than `glibc` dynamically.
74+
- This means any Linux users, regardless of distribution should all be able to use a single architecture specific binary.
75+
- Releases
76+
- [pact-verifier-cli](https://github.com/pact-foundation/pact-reference/releases/tag/pact_verifier_cli-v1.1.1)
77+
78+
```sh
79+
curl -LO https://github.com/pact-foundation/pact-reference/releases/download/pact_verifier_cli-v1.1.1/pact_verifier_cli-linux-$(uname -m).gz
80+
gunzip pact_verifier_cli-linux-$(uname -m).gz
81+
mv pact_verifier_cli-linux-$(uname -m) pact_verifier_cli
82+
./pact_verifier_cli --help
83+
```
84+
85+
- [pact_mock_server_cli](https://github.com/pact-foundation/pact-reference/releases/tag/pact_mock_server_cli-v1.0.5)
86+
87+
```sh
88+
curl -LO https://github.com/pact-foundation/pact-reference/releases/download/pact_mock_server_cli-v1.0.5/pact_mock_server_cli-linux-$(uname -m).gz
89+
gunzip pact_mock_server_cli-linux-$(uname -m).gz
90+
mv pact_mock_server_cli-linux-$(uname -m) pact_mock_server_cli
91+
./pact_mock_server_cli --help
92+
```
93+
94+
- Whats left?
95+
- The following projects require updating to build single linux binaries built with musl
96+
- [pact-stub-server](https://github.com/pact-foundation/pact-stub-server)
97+
- [pact-plugin-cli](https://github.com/pact-foundation/pact-plugins/tree/main/cli)
98+
- [pact-protobuf-plugin](https://github.com/pactflow/pact-protobuf-plugin)
99+
- [pact-csv-plugin](https://github.com/pact-foundation/pact-plugins/tree/main/plugins/csv)
100+
- Pact FFI Alpine specific static and shared libraries
101+
- These are now published, and require consumption in client libraries. Contributions are welcome, otherwise you'll hopefully see these rolling out throughout the year.
102+
103+
Chat with us in: [#pact-rust](https://pact-foundation.slack.com/archives/CA2S7E6KC).
104+
105+
<!-- ### Pact-Plugins
106+
107+
Pact-Plugins:
108+
109+
-
110+
111+
Have you tried out Pact Plugins yet? What's stopping you?
112+
113+
Chat with us in: [#pact-plugins](https://pact-foundation.slack.com/archives/CA2S7E6KC). -->
114+
115+
<!-- ### .NET
116+
117+
Pact-net:
118+
119+
-
120+
121+
Chat with us in: [#pact-net](https://pact-foundation.slack.com/archives/C9UTHV2AD). -->
122+
123+
<!-- ### Golang
124+
125+
Pact-go:
126+
127+
-
128+
129+
Chat with us in: [#pact-go](https://pact-foundation.slack.com/archives/C9UTHTFFB). -->
130+
131+
### Node JS
132+
133+
#### Pact-JS
134+
135+
##### Pact-JS Features
136+
137+
:::info
138+
Did you know, Pact-JS now supports the V4 Specification via the PactV4 interface. The documentation has been updated to reflect this. Found an issue or gap? Let us know
139+
140+
- [Consumer](https://docs.pact.io/implementation_guides/javascript/docs/consumer#consumer-package)
141+
- [Messaging](https://github.com/pact-foundation/pact-js/blob/master/docs/messages.md)
142+
- [Plugins](https://github.com/pact-foundation/pact-js/blob/master/docs/plugins.md)
143+
- [Changelog](https://github.com/pact-foundation/pact-js/blob/master/CHANGELOG.md#1220-2024-02-09)
144+
145+
:::
146+
147+
Corporate proxy support was delivered by [Zac Poe](https://github.com/zac-poe-vg) in this [pull request](https://github.com/pact-foundation/pact-js/pull/1199)
148+
- feat(corporate proxy [#1188](https://github.com/pact-foundation/pact-js/issues/1188))
149+
150+
In Zac's words
151+
152+
>Add native support of HTTPS_PROXY and HTTP_PROXY for verifier for [#1188](https://github.com/pact-foundation/pact-js/issues/1188)
153+
>
154+
> This change adds two pieces of behavior:
155+
>
156+
> - The verifier's 2 step parse body behavior now uses a proxy request buffer (instead of the 'proxyReq' rewrite behavior) to ensure the request stream is accessible for intermediary agent behavior
157+
> - The verifier natively supports HTTP_PROXY/HTTPS_PROXY config and assigns a proxy http Agent where those values are present
158+
>
159+
> This results in out-of-the-box support for corporate proxies in the js verifier
160+
161+
Thanks Zac 🙌
162+
163+
##### Pact-JS Fixes
164+
165+
[Dany Marques](https://github.com/danymarques) went down the NPM rabbit hole, to investigate the root cause of a very interesting bug, affecting NPM registry proxies, and npm script-jacking!
166+
167+
Some long nights with his detective hat on, saw Dany find a suitable workaround as an interim for the Pact-JS project, as well as upstream fixes to the npm project itself. We cannot thank you enough for your herculean efforts.
168+
169+
- [PR](https://github.com/pact-foundation/pact-js-core/pull/494)
170+
- [Longest Slack thread ever xD - 213 replies!](https://www.linen.dev/s/pact-foundation/t/16633868/hell-all-quick-question-in-the-migration-guide-for-v12-it-s-#100081d7-2fee-4420-8eac-d55858dcc483)
171+
- Read more about manifest confusion in this [medium blog](https://medium.com/checkmarx-security/manifest-confusion-dont-believe-what-you-see-how-attackers-can-trick-developers-c3c6419f3ae4) (You may want to use incognito mode, if you don't have an account)
172+
173+
Matt Fellows fixed an issue where matching rules are not supported in messages: [pact-foundation/pact-js#1183](https://github.com/pact-foundation/pact-js/pull/1183).
174+
175+
If you've been stuck on either of these issues, be sure to give it a re-test!
176+
177+
- [Use matchers when verifying metadata](https://github.com/pact-foundation/pact-js/issues/745)
178+
- [(TypeScript) Cannot use V3 matchers within MessagePact. Types are incompatible.](https://github.com/pact-foundation/pact-js/issues/1133)
179+
180+
181+
Chat with us in: [#pact-js](https://pact-foundation.slack.com/archives/C9VBGLUM9).
182+
183+
#### React/Cypress users
184+
185+
[Gearóid Ó Treasaig](https://github.com/gotreasa) upgraded one of our [example repos](https://github.com/pactflow/example-bi-directional-consumer-cypress) which contains our vanilla React "Product" API consumer used across all the JS HTTP based examples, and additionally includes Cypress and [Pact-Cypress-Adapter](https://www.npmjs.com/package/@pactflow/pact-cypress-adapter).
186+
187+
Gearóid utilized [graphite.dev](graphite.dev) to stage his pull-requests in distinct commits. The [PR](https://github.com/pactflow/example-bi-directional-consumer-cypress/pull/74) for good reading if you are preparing for upgrading some major dependencies in your JavaScript project, and want an example to follow. Thank you, we really appreciate it.
188+
189+
If you want to get involved, why not pull down the example and try it out, or apply upgrades to one of our many example repos. We would greatly appreciate it, and it is a neat way to start contributing to open source, if you haven't managed to already, but want to start somewhere!
190+
191+
<!-- ### Python
192+
193+
Pact-Python:
194+
195+
Chat to us in: [#pact-python](https://pact-foundation.slack.com/archives/C9VECUP6E). -->
196+
197+
### Pact Broker
198+
199+
Pact-Broker: Multi-Platform support + GitHub container registry support.
200+
201+
Multi-platform images are available
202+
203+
- `--platform=linux/amd64`
204+
- `--platform=linux/arm/v7`
205+
- `--platform=linux/arm64`
206+
207+
- [DockerHub Image](https://hub.docker.com/r/pactfoundation/pact-broker)
208+
209+
```sh
210+
docker pull pactfoundation/pact-broker:latest
211+
```
212+
213+
- [GitHub Container Registry Image](https://github.com/pact-foundation/pact-broker-docker/pkgs/container/pact-broker)
214+
215+
```sh
216+
docker pull ghcr.io/pact-foundation/pact-broker:latest
217+
```
218+
219+
- _Note:_ The Org name needs to match our GitHub org, so note the additional hyphen `-` between `pact-foundation`
220+
221+
#### Pact Broker on AWS Fargate with CDK
222+
223+
The beauty of the Pact Broker nature as a Docker image, means that it can be deployed in a multitude of different ways, and the architecture considerations are the end users to determine, implement and manage.
224+
225+
There are projects which seek to offer experiences with Terraform & Helm in order to provide some out-the-box experiences for regular deployment platforms.
226+
227+
Most of these have come from community contributions, either publicly displayed on GitHub, or shared back into the Pact-Foundation, such as [pact-broker-chart](https://github.com/pact-foundation/pact-broker-chart).
228+
229+
I'm pleased to announce that we've had a [community contribution](https://github.com/pact-foundation/pact-broker-docker/pull/176/files) by [learnautomatedtesting](https://github.com/learnautomatedtesting) of a PactStack, an open source tool utilizing gitlab AWS CDK to publish and deploy a serverless framework of the pactbroker and postgres database.
230+
231+
>PactStack is a serverless solution for running a Pact broker alongside a PostgreSQL database entirely on AWS Fargate, leveraging the AWS Cloud Development Kit (CDK) for infrastructure as code. This solution is designed to facilitate contract testing between microservices by providing a centralized broker for storing and retrieving Pact contracts. The stack includes an ECS cluster, Fargate services for the Pact broker and PostgreSQL database, a CloudWatch Log Group for logs, and an S3 bucket for storing Pacts.
232+
233+
You can check out the repository [here](https://gitlab.com/learnautomatedtesting/servicevirtualizationandpact/) and see it in action against a [full worked example](https://gitlab.com/learnautomatedtesting/pactexample)
234+
235+
We've not had the chance to test this out yet, but if it appeals to you, please feel free to try it out and let the author know if you have any issues.
236+
237+
Chat to us in: [#pact-broker](https://pact-foundation.slack.com/archives/C9VPNUJR2).
238+
239+
240+
### Pact Ruby CLI
241+
242+
Pact-Ruby-CLI: Multi-Platform support + GitHub container registry support.
243+
244+
Multi-platform images are available
245+
246+
- `--platform=linux/amd64`
247+
- `--platform=linux/arm/v7`
248+
- `--platform=linux/arm64`
249+
250+
- [DockerHub Image](https://hub.docker.com/r/pactfoundation/pact-cli)
251+
252+
```sh
253+
docker pull pactfoundation/pact-cli:latest
254+
```
255+
256+
- [GitHub Container Registry Image](https://github.com/pact-foundation/pact-ruby-cli/pkgs/container/pact-cli)
257+
258+
```sh
259+
docker pull ghcr.io/pact-foundation/pact-cli:latest
260+
```
261+
- _Note:_ The Org name needs to match our GitHub org, so note the additional hyphen `-` between `pact-foundation`
262+
263+
Chat to us in: [#pact-ruby](https://pact-foundation.slack.com/archives/C9VHVEDE1).
264+
265+
### Pact Docs
266+
267+
[Martin Gallauner](https://github.com/MartinGallauner) is on his road to Pact Nirvana, and has been dropping some edits to the guide as he is working through it.
268+
269+
Thanks Martin, we really appreciate it and know that our end-users will to!
270+
271+
Did you know, that the majority of our website documentation was written by volunteers and it is a collective smattering of shared knowledge. A contract testing wikipedia if you will.
272+
273+
Whilst this is awesome, it can make a new users journey, a little disjointed at times, as they can feel overloaded with information.
274+
275+
We'd love to look at the documentation estate as a whole this year, and redesign our user journeys. If this appeals to you, why not get in touch.
276+
277+
## Community Events
278+
279+
### Women Who Go London Feb 2024
280+
281+
![image](https://github.com/pact-foundation/devrel/assets/19932401/85972fde-b5b6-42b3-8546-42795a95010b)
282+
283+
I had the pleasure of traveling down to London and speaking to a load of budding software-engineers at Deliveroo HQ about GoLang via the [Women Who Go London group](https://www.meetup.com/women-who-go-london/)!
284+
285+
> How do we test our applications now, what are the benefits and drawbacks of each way of testing and how does integration fit into all of it. Yousaf explains it all and provides examples on how to start contract testing with Go and Pact.
286+
287+
You can check out the slides [here](https://github.com/WWGLondon/talks/blob/main/2024_February/Yousaf_Nabi-Contract_testing_for_the_past_present_and_the_future_with_Pact-Go.pdf)
288+
289+
> Sanyia Saidova walks us through the journey of how to shape your platform to account for growth in your application - what decisions lay in your path as your userbase grows and how to weight them.
290+
291+
![IMG_5478](https://github.com/pact-foundation/devrel/assets/19932401/90abadbd-4628-4c55-9ef5-0b16291e371a)
292+
293+
You can check out Sanyia's slides [here](https://github.com/WWGLondon/talks/blob/main/2024_February/Sanyia_Saidova-Platforms_from_Prototype_to_Production.pdf)
294+
295+
Are you in, or near London? Do you love coding? Do you want to build a more diverse and inclusive Go community? Why not join us the [WWGL Meetup group](https://www.meetup.com/women-who-go-london/) and attend an event soon.
296+
297+
## Community shout-outs
298+
299+
Big shout outs go to these contributors for their efforts, big and small.
300+
301+
- [Tien Vo](https://github.com/tienvx) for his dedication and determination to complete the pact-php rust core migration, I'm sure it's been a learning journey and you've come out as an even better PHP developer. We hope you can take you learnings and apply in a day job, as many others will be able to apply your code against their projects, providing safety and guarantees for years to come.
302+
- [Lewis Cowles](https://github.com/Lewiscowles1986) for the continual reviews in pact-php and support for Tien Vo.
303+
- [Dany Marques](https://github.com/danymarques) for his tenacity in tracking down an obscure bug in the npm ecosystem, and creating upstream fixes, as well as resolving his issue in the interim in the pact-js project.
304+
- [Gearóid Ó Treasaig](https://github.com/gotreasa) for a series of PR's to improve the quality and health of our examples.
305+
- [learnautomatedtesting](https://github.com/learnautomatedtesting) for the Pact Broker AWS Fargate project and demo.
306+
- [Zac Poe](https://github.com/zac-poe-vg) for corporate proxy support in Pact-JS
307+
308+
No matter the contributions, your work will make a positive impact to end users, who wish to benefit for Pact's feature-set, no matter the language or the tooling. We love seeing users bring fixes, improvements and new features to the Pact stable. We can help support you, if you aren't sure where to start.
309+
310+
What's stopping you?
311+
312+
## Thats a wrap
313+
314+
Want to carry on the conversation? Sign up [here](https://slack.pact.io/) to join our Slack community, where you will be amongst over 5k other users. It's a safe place to ask questions, and a great place to share the awesome work you are doing in the Pact ecosystem.
315+
316+
Whatever you are up to, let us know, and we can look to get you featured in the Pact post.
317+
318+
See you next month folks!
319+
320+
Cheers,
321+
Saf

0 commit comments

Comments
 (0)