From 603469ae73a6d6d9c753f2d1dd931d29e65f2b4d Mon Sep 17 00:00:00 2001 From: Github Action Date: Wed, 23 Mar 2022 11:28:31 +0000 Subject: [PATCH 01/25] chore: "synced pact-js docs" --- .../implementation_guides/javascript/changelog.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/website/docs/implementation_guides/javascript/changelog.md b/website/docs/implementation_guides/javascript/changelog.md index d9ac6b0c..d5124e3b 100644 --- a/website/docs/implementation_guides/javascript/changelog.md +++ b/website/docs/implementation_guides/javascript/changelog.md @@ -6,6 +6,17 @@ custom_edit_url: https://github.com/pact-foundation/pact-js/edit/master/CHANGELO All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [9.17.3](https://github.com/pact-foundation/pact-js/compare/v9.17.2...v9.17.3) (2022-03-16) + + +### Fixes and Improvements + +* remove rust from v3 release build ([2a5f65b](https://github.com/pact-foundation/pact-js/commit/2a5f65bc7e8a48c7ee786905f78207cba7837110)) +* The table on README.md is corrupted and unreadable ([#832](https://github.com/pact-foundation/pact-js/issues/832)) ([b73fa05](https://github.com/pact-foundation/pact-js/commit/b73fa05a7f92ed81d225f6c68349d322d388656d)) +* throw an error when pact spec version is not set to 2 ([4186c22](https://github.com/pact-foundation/pact-js/commit/4186c22030cc3a7f2abb99c096d480c66f17f2a4)) +* upgrade to latest pact-node ([0d9b127](https://github.com/pact-foundation/pact-js/commit/0d9b1270d4dc03e761941ae060b2a75db0bab24d)) +* verifier req/res logging on debug ([#835](https://github.com/pact-foundation/pact-js/issues/835)) ([3edc5a0](https://github.com/pact-foundation/pact-js/commit/3edc5a035170fb28f74be6b908091e37093cad98)) + ### [9.17.2](https://github.com/pact-foundation/pact-js/compare/v9.17.1...v9.17.2) (2022-01-12) From ca1e281077a3f7192f0646928b136d11a84825b2 Mon Sep 17 00:00:00 2001 From: Github Action Date: Thu, 24 Mar 2022 02:57:14 +0000 Subject: [PATCH 02/25] chore: "synced pact-rust docs" --- .../implementation_guides/rust/pact_matching/changelog.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/website/docs/implementation_guides/rust/pact_matching/changelog.md b/website/docs/implementation_guides/rust/pact_matching/changelog.md index 17cdc270..a99bbcae 100644 --- a/website/docs/implementation_guides/rust/pact_matching/changelog.md +++ b/website/docs/implementation_guides/rust/pact_matching/changelog.md @@ -4,6 +4,10 @@ custom_edit_url: https://github.com/pact-foundation/pact-reference/edit/master/r --- +## 0.12.4 - Maintenance Release + +* 345b0011 - feat: support mock servers provided from plugins (Ronald Holshausen, Mon Mar 21 15:59:46 2022 +1100) + ## 0.12.3 - Maintenance Release * 5f148cdd - feat: capture all the output from the verifier (Ronald Holshausen, Thu Jan 27 16:08:02 2022 +1100) From 1f323ec85420df33b3164300d7417cff5271b175 Mon Sep 17 00:00:00 2001 From: Github Action Date: Thu, 24 Mar 2022 03:07:41 +0000 Subject: [PATCH 03/25] chore: "synced pact-rust docs" --- .../implementation_guides/rust/pact_mock_server/changelog.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/website/docs/implementation_guides/rust/pact_mock_server/changelog.md b/website/docs/implementation_guides/rust/pact_mock_server/changelog.md index e163c431..9ad6a0d8 100644 --- a/website/docs/implementation_guides/rust/pact_mock_server/changelog.md +++ b/website/docs/implementation_guides/rust/pact_mock_server/changelog.md @@ -4,6 +4,10 @@ custom_edit_url: https://github.com/pact-foundation/pact-reference/edit/master/r --- +## 0.8.8 - Maintenance Release + +* 345b0011 - feat: support mock servers provided from plugins (Ronald Holshausen, Mon Mar 21 15:59:46 2022 +1100) + ## 0.8.7 - Maintenance Release From 602dfffb81c3b68f02e58c0e149a7225846d1c2c Mon Sep 17 00:00:00 2001 From: Github Action Date: Thu, 24 Mar 2022 03:19:45 +0000 Subject: [PATCH 04/25] chore: "synced pact-rust docs" --- .../implementation_guides/rust/pact_verifier/changelog.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/website/docs/implementation_guides/rust/pact_verifier/changelog.md b/website/docs/implementation_guides/rust/pact_verifier/changelog.md index cf721cbc..c3fe5d70 100644 --- a/website/docs/implementation_guides/rust/pact_verifier/changelog.md +++ b/website/docs/implementation_guides/rust/pact_verifier/changelog.md @@ -4,6 +4,10 @@ custom_edit_url: https://github.com/pact-foundation/pact-reference/edit/master/r --- +## 0.13.3 - Maintenance Release + +* 345b0011 - feat: support mock servers provided from plugins (Ronald Holshausen, Mon Mar 21 15:59:46 2022 +1100) + ## 0.13.2 - Maintenance Release * f52c3625 - feat: add for custom headers to the HTTP client used by the verifier #182 (Ronald Holshausen, Mon Feb 28 14:38:00 2022 +1100) From 22fd7a99c3984786d479a8612e331bbb9297fdf8 Mon Sep 17 00:00:00 2001 From: Github Action Date: Thu, 24 Mar 2022 03:42:22 +0000 Subject: [PATCH 05/25] chore: "synced pact-rust docs" --- .../implementation_guides/rust/pact_verifier/changelog.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/website/docs/implementation_guides/rust/pact_verifier/changelog.md b/website/docs/implementation_guides/rust/pact_verifier/changelog.md index c3fe5d70..e63353a3 100644 --- a/website/docs/implementation_guides/rust/pact_verifier/changelog.md +++ b/website/docs/implementation_guides/rust/pact_verifier/changelog.md @@ -8,6 +8,10 @@ custom_edit_url: https://github.com/pact-foundation/pact-reference/edit/master/r * 345b0011 - feat: support mock servers provided from plugins (Ronald Holshausen, Mon Mar 21 15:59:46 2022 +1100) +## 0.13.3 - Maintenance Release + +* 345b0011 - feat: support mock servers provided from plugins (Ronald Holshausen, Mon Mar 21 15:59:46 2022 +1100) + ## 0.13.2 - Maintenance Release * f52c3625 - feat: add for custom headers to the HTTP client used by the verifier #182 (Ronald Holshausen, Mon Feb 28 14:38:00 2022 +1100) From d8d553b7a2fc651f7393a9f9dc7957cf2b5972a2 Mon Sep 17 00:00:00 2001 From: Github Action Date: Thu, 24 Mar 2022 03:52:45 +0000 Subject: [PATCH 06/25] chore: "synced pact-rust docs" --- .../implementation_guides/rust/pact_verifier/changelog.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/website/docs/implementation_guides/rust/pact_verifier/changelog.md b/website/docs/implementation_guides/rust/pact_verifier/changelog.md index e63353a3..c3fe5d70 100644 --- a/website/docs/implementation_guides/rust/pact_verifier/changelog.md +++ b/website/docs/implementation_guides/rust/pact_verifier/changelog.md @@ -8,10 +8,6 @@ custom_edit_url: https://github.com/pact-foundation/pact-reference/edit/master/r * 345b0011 - feat: support mock servers provided from plugins (Ronald Holshausen, Mon Mar 21 15:59:46 2022 +1100) -## 0.13.3 - Maintenance Release - -* 345b0011 - feat: support mock servers provided from plugins (Ronald Holshausen, Mon Mar 21 15:59:46 2022 +1100) - ## 0.13.2 - Maintenance Release * f52c3625 - feat: add for custom headers to the HTTP client used by the verifier #182 (Ronald Holshausen, Mon Feb 28 14:38:00 2022 +1100) From 815a435028563f983679ee32603d5acb14a75fe8 Mon Sep 17 00:00:00 2001 From: Github Action Date: Thu, 24 Mar 2022 04:15:50 +0000 Subject: [PATCH 07/25] chore: "synced pact-rust docs" --- .../implementation_guides/rust/pact_consumer/changelog.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/website/docs/implementation_guides/rust/pact_consumer/changelog.md b/website/docs/implementation_guides/rust/pact_consumer/changelog.md index ac8b777d..43716759 100644 --- a/website/docs/implementation_guides/rust/pact_consumer/changelog.md +++ b/website/docs/implementation_guides/rust/pact_consumer/changelog.md @@ -4,6 +4,10 @@ custom_edit_url: https://github.com/pact-foundation/pact-reference/edit/master/r --- +## 0.9.0 - Supports mock servers from plugins + +* 345b0011 - feat: support mock servers provided from plugins (Ronald Holshausen, Mon Mar 21 15:59:46 2022 +1100) + ## 0.8.6 - Maintenance Release From 7f004b3856300b86a65e90f23dcae8671de27bdf Mon Sep 17 00:00:00 2001 From: Yousaf Nabi Date: Fri, 25 Mar 2022 11:29:30 +0000 Subject: [PATCH 08/25] docs: update pact-support@googlegroups.com to pact-foundation (#124) --- website/docs/contributing/code-of-conduct.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/contributing/code-of-conduct.md b/website/docs/contributing/code-of-conduct.md index c93bf2e9..8f1b2fa0 100644 --- a/website/docs/contributing/code-of-conduct.md +++ b/website/docs/contributing/code-of-conduct.md @@ -57,7 +57,7 @@ further defined and clarified by project maintainers. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project team at pact-support@googlegroups.com. All +reported by contacting the project team at pact-foundation@googlegroups.com. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. From 6c4b1acf6ef7af98516a6e8e5731df7c963f33db Mon Sep 17 00:00:00 2001 From: Yousaf Nabi Date: Tue, 22 Mar 2022 11:24:50 +0000 Subject: [PATCH 09/25] fix: correct broken links and fail build on further broken links --- .../docs/getting_started/provider_verification.md | 4 ++-- website/docs/pact_broker.md | 2 +- website/docs/pact_broker/advanced_topics/api_docs.md | 10 +++++----- .../docs/pact_broker/webhooks/debugging_webhooks.md | 2 +- website/docs/recipes.md | 12 ++++++------ website/docusaurus.config.js | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/website/docs/getting_started/provider_verification.md b/website/docs/getting_started/provider_verification.md index 2a0ced30..6cfc8d1f 100644 --- a/website/docs/getting_started/provider_verification.md +++ b/website/docs/getting_started/provider_verification.md @@ -12,7 +12,7 @@ Need to know what Pact provider verification is? Check out the provider verifica Already know what provider verification is, but need help coding it up? Here are the links to the relevant provider documentation for our most popular languages. -* [Pact JVM](/implementation_guides/jvm/provider_menu) (select your JVM testing library from the menu) +* [Pact JVM](/implementation_guides/jvm/provider) (select your JVM testing library from the menu) * [Pact JS](/implementation_guides/javascript/readme#provider-api-testing) * [Pact Net](/implementation_guides/net/readme#service-provider) * [Pact Go](/implementation_guides/go/readme#provider-api-testing) @@ -21,7 +21,7 @@ Already know what provider verification is, but need help coding it up? Here are * [Pact Rust](/implementation_guides/rust/pact_verifier_cli) * [Pact PHP](https://github.com/pact-foundation/pact-php/#basic-provider-usage) -Can't see your language listed above? Go to the [Pact Docs](/implementation_guides/) page and double check to see if your language is supported. If it's not, you can use the language agnostic [Provider Verifier CLI](/implementation_guides/cli#provider-verifier). +Can't see your language listed above? Go to the [Pact Docs](/implementation_guides/cli) page and double check to see if your language is supported. If it's not, you can use the language agnostic [Provider Verifier CLI](/implementation_guides/cli#provider-verifier). ## What do I do next? diff --git a/website/docs/pact_broker.md b/website/docs/pact_broker.md index 87f51f50..3cf29243 100644 --- a/website/docs/pact_broker.md +++ b/website/docs/pact_broker.md @@ -153,7 +153,7 @@ You can use the [Pact Broker Docker image](https://hub.docker.com/r/pactfoundati \` * Please ensure you use `encoding: 'utf8'` in your Sequel options to avoid encoding issues. -* For production usage, use a web application server like [Phusion Passenger](https://www.phusionpassenger.com) or [Nginx](http://nginx.org/) to serve the Pact Broker application. You'll need to read up on the documentation for these yourself as it is beyond the scope of this documentation. See the [wiki](/pact_broker/configuration#running-the-broker-behind-a-reverse-proxy) for instructions on using a reverse proxy with SSL. +* For production usage, use a web application server like [Phusion Passenger](https://www.phusionpassenger.com) or [Nginx](http://nginx.org/) to serve the Pact Broker application. You'll need to read up on the documentation for these yourself as it is beyond the scope of this documentation. See the [wiki](/pact_broker/configuration/features#running-the-broker-behind-a-reverse-proxy) for instructions on using a reverse proxy with SSL. * Ensure the environment variable `RACK_ENV` is set to `production`. * Deploy to your location of choice. diff --git a/website/docs/pact_broker/advanced_topics/api_docs.md b/website/docs/pact_broker/advanced_topics/api_docs.md index 6b766753..a93f6e67 100644 --- a/website/docs/pact_broker/advanced_topics/api_docs.md +++ b/website/docs/pact_broker/advanced_topics/api_docs.md @@ -8,9 +8,9 @@ For an up-to-date list of all the API resources, view the actual code [here](htt _Key resources:_ -* [Publishing pacts](./publish_pact) -* [Publishing verification results](./publish_verification_result) -* [Webhooks](./webhooks) -* [Pacticipants](./pacticipant) -* [Pact diff](./pact_diff) +* [Publishing pacts](./api_docs/publish_pact) +* [Publishing verification results](./api_docs/publish_verification_result) +* [Webhooks](./api_docs/webhooks) +* [Pacticipants](./api_docs/pacticipant/) +* [Pact diff](./api_docs/pact_diff/) diff --git a/website/docs/pact_broker/webhooks/debugging_webhooks.md b/website/docs/pact_broker/webhooks/debugging_webhooks.md index 4fc1c09d..05c1ab10 100644 --- a/website/docs/pact_broker/webhooks/debugging_webhooks.md +++ b/website/docs/pact_broker/webhooks/debugging_webhooks.md @@ -49,6 +49,6 @@ The properties section will tell you how many of the webhooks succeeded for the The Embedded Resources section will give you links to the execution logs. -By default, for security purposes, the execution logs will be hidden. You will need to configure the whitelist to see the logs. If you are using one of the [Docker images](/pact_broker/docker_images) you can configure the whitelist via environment variables, documented [here](/pact_broker/docker_images/dius#webhook-whitelists). The documentation that explains how the whitelists work is [here](/pact_broker/configuration#webhook-whitelists) (note that the example code shows how to configure the underlying Ruby application, however, if you are using a Docker image, you need to use the environment variables in the first link). +By default, for security purposes, the execution logs will be hidden. You will need to configure the whitelist to see the logs. If you are using one of the [Docker images](/pact_broker/docker_images) you can configure the whitelist via environment variables, documented [here](/pact_broker/docker_images/dius#webhook-whitelists). The documentation that explains how the whitelists work is [here](/pact_broker/configuration/features#webhook-whitelists) (note that the example code shows how to configure the underlying Ruby application, however, if you are using a Docker image, you need to use the environment variables in the first link). If you see no evidence of any attempted executions, look in the application logs. For every pact publication, there are detailed logs that explain why a webhook is/isn't fired for a particular publication. See [Identifying why a webhook did or did not get triggered](#identifying-why-a-webhook-did-or-did-not-get-triggered) diff --git a/website/docs/recipes.md b/website/docs/recipes.md index cd38f672..0620bf04 100644 --- a/website/docs/recipes.md +++ b/website/docs/recipes.md @@ -8,13 +8,13 @@ Recipes and pre-built integrations to test common scenarios in Pact | Recipe/Integration | Description | | ------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------- | -| [GraphQL](graphql) | Strategies for testing GraphQL endpoints (example with Apollo) | -| [API Gateway](apigateway) | Strategies for dealing with API Gateways, such as AWS API Gateway, Kong etc. | -| [Lambda/FaaS (Asynchronous)](recipes/lambdaasync) | How to write contract tests for asynchronous lambda functions / FaaS | -| [Lambda (HTTP)](lambdahttp) | How to write contract tests for HTTP based lambdas with AWS SAM | -| [Cypress](cypress) | Best practices for integrating Pact with Cypress, and converting your cypress `cy.route()` / `cy.intercept()` calls into pact files | +| [GraphQL](/recipes/graphql) | Strategies for testing GraphQL endpoints (example with Apollo) | +| [API Gateway](/recipes/apigateway) | Strategies for dealing with API Gateways, such as AWS API Gateway, Kong etc. | +| [Lambda/FaaS (Asynchronous)](/recipes/lambdaasync) | How to write contract tests for asynchronous lambda functions / FaaS | +| [Lambda (HTTP)](/recipes/lambdahttp) | How to write contract tests for HTTP based lambdas with AWS SAM | +| [Cypress](/recipes/cypress) | Best practices for integrating Pact with Cypress, and converting your cypress `cy.route()` / `cy.intercept()` calls into pact files | | [MSW](https://github.com/you54f/msw-pact) | Library for integrating MSW with Pact | | [NestJS](https://github.com/omermorad/nestjs-pact) | Library for integrating Pact with NestJS | -| [Kafka](kafka) | How to test Kafka messages with Pact | +| [Kafka](/recipes/kafka) | How to test Kafka messages with Pact | | [Jest](https://github.com/pact-foundation/jest-pact) | A Pact adaptor for to allow you to easily run tests with Jest | | [Mocha](https://github.com/pact-foundation/mocha-pact) | A Pact adaptor for to allow you to easily run tests with Mocha | diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index 5ce029e3..9f663ea0 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -69,7 +69,7 @@ const siteConfig = { tagline: "Test your integrations quickly. Deploy your apps safely.", url: "https://docs.pact.io", // Your website URL baseUrl: "/", - onBrokenLinks: "warn", + onBrokenLinks: "error", // Fail the build on broken links customFields: { users: users, }, From 2b31a53f453f7c4805d5ab28c7586ca4134866e3 Mon Sep 17 00:00:00 2001 From: Yousaf Nabi Date: Tue, 22 Mar 2022 11:55:20 +0000 Subject: [PATCH 10/25] chore: add blog posts from http://blog.pact.io/ --- ...ng-pact-verification-statuses-to-github.md | 64 +++++++++++ ...18-24-07-contract-testing-a-graphql-api.md | 101 ++++++++++++++++++ ...uncing-pactflow-our-managed-pact-broker.md | 18 ++++ ...support-added-to-pact-ruby-js-go-dotnet.md | 14 +++ ...omatic-data-clean-up-in-the-pact-broker.md | 14 +++ ...-biggest-problem-with-the-pact-workflow.md | 67 ++++++++++++ .../blog/2020-24-02-introducing-wip-pacts.md | 42 ++++++++ 7 files changed, 320 insertions(+) create mode 100644 website/blog/2018-10-18-publishing-pact-verification-statuses-to-github.md create mode 100644 website/blog/2018-24-07-contract-testing-a-graphql-api.md create mode 100644 website/blog/2019-01-05-announcing-pactflow-our-managed-pact-broker.md create mode 100644 website/blog/2019-29-05-v3-provider-state-support-added-to-pact-ruby-js-go-dotnet.md create mode 100644 website/blog/2020-11-03-automatic-data-clean-up-in-the-pact-broker.md create mode 100644 website/blog/2020-24-02-how-weve-fixed-the-biggest-problem-with-the-pact-workflow.md create mode 100644 website/blog/2020-24-02-introducing-wip-pacts.md diff --git a/website/blog/2018-10-18-publishing-pact-verification-statuses-to-github.md b/website/blog/2018-10-18-publishing-pact-verification-statuses-to-github.md new file mode 100644 index 00000000..7318b13b --- /dev/null +++ b/website/blog/2018-10-18-publishing-pact-verification-statuses-to-github.md @@ -0,0 +1,64 @@ +--- +title: Publishing Pact verification statuses to Github +author: Beth Skurrie +authorURL: http://twitter.com/bethesque +tags: [verification] +keywords: [verification] +date: 2018-10-18 +draft: false +hide_table_of_contents: true +--- + +If you're using Travis CI, Code Climate, or one of many other CI tools with Github, you've probably noticed the little checklist of items that shows just above the "merge" button when you open a pull request. + +![commit-statuses](https://s3-ap-southeast-2.amazonaws.com/blog-pact-io/2018/07/commit-statuses.png) + +These are called commit "statuses", and there is a [Github API][github-api] for reporting these (Gitlab also has a similar [API][gitlab-api]). If you are using a git sha for the [consumer version number][pacticipant-version-numbers] when you publish your pacts, you can now use Pact Broker webhooks to report the verification statuses of your pacts back to Github. + +To do this, open up your Pact Broker API Browser, and click on the `NON-GET` button next to the `pb:webhooks` relation. Modify the JSON below to match your consumer, repository and Github auth details (we recommend you make a separate [token][github-token] for this purpose with the `repo:status` grant), and click `Make Request`. + +```json +{ + "consumer": { + "name": "" + }, + "events": [ + { + "name": "contract_published" + }, + { + "name": "provider_verification_published" + } + ], + "request": { + "method": "POST", + "url": "https://api.github.com/repos///statuses/${pactbroker.consumerVersionNumber}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "state": "${pactbroker.githubVerificationStatus}", + "description": "Pact Verification Tests ${pactbroker.providerVersionTags}", + "context": "${pactbroker.providerName}", + "target_url": "${pactbroker.verificationResultUrl}" + }, + "username": "USERNAME", + "password": "PASSWORD" + } +} + +``` + +If all your consumer names match their repository names in Github, you can make this a global webhook by removing the `consumer` node, and replacing the hardcoded `` name in the URL with the parameter `${pactbroker.consumerName}`. + +Want to use this cool feature? You'll need version [2.47.1][pact-broker-release] or later of the Pact Broker. + +Check out the [webhook template library][webhook-template-library] for more handy webhooks. + +[gitlab-api]: https://docs.gitlab.com/ee/api/commits.html#post-the-build-status-to-a-commit +[github-api]: https://developer.github.com/v3/repos/statuses/ +[pacticipant-version-numbers]: https://github.com/pact-foundation/pact_broker/wiki/Pacticipant-version-numbers +[github-token]: https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/ +[pact-broker-release]: https://github.com/pact-foundation/pact_broker/releases/tag/v2.47.1 +[webhook-template-library]: https://github.com/pact-foundation/pact_broker/wiki/Webhook-template-library + diff --git a/website/blog/2018-24-07-contract-testing-a-graphql-api.md b/website/blog/2018-24-07-contract-testing-a-graphql-api.md new file mode 100644 index 00000000..249f3293 --- /dev/null +++ b/website/blog/2018-24-07-contract-testing-a-graphql-api.md @@ -0,0 +1,101 @@ +--- +title: Contract testing a GraphQL API +author: Matt Fellows +authorURL: https://twitter.com/matthewfellows +tags: [GraphQL] +keywords: [GraphQL] +date: 2018-24-07 +draft: false +hide_table_of_contents: true +--- + +> REST is dead, long live REST + +GraphQL is being hailed by many as the _new REST_ - it has type safety, a neat DSL and a great ecosystem. Perhaps best of all, it focuses on the needs of the client; consumers get the data they want, in the shape they want it - nothing more and nothing less. + +I can now fetch data from my [BFF](https://samnewman.io/patterns/architectural/bff/) via my React Component with caching, error handling and state management all taken care of for me, just like so: + +```js +import { Query } from "react-apollo"; +import gql from "graphql-tag"; + +const ExchangeRates = () => ( + + {({ loading, error, data }) => { + if (loading) return

Loading...

; + if (error) return

Error :(

; + + return data.rates.map(({ currency, rate }) => ( +
+

{`${currency}: ${rate}`}

+
+ )); + }} +
+); +``` + +For some, however, this ability to define a schema and even [generate client code](https://github.com/apollographql/apollo-cli#apollo-codegengenerate-output), harkens back to the [brittle and dark ages of WSDL](http://greglturnquist.com/2017/05/23/power-rest-part-1/), whereby clients are tightly coupled to their API implementation. + +Can we have our cake and it it too? + + + +

 

+ +If you look under the covers, it turns out GraphQL is actually just a simple abstraction over REST, which means we can still test GraphQL as we do with regular RESTful APIs - including using contract testing! 🙌 + +GraphQL (mostly) follows just a few simple rules: + +1. Requests are made via an `HTTP POST` +2. GraphQL queries are sent as stringified JSON contained within a `query` property of the request +3. The response body is wrapped in the `data` sub-property, namespaced by the operation (Query or Mutation) that is being called, alongside any `errors` for the operation. + +Read more about the GraphQL specification [here](https://graphql.org/learn/queries/) + +Constructing a basic cURL for a simplistic `hello` operation looks something like this: + +```sh +curl -X POST \ + -H 'content-type: application/json' \ + -d '{ "query": "{ hello }" }' \ + http://someapi/api +``` + +Whilst you can create this request using the usual Pact DSL, in our latest version of [Pact JS](https://github.com/pact-foundation/pact-js/tree/6.x.x/) (`6.x.x` or `@prerelease`) we have even created a `GraphQLInteraction` interface to simplify creating the expectations - including [variables](https://graphql.org/learn/queries/#variables) support and matching rules: + +```js + const graphqlQuery = new GraphQLInteraction() + .uponReceiving("a hello request") + .withQuery(`{ hello(person: $person }`) + .withRequest({ + path: "/graphql", + method: "POST", + }) + .withVariables({ + person: "Sally", + }) + .willRespondWith({ + status: 200, + headers: { + "Content-Type": "application/json; charset=utf-8", + }, + body: { + data: { + hello: like("Hello Sally"), + }, + }, + }); +``` + +So there it is, Pact + GraphQL: a match made in heaven. + \ No newline at end of file diff --git a/website/blog/2019-01-05-announcing-pactflow-our-managed-pact-broker.md b/website/blog/2019-01-05-announcing-pactflow-our-managed-pact-broker.md new file mode 100644 index 00000000..00210f36 --- /dev/null +++ b/website/blog/2019-01-05-announcing-pactflow-our-managed-pact-broker.md @@ -0,0 +1,18 @@ +--- +title: Announcing Pactflow - our managed Pact Broker +author: Matt Fellows +authorURL: https://twitter.com/matthewfellows +tags: [Pactflow] +keywords: [Pactflow] +date: 2019-01-05 +draft: false +hide_table_of_contents: true +--- + +If you use Pact and would like to support us in realising our vision of transforming the way teams test and release distributed systems, we have recently released [Pactflow](http://pactflow.io) - our fully managed Pact Broker with additional features to simplify teams getting started and scaling with Pact and contract testing. + +Read our [launch announcement](https://blog.pactflow.io/pactflow-continuous-delivery-for-microservices/) for more background as to why and how this all came about. It's just the start, but we're really excited about the future. + +If you're hosting your own broker, or are looking to set one up, you can get started quickly and for free on our [Developer Plan](https://pactflow.io/pricing/). + +We hope to see you soon! \ No newline at end of file diff --git a/website/blog/2019-29-05-v3-provider-state-support-added-to-pact-ruby-js-go-dotnet.md b/website/blog/2019-29-05-v3-provider-state-support-added-to-pact-ruby-js-go-dotnet.md new file mode 100644 index 00000000..93822349 --- /dev/null +++ b/website/blog/2019-29-05-v3-provider-state-support-added-to-pact-ruby-js-go-dotnet.md @@ -0,0 +1,14 @@ +--- +title: v3 Provider state support added to Pact Ruby, JS, Go, .NET +author: Beth Skurrie +authorURL: https://twitter.com/bethskurrie +tags: [ruby,js,go,.net,v3,pact] +keywords: [ruby,js,go,.net,v3,pact] +date: 2019-29-05 +draft: false +hide_table_of_contents: true +--- + +While full Pact specification v3 support is still a while off, you can now verify pacts that use [multiple provider states and provider state params](https://github.com/pact-foundation/pact-specification/tree/version-3#allow-multiple-provider-states-with-parameters) from the v3 compliant implementations (eg. JVM and Rust) + +The provider state setup url will be called once for each provider state. diff --git a/website/blog/2020-11-03-automatic-data-clean-up-in-the-pact-broker.md b/website/blog/2020-11-03-automatic-data-clean-up-in-the-pact-broker.md new file mode 100644 index 00000000..f802eabb --- /dev/null +++ b/website/blog/2020-11-03-automatic-data-clean-up-in-the-pact-broker.md @@ -0,0 +1,14 @@ +--- +title: Automatic data clean up in the Pact Broker +author: Beth Skurrie +authorURL: https://twitter.com/bethskurrie +tags: [pact] +keywords: [pact] +date: 2020-11-03 +draft: false +hide_table_of_contents: true +--- + +When a Pact Broker instance has accumulated large amounts of data, its performance can start to degrade. A new feature has been released in the Pact Foundation's Pact Broker Docker image to allow old, unused data to be removed automatically from the Pact Broker at a configured schedule. +The clean up can either run on a cron schedule from the Pact Broker application container, or it can be executed from an external location, independent of the running instance. +Read more about the clean feature in the [Maintenance section of our Pact Broker docs.](https://docs.pact.io/pact_broker/administration/maintenance/) \ No newline at end of file diff --git a/website/blog/2020-24-02-how-weve-fixed-the-biggest-problem-with-the-pact-workflow.md b/website/blog/2020-24-02-how-weve-fixed-the-biggest-problem-with-the-pact-workflow.md new file mode 100644 index 00000000..a5738566 --- /dev/null +++ b/website/blog/2020-24-02-how-weve-fixed-the-biggest-problem-with-the-pact-workflow.md @@ -0,0 +1,67 @@ +--- +title: How we've fixed the biggest problem with the Pact workflow +author: Beth Skurrie +authorURL: https://twitter.com/bethskurrie +tags: [pact] +keywords: [pact] +date: 2020-24-03 +draft: false +hide_table_of_contents: true +--- + + +### tl;dr +Changes to the contract made by the consumer teams can no longer break the provider builds. Hooray! + +Read on for the longer version... +# The problem + +Pact is a consumer driven contract testing tool that allows you to test your integration points without dependencies. The consumer is tested with a mock provider, and a contract ("pact") is generated from the tests. The contract is taken over to the provider and then "verified" to make sure that the real provider and the mock provider behave the same way. + +During the verification step, each request from the contract is replayed against a running test instance of the provider, and the responses are compared to the expected responses. If they match, the verification is successful. If they do not match, the verification has failed, and the provider build fails. + +In the context of an existing contract, there are two reasons that the pact verification step can fail when it was previously passing. + +1. The provider has changed. +2. The contract (consumer expectations) has changed. + +In scenario 1, we actually want the provider build to fail, as this is the purpose of contract testing - it prevents breaking changes being made by the provider for existing consumers. + +In scenario 2 however, when the contract has changed, the failure of the provider build is an undesirable consequence of the workflow. The contract may have changed due to the teams following the "consumer driven" nature of the process whereby the expectations come before the implementation (TDD for services); there may be an issue with the provider state data; or there may just be incorrect expectations about existing behaviour. + +The fact that the provider build can be broken by new or incorrect expectations in the contract (which is effectively written by the consumer team) is one of the biggest problems people have with Pact. It leads to contention between teams, and in some cases, stops teams using Pact at all. + +One solution could be to run all pact verification builds in such a way as to ignore any failures that might occur, but then we'd miss being alerted to potentially breaking changes by the provider, which defeats the purpose of using contracts in the first place. + +What we want is a way to get feedback on changed contracts without breaking the provider build, but for the build to correctly identify and fail when a provider is making a breaking change. +# The solution +The Pact team is extremely happy to introduce the new "pending pacts" feature. + +Those familiar with automated testing frameworks have probably come across the term "pending" tests. These are tests that have a particular flag on them that causes them (depending on the framework) to either be skipped, or if executed, to not fail the build. In the case of Pact, we want the feedback we get from execution, so rather than a "pending pact" being one which will be skipped, it is one which can be verified without its failure causing the overall verification task to fail. + +So how does the Pact verification tool know if a pact is in "pending" state or not? This is where the Pact Broker comes in. The Pact Broker is a service that sits between the consumer and provider builds, and allows the contracts and verification results to be exchanged between the consumer and provider teams. The Pact Broker can identify when a contract with new content has been published, and when it is retrieved for verification by the provider's Pact library, it flags it as "pending". The Pact library executes the verification, ensuring that the status of the overall task is not affected by any failures. At the end of the verification process, the outcome of the verification is published back to the Pact Broker. Once the pact has been successfully verified it ceases to be "pending". This means that any subsequent verification failures for a pact with identical content will cause the provider build to fail, as the failure can now only be due to a change in the provider code. +# How do I start using pending pacts? + +Head to https://docs.pact.io/pending for information on how to setup your Pact Broker to enable this feature (it is enabled by default on https://pactflow.io). + +To start getting the benefit of this new and improved workflow, you will need to upgrade to the latest version of the Pact Broker and your Pact testing libraries. Consult the documentation for your language to find out how to enable the `pending` feature. + +If you're on a consumer team, and have, until now, relied on the provider team to alert you to verification failures, you'll want to make sure that you're getting this information via another channel now. We recommend that you use [can-i-deploy][can-i-deploy] to make sure that you aren't deploying with a broken contract, and that you set up [webhooks][webhooks] to ensure you're made aware of the verification outcomes of your contracts as soon as possible (eg. posting to a team's [Slack][slack] channel, or updating a [Github commit status][github].) + +### A note for advanced Pact Broker users + +If you're not using tags in the Pact Broker you can skip this section! But take the time you've saved reading the next paragraph, and spend it reading up on [tags][tags] because if you're not using them, you're probably not getting the full benefit out of your Pact Broker. + +Tag users - the "pending" status is calculated using the provider version tag(s) that will be published with your verification results. The provider tags are sent to the Pact Broker when retriving the list of pacts to verify, and are used to determine the pending status for each pact returned. For example, once you have successfully verified a pact with a version of the provider tagged as `feat-x`, then pacts with the same content will be non-pending for any subsequent verifications by a `feat-x` version. However, the same pact could still be in "pending" state for the `master`. + +Why is this important? It means that if you're using a feature branch tagged `feat-x` on your provider to implement a new interaction, the pact will remain pending on your `master` branch even after it passes verification on the `feat-x` branch. It will only become non-pending on `master` once the feature branch has been merged in, and the pact has passed verification on the merged code. +# Conclusion +We're pretty excited about this new workflow, and we hope it will help make your experience testing with Pact a smoother and happier one. Let us know how you find it on the [Pact Foundation Slack][pact-foundation-slack] (join [here][join]). + +[tags]: https://docs.pact.io/best_practices/pact_nirvana#5-allow-contracts-to-change-without-breaking-your-builds +[webhooks]: https://docs.pact.io/pact_broker/advanced_topics/webhooks +[github]: http://blog.pact.io/2018/07/16/publishing-pact-verification-statuses-to-github/ +[slack]: https://github.com/pact-foundation/pact_broker/wiki/Webhook-template-library#slack---post-notification +[pact-foundation-slack]: https://pact-foundation.slack.com +[join]: https://slack.pact.io +[can-i-deploy]: https://docs.pact.io/pact_broker/can_i_deploy diff --git a/website/blog/2020-24-02-introducing-wip-pacts.md b/website/blog/2020-24-02-introducing-wip-pacts.md new file mode 100644 index 00000000..294ad39f --- /dev/null +++ b/website/blog/2020-24-02-introducing-wip-pacts.md @@ -0,0 +1,42 @@ +--- +title: Introducing WIP Pacts +author: Beth Skurrie +authorURL: https://twitter.com/bethskurrie +tags: [pact] +keywords: [pact] +date: 2020-24-02 +draft: false +hide_table_of_contents: true +--- + +# The problem + +When following the "consumer driven" workflow, often the contract will change to express the desired functionality before the implementation exists in the provider. This means that when the changed pact is verified against the provider, the verification step fails, and until recently, this meant that the provider's build would also fail. (This has been fixed with the release of the [pending pacts][pending-pacts] feature.) The recommended approach to avoid breaking the provider's build is to use "tags" to distinguish between the "safe" contracts and the changed contracts (tags are metadata that get applied to the application version resource in the Pact Broker that can be used to identify which branch or stage the version belongs to eg. `master`, `feat/foo` or `prod`). By making changes to the pact on a branch of the consumer (eg `feat/foo`) and publishing it with a matching tag, a provider that was configured to verify `master` pacts would not have its build broken. + +For the consumer to get a verification result for the `feat/foo` pact, however, manual action was required from the provider team. They would need to add the `feat/foo` pact to the list of pacts to verify, generally on a feature branch of their own to avoid breaking the master build. There was no automated workflow to include the newly changed pacts in the provider's list of pacts to verify. + +# The solution +To solve this problem, we've introduced the concept of "WIP" (work in progress) pacts. "WIP pacts" is built on top of the recently released [pending pacts][pending-pacts] feature which allows changed pacts to be verified without failing the build. Previously, during a verification step, only the pacts for the configured tags (eg `master` and `prod`) would be verified. With the WIP pacts feature enabled, *all pacts that are the latest for their tag that have not yet been successfully verified* will now also be automatically verified - in pending mode. This allows consumers to get feedback on whether or not their changed pacts are valid, without the provider team having to take action, and without breaking the provider build. + +Let's walk through an example. Imagine FooApp and BarAPI have a pact. BarAPI is configured to verify the `master` and `prod` pacts for FooApp during its verification step. When it publishes the verification results, its own application version is tagged with the branch name. We'll just consider the builds that run on the BarAPI `master` branch for now. + +FooApp creates a branch called `feat/x`, makes a change to the contract, and then publishes it with the `feat/x` tag. When the BarAPI build executes, it runs the verification task for the configured `master` and `prod` pacts as normal, but it also now verifies the `feat/x` pact *in pending mode*, and publishes the results back to the broker. Publishing the failed results allows the consumer team gets the feedback for `feat/x` pact, and the fact that it runs in pending mode means that even though the `feat/x` pact fails verification, the BarAPI build remains green. + +A few days later, the BarAPI team implements the changes required for the `feat/x` pact. During the BarAPI CI build, `master`, `prod` and `feat/x` pacts are verified and the results published, but this time, the verification of the `feat/x` pact passes. The Pact Broker now knows that the `master` branch of the provider supports the `feat/x` contract, and from then on *it ceases to be a WIP pact* for `master` BarAPI versions. The next time the BarAPI build runs, it will not include the `feat/x` pact. + +Now the action is on the consumer team to merge the `feat/x` branch into their own `master` branch. Using [webhooks that update the Git commit status][git-status] or posting to a Slack channel is a good way to notify the consumer team that their pact is now green. + +# A note for advanced Pact Broker users + +As noted in the blog on the [pending pacts][pending-pacts] feature, the pending status is calculated based on the tags that will be applied to the provider version when the verification results are published. This means that a pact that has been successfully verified by the `feat/bar` branch of your provider, but not `master`, will still be included in the "work in progress" pacts for `master` builds, but not for `feat/bar` builds. + +# How do I start using WIP pacts? + +Head to https://docs.pact.io/wip for information on how to setup your Pact Broker (it is enabled by default on https://pactflow.io) + +To start getting the benefit of this new and improved workflow, you will need to upgrade to the latest version of the Pact Broker and your Pact testing libraries. Consult the documentation for your language to find out how to enable the WIP pacts feature. + + +[pending-pacts]: http://blog.pact.io/2020/02/24/how-we-have-fixed-the-biggest-problem-with-the-pact-workflow/ +[git-status]: http://blog.pact.io/2018/07/16/publishing-pact-verification-statuses-to-github/ +[join-slack]: https://slack.pact.io From a0b08347134a2062d8cf9fbd9617698d16f8ddfa Mon Sep 17 00:00:00 2001 From: Github Action Date: Mon, 28 Mar 2022 03:54:22 +0000 Subject: [PATCH 11/25] chore: "synced pact_broker docs" --- .../pact_broker/configuration/settings.md | 164 +++++++++++------- 1 file changed, 98 insertions(+), 66 deletions(-) diff --git a/website/docs/pact_broker/configuration/settings.md b/website/docs/pact_broker/configuration/settings.md index 3175277c..afcb4650 100644 --- a/website/docs/pact_broker/configuration/settings.md +++ b/website/docs/pact_broker/configuration/settings.md @@ -23,8 +23,8 @@ variable `PACT_BROKER_CONF` to the full path to the configuration file. The application log level -**YAML configuration key name:** `log_level`
**Environment variable name:** `PACT_BROKER_LOG_LEVEL`
+**YAML configuration key name:** `log_level`
**Default:** `info`
**Allowed values:** `debug`, `info`, `warn`, `error`, `fatal`
@@ -32,8 +32,8 @@ The application log level The application log format. Can be any value supported by Semantic Logger. -**YAML configuration key name:** `log_format`
**Environment variable name:** `PACT_BROKER_LOG_FORMAT`
+**YAML configuration key name:** `log_format`
**Default:** `default`
**Allowed values:** `default`, `json`, `color`
**More information:** https://github.com/rocketjob/semantic_logger/tree/master/lib/semantic_logger/formatters
@@ -42,8 +42,8 @@ The application log format. Can be any value supported by Semantic Logger. The log file directory -**YAML configuration key name:** `log_dir`
**Environment variable name:** `PACT_BROKER_LOG_DIR`
+**YAML configuration key name:** `log_dir`
**Default:** `./logs`
### log_stream @@ -52,8 +52,8 @@ The stream to which the logs will be sent. While the default is `file` for the Ruby application, it is set to `stdout` on the supported Docker images. -**YAML configuration key name:** `log_stream`
**Environment variable name:** `PACT_BROKER_LOG_STREAM`
+**YAML configuration key name:** `log_stream`
**Default:** `file`
**Allowed values:** `stdout`, `file`
@@ -61,8 +61,8 @@ While the default is `file` for the Ruby application, it is set to `stdout` on t Set to `true` to hide the messages in the logs about Pactflow -**YAML configuration key name:** `hide_pactflow_messages`
**Environment variable name:** `PACT_BROKER_HIDE_PACTFLOW_MESSAGES`
+**YAML configuration key name:** `hide_pactflow_messages`
**Default:** `true`
**Allowed values:** `true`, `false`
**More information:** https://pactflow.io
@@ -81,8 +81,8 @@ The database adapter. For production use, Postgres must be used. For investigations/spikes on a development machine, you can use SQlite. It is not supported as a production database, as it does not support concurrent requests. -**YAML configuration key name:** `database_adapter`
**Environment variable name:** `PACT_BROKER_DATABASE_ADAPTER`
+**YAML configuration key name:** `database_adapter`
**Default:** `postgres`
**Allowed values:** `postgres` (for production use), `sqlite` (for spikes only)
@@ -90,44 +90,44 @@ concurrent requests. The database username -**YAML configuration key name:** `database_username`
**Environment variable name:** `PACT_BROKER_DATABASE_USERNAME`
+**YAML configuration key name:** `database_username`
### database_password The database password -**YAML configuration key name:** `database_password`
**Environment variable name:** `PACT_BROKER_DATABASE_PASSWORD`
+**YAML configuration key name:** `database_password`
### database_name The database name. If using the `sqlite` adapter, this will be the path to the database file. -**YAML configuration key name:** `database_name`
**Environment variable name:** `PACT_BROKER_DATABASE_NAME`
+**YAML configuration key name:** `database_name`
**Examples:** `pact_broker`, `/tmp/pact_broker.sqlite3`, `./tmp/pact_broker.sqlite3`
### database_host The database host -**YAML configuration key name:** `database_host`
**Environment variable name:** `PACT_BROKER_DATABASE_HOST`
+**YAML configuration key name:** `database_host`
### database_port The database port. If ommited, the default port for the adapter will be used. -**YAML configuration key name:** `database_port`
**Environment variable name:** `PACT_BROKER_DATABASE_PORT`
+**YAML configuration key name:** `database_port`
### database_url The full database URL may be specified instead of the separate adapter, username, password, name, host and port. -**YAML configuration key name:** `database_url`
**Environment variable name:** `PACT_BROKER_DATABASE_URL`
+**YAML configuration key name:** `database_url`
**Format:** `{database_adapter}://{database_username}:{database_password}@{database_host}:{database_port}/{database_name}`
**Examples:** `postgres://pact_broker_user:pact_broker_password@pact_broker_db_host/pact_broker`, `sqlite:///tmp/pact_broker.sqlite3` (relative path to working directory), `sqlite:////tmp/pact_broker.sqlite3` (absolute path)
@@ -135,8 +135,8 @@ The full database URL may be specified instead of the separate adapter, username The Postgresql ssl mode. -**YAML configuration key name:** `database_sslmode`
**Environment variable name:** `PACT_BROKER_DATABASE_SSLMODE`
+**YAML configuration key name:** `database_sslmode`
**Default:** `prefer`
**Allowed values:** `disable`, `allow`, `prefer`, `require`, `verify-ca`, `verify-full`
**More information:** https://ankane.org/postgres-sslmode-explained
@@ -147,8 +147,8 @@ The log level that will be used when the SQL query statements are logged. To disable noisy SQL query logging when the application `log_level` is set to `debug` for other reasons, use the value `none`. -**YAML configuration key name:** `sql_log_level`
**Environment variable name:** `PACT_BROKER_SQL_LOG_LEVEL`
+**YAML configuration key name:** `sql_log_level`
**Default:** `debug`
**Allowed values:** `none`, `debug`, `info`, `warn`, `error`, `fatal`
@@ -156,18 +156,29 @@ To disable noisy SQL query logging when the application `log_level` is set to `d The number of seconds after which to log an SQL query at warn level. Use this for detecting slow queries. -**YAML configuration key name:** `sql_log_warn_duration`
**Environment variable name:** `PACT_BROKER_SQL_LOG_WARN_DURATION`
+**YAML configuration key name:** `sql_log_warn_duration`
**Default:** `5`
**Allowed values:** A positive integer or float, as a string.
**More information:** https://sequel.jeremyevans.net/rdoc/files/doc/opening_databases_rdoc.html#label-General+connection+options
+### sql_enable_caller_logging + +Whether or not to enable caller_logging extension for database connection. +When enabled it logs source path that caused SQL query. + +**Environment variable name:** `PACT_BROKER_SQL_ENABLE_CALLER_LOGGING`
+**YAML configuration key name:** `sql_enable_caller_logging`
+**Default:** `false`
+**Allowed values:** `true`, `false`
+**More information:** https://sequel.jeremyevans.net/rdoc-plugins/files/lib/sequel/extensions/caller_logging_rb.html
+ ### database_max_connections The maximum size of the connection pool (4 connections by default on most databases) -**YAML configuration key name:** `database_max_connections`
**Environment variable name:** `PACT_BROKER_DATABASE_MAX_CONNECTIONS`
+**YAML configuration key name:** `database_max_connections`
**Default:** `4`
**Allowed values:** A positive integer value.
**More information:** https://sequel.jeremyevans.net/rdoc/files/doc/opening_databases_rdoc.html#label-General+connection+options
@@ -176,8 +187,8 @@ The maximum size of the connection pool (4 connections by default on most databa The number of seconds to wait if a connection cannot be acquired before raising an error -**YAML configuration key name:** `database_pool_timeout`
**Environment variable name:** `PACT_BROKER_DATABASE_POOL_TIMEOUT`
+**YAML configuration key name:** `database_pool_timeout`
**Default:** `5`
**Allowed values:** A positive integer.
**More information:** https://sequel.jeremyevans.net/rdoc/files/doc/opening_databases_rdoc.html#label-General+connection+options
@@ -189,8 +200,8 @@ the Broker application process may be ready before the database is available for container to exit with an error. Setting the max retries to a non-zero number will allow it to retry the connection the configured number of times, waiting 3 seconds between attempts. -**YAML configuration key name:** `database_connect_max_retries`
**Environment variable name:** `PACT_BROKER_DATABASE_CONNECT_MAX_RETRIES`
+**YAML configuration key name:** `database_connect_max_retries`
**Default:** `0`
**Allowed values:** A positive integer value.
@@ -198,8 +209,8 @@ configured number of times, waiting 3 seconds between attempts. Whether or not to run the database schema migrations on start up. It is recommended to set this to `true`. -**YAML configuration key name:** `auto_migrate_db`
**Environment variable name:** `PACT_BROKER_AUTO_MIGRATE_DB`
+**YAML configuration key name:** `auto_migrate_db`
**Default:** `true`
**Allowed values:** `true`, `false`
@@ -207,8 +218,8 @@ Whether or not to run the database schema migrations on start up. It is recommen Whether or not to run the database data migrations on start up. It is recommended to set this to `true`. -**YAML configuration key name:** `auto_migrate_db_data`
**Environment variable name:** `PACT_BROKER_AUTO_MIGRATE_DB_DATA`
+**YAML configuration key name:** `auto_migrate_db_data`
**Default:** `true`
**Allowed values:** `true`, `false`
@@ -218,8 +229,8 @@ If `true`, will not raise an error if a database migration is recorded in the da equivalent file in the codebase. If this is true, an older version of the code may be used with a newer version of the database, however, data integrity issues may occur. -**YAML configuration key name:** `allow_missing_migration_files`
**Environment variable name:** `PACT_BROKER_ALLOW_MISSING_MIGRATION_FILES`
+**YAML configuration key name:** `allow_missing_migration_files`
**Default:** `true`
**More information:** https://sequel.jeremyevans.net/rdoc/classes/Sequel/Migrator.html
@@ -227,8 +238,8 @@ however, data integrity issues may occur. The number of seconds after which an SQL query will be aborted. Only supported for Postgresql connections. -**YAML configuration key name:** `database_statement_timeout`
**Environment variable name:** `PACT_BROKER_DATABASE_STATEMENT_TIMEOUT`
+**YAML configuration key name:** `database_statement_timeout`
**Default:** `15`
**Allowed values:** A positive integer or float.
**More information:** https://www.postgresql.org/docs/9.3/runtime-config-client.html
@@ -239,8 +250,8 @@ The number of seconds after which the SQL queries used for the metrics endpoint This is configurable separately from the standard `database_statement_timeout` as it may need to be significantly longer than the desired value for standard queries. -**YAML configuration key name:** `metrics_sql_statement_timeout`
**Environment variable name:** `PACT_BROKER_METRICS_SQL_STATEMENT_TIMEOUT`
+**YAML configuration key name:** `metrics_sql_statement_timeout`
**Default:** `30`
**Allowed values:** A positive integer.
@@ -252,8 +263,8 @@ The number of seconds after which to check the health of a connection from a con when databases are restarted and connections are killed. This has a performance penalty, so consider increasing this timeout if building a frequently accessed service. -**YAML configuration key name:** `database_connection_validation_timeout`
**Environment variable name:** `PACT_BROKER_DATABASE_CONNECTION_VALIDATION_TIMEOUT`
+**YAML configuration key name:** `database_connection_validation_timeout`
**Default:** -1 for v2.85.1 and earlier, 3600 for later versions.
**Allowed values:** -1 or any positive integer.
**More information:** https://sequel.jeremyevans.net/rdoc-plugins/files/lib/sequel/extensions/connection_validator_rb.html
@@ -272,8 +283,8 @@ should be used for CI/CD. Whether to enable basic authorization. This is automatically set to true for the Docker images if the `basic_auth_username` and `basic_auth_password` are set. -**YAML configuration key name:** `basic_auth_enabled`
**Environment variable name:** `PACT_BROKER_BASIC_AUTH_ENABLED`
+**YAML configuration key name:** `basic_auth_enabled`
**Default:** `false`
**Allowed values:** `true`, `false`
@@ -281,36 +292,36 @@ Whether to enable basic authorization. This is automatically set to true for the The username for the read/write basic auth user. -**YAML configuration key name:** `basic_auth_username`
**Environment variable name:** `PACT_BROKER_BASIC_AUTH_USERNAME`
+**YAML configuration key name:** `basic_auth_username`
### basic_auth_password The password for the read/write basic auth user. -**YAML configuration key name:** `basic_auth_password`
**Environment variable name:** `PACT_BROKER_BASIC_AUTH_PASSWORD`
+**YAML configuration key name:** `basic_auth_password`
### basic_auth_read_only_username The username for the read only basic auth user. -**YAML configuration key name:** `basic_auth_read_only_username`
**Environment variable name:** `PACT_BROKER_BASIC_AUTH_READ_ONLY_USERNAME`
+**YAML configuration key name:** `basic_auth_read_only_username`
### basic_auth_read_only_password The password for the read only basic auth user. -**YAML configuration key name:** `basic_auth_read_only_password`
**Environment variable name:** `PACT_BROKER_BASIC_AUTH_READ_ONLY_PASSWORD`
+**YAML configuration key name:** `basic_auth_read_only_password`
### allow_public_read If you want to allow public read access, but still require credentials for writing, then leave `basic_auth_read_only_username` and `basic_auth_read_only_password` unset, and set `allow_public_read` to `true`. -**YAML configuration key name:** `allow_public_read`
**Environment variable name:** `PACT_BROKER_ALLOW_PUBLIC_READ`
+**YAML configuration key name:** `allow_public_read`
**Default:** `false`
**Allowed values:** `true`, `false`
@@ -318,8 +329,8 @@ If you want to allow public read access, but still require credentials for writi If you have enabled basic auth, but require unauthenticated access to the heartbeat URL (eg. for use within an AWS autoscaling group), set `public_heartbeat` to `true`. -**YAML configuration key name:** `public_heartbeat`
**Environment variable name:** `PACT_BROKER_PUBLIC_HEARTBEAT`
+**YAML configuration key name:** `public_heartbeat`
**Default:** `false`
**Allowed values:** `true`, `false`
@@ -327,8 +338,8 @@ If you have enabled basic auth, but require unauthenticated access to the heartb Set this to true to allow status badges to be embedded in README files without requiring a hardcoded password. -**YAML configuration key name:** `enable_public_badge_access`
**Environment variable name:** `PACT_BROKER_ENABLE_PUBLIC_BADGE_ACCESS`
+**YAML configuration key name:** `enable_public_badge_access`
**Default:** `false`
**Allowed values:** `true`, `false`
@@ -344,8 +355,8 @@ Set this to true to allow status badges to be embedded in README files without r The schedule of seconds to wait between webhook execution attempts. The default schedule is 10 sec, 1 min, 2 min, 5 min, 10 min, 20 min (38 minutes in total). -**YAML configuration key name:** `webhook_retry_schedule`
**Environment variable name:** `PACT_BROKER_WEBHOOK_RETRY_SCHEDULE`
+**YAML configuration key name:** `webhook_retry_schedule`
**Format:** A space separated list of integers.
**Default:** `10 60 120 300 600 1200`
@@ -354,8 +365,8 @@ The default schedule is 10 sec, 1 min, 2 min, 5 min, 10 min, 20 min (38 minutes The allowed HTTP methods for webhooks. It is highly recommended that only `POST` requests are allowed to ensure that webhooks cannot be used to retrieve sensitive information from hosts within the same network. -**YAML configuration key name:** `webhook_http_method_whitelist`
**Environment variable name:** `PACT_BROKER_WEBHOOK_HTTP_METHOD_WHITELIST`
+**YAML configuration key name:** `webhook_http_method_whitelist`
**Format:** A space separated list.
**Default:** `POST`
**Allowed values:** `POST`, `GET` (not recommended), `PUT` (not recommended), `PATCH` (not recommended), `DELETE` (not recommended)
@@ -368,8 +379,8 @@ considered a success, otherwise the webhook will be re-triggered based on the `w In most cases, configuring this is not necessary, but there are some CI systems that return a non 200 status for a success, which is why this feature exists. -**YAML configuration key name:** `webhook_http_code_success`
**Environment variable name:** `PACT_BROKER_WEBHOOK_HTTP_CODE_SUCCESS`
+**YAML configuration key name:** `webhook_http_code_success`
**Format:** A space separated list of integers.
**Default:** `200 201 202 203 204 205 206`
**Allowed values:** `Any valid HTTP status code`
@@ -378,8 +389,8 @@ which is why this feature exists. The allowed URL schemes for webhooks. -**YAML configuration key name:** `webhook_scheme_whitelist`
**Environment variable name:** `PACT_BROKER_WEBHOOK_SCHEME_WHITELIST`
+**YAML configuration key name:** `webhook_scheme_whitelist`
**Format:** A space delimited list.
**Default:** `https`
**Allowed values:** `https`, `http`
@@ -391,37 +402,58 @@ Regular expressions should start and end with a `/` to differentiate them from S Note that backslashes need to be escaped with a second backslash when setting via an environment variable. Please read the [Webhook whitelists section](https://docs.pact.io/pact_broker/configuration/features#webhooks) of the Pact Broker configuration documentation to understand how the whitelist is used. -**YAML configuration key name:** `webhook_host_whitelist`
**Environment variable name:** `PACT_BROKER_WEBHOOK_HOST_WHITELIST`
+**Environment variable format:** A space separated list.
+**YAML configuration key name:** `webhook_host_whitelist`
+**YAML format:** A YAML list.
**Examples:** `github.com`, `10.2.3.41/24`, `/.*\\.foo\\.com$/`
**More information:** https://docs.pact.io/pact_broker/configuration/#webhook-whitelists
### webhook_certificates -A list of SSL certificate configuration objects with the keys `description`, and either `content` or `path`. These +A list of SSL certificate configuration objects with the key `description`, and either `content` or `path`. These certificates are used when a webhook needs to connect to a server that uses a self signed certificate. Each certificate configuration item accepts a chain of certificates in PEM format - there may be multiple 'BEGIN CERTIFICATE' and 'END CERTIFICATE' in the content of each item. -When setting the content, use the syntax "content: |-" followed by a new line, and then the contents of the certificate -chain in PEM format, indented by 2 more characters. - -When setting the path, the full path to the certificate file in PEM format must be specified. - The certificate configuration is not validated on startup. If any of the configured certificates cannot be loaded during the execution of a webhook, an error will be logged, and they will be ignored. You can check if the configuration is working by testing the execution of a webhook that connects to the server with the self signed certificate by following these instructions https://docs.pact.io/pact_broker/webhooks/debugging_webhooks#testing-webhook-execution -**YAML configuration key name:** `webhook_certificates`
-**Environment variable name:** `PACT_BROKER_WEBHOOK_CERTIFICATES`
+When setting the content in the YAML file, use the syntax "content: |-" followed by a new line, and then the contents of the certificate +chain in PEM format, indented by 2 more characters. + +When setting the path, the full path to the certificate file in PEM format must be specified. When using Docker, you must ensure the +certificate file is [mounted into the container](https://docs.docker.com/storage/volumes/). + +*NOTE: USING ENVIRONMENT VARIABLES TO SET THE WEBHOOK CERTIFICATES IS NOT SUPPORTED.* + +YAML Example: + +```yaml +webhook_certificates: + - description: "An example self signed certificate with content" + content: |- + -----BEGIN CERTIFICATE----- + MIIDZDCCAkygAwIBAgIBATANBgkqhkiG9w0BAQsFADBCMRMwEQYKCZImiZPyLGQB + + jHT1Ty2CglM= + -----END CERTIFICATE----- + - description: "An example self signed certificate with a path" + path: /full/path/to/the/cert.pem + +``` + **Supported versions:** From v2.90.0
+**Environment variable name:** `PACT_BROKER_WEBHOOK_CERTIFICATES`
+**YAML configuration key name:** `webhook_certificates`
### disable_ssl_verification If set to true, SSL verification will be disabled for the HTTP requests made by the webhooks -**YAML configuration key name:** `disable_ssl_verification`
**Environment variable name:** `PACT_BROKER_DISABLE_SSL_VERIFICATION`
+**YAML configuration key name:** `disable_ssl_verification`
**Default:** `false`
**Allowed values:** `true`, `false`
@@ -429,8 +461,8 @@ If set to true, SSL verification will be disabled for the HTTP requests made by The user agent to set when making HTTP requests for webhooks. -**YAML configuration key name:** `user_agent`
**Environment variable name:** `PACT_BROKER_USER_AGENT`
+**YAML configuration key name:** `user_agent`
**Default:** `Pact Broker v{VERSION}`

@@ -446,8 +478,8 @@ The HTTP port that the Pact Broker application will run on. This will only be ho a package that actually reads this property (eg. one of the supported Docker images). If you are running the vanilla Ruby application, the application will run on the port the server has been configured to run on (eg. `bundle exec rackup -p 9393`) -**YAML configuration key name:** `port`
**Environment variable name:** `PACT_BROKER_PORT`
+**YAML configuration key name:** `port`
**Default:** `9292`
### base_url @@ -459,8 +491,8 @@ deploying the Pact Broker to production as it prevents cache poisoning security It is also required when deploying the Broker behind a reverse proxy, and when the application has been mounted at a non-root context. Note that this attribute does not change where the application is actually mounted (that is the concern of the deployment configuration) - it just changes the links. -**YAML configuration key name:** `base_url`
**Environment variable name:** `PACT_BROKER_BASE_URL`
+**YAML configuration key name:** `base_url`
**Examples:** `https://pact-broker.mycompany.com`, `https://my-company.com:9292/pact-broker`
### base_urls @@ -468,8 +500,8 @@ Note that this attribute does not change where the application is actually mount An alias of base_url. From version 2.79.0, multiple base URLs can be configured for architectures that use gateways or proxies that allow the same Pact Broker instance to be addressed with different base URLs. -**YAML configuration key name:** `base_urls`
**Environment variable name:** `PACT_BROKER_BASE_URLS`
+**YAML configuration key name:** `base_urls`
**Format:** A space separated list.
**Example:** `http://my-internal-pact-broker:9292 https://my-external-pact-broker`
@@ -477,8 +509,8 @@ gateways or proxies that allow the same Pact Broker instance to be addressed wit The URL of the shields.io server used to generate the README badges. -**YAML configuration key name:** `shields_io_base_url`
**Environment variable name:** `PACT_BROKER_SHIELDS_IO_BASE_URL`
+**YAML configuration key name:** `shields_io_base_url`
**Default:** `https://img.shields.io`
**More information:** https://shields.io
@@ -489,8 +521,8 @@ to render the badge from the shields.io server directly in the browser. This is When set to `proxy`, the Pact Broker will make a request directly to the configured shields.io server, and then send the returned file back to the browser. This mode is not recommended for security and performance reasons. -**YAML configuration key name:** `badge_provider_mode`
**Environment variable name:** `PACT_BROKER_BADGE_PROVIDER_MODE`
+**YAML configuration key name:** `badge_provider_mode`
**Default:** `redirect`
**Allowed values:** `redirect`, `proxy`
@@ -500,8 +532,8 @@ Whether or not to enable the diagnostic endpoints at `/diagnostic/status/heartbe The heartbeat endpoint is for use by load balancers, and the dependencies endpoint is for checking that the database is available (do not use this for load balancing, as it makes a database connection). -**YAML configuration key name:** `enable_diagnostic_endpoints`
**Environment variable name:** `PACT_BROKER_ENABLE_DIAGNOSTIC_ENDPOINTS`
+**YAML configuration key name:** `enable_diagnostic_endpoints`
**Default:** `true`
**Allowed values:** `true`, `false`
@@ -509,8 +541,8 @@ is available (do not use this for load balancing, as it makes a database connect Whether or not to enable the embedded HAL Browser. -**YAML configuration key name:** `use_hal_browser`
**Environment variable name:** `PACT_BROKER_USE_HAL_BROWSER`
+**YAML configuration key name:** `use_hal_browser`
**Default:** `true`
**Allowed values:** `true`, `false`
**More information:** https://github.com/mikekelly/hal-browser
@@ -536,8 +568,8 @@ or that the pacticipant should be created manually if it was intended to be a ne To turn this feature off, set `check_for_potential_duplicate_pacticipant_names` to `false`, and make sure everyone is very careful with their naming! The usefulness of the Broker depends on the integrity of the data, which in turn depends on the correctness of the pacticipant names. -**YAML configuration key name:** `check_for_potential_duplicate_pacticipant_names`
**Environment variable name:** `PACT_BROKER_CHECK_FOR_POTENTIAL_DUPLICATE_PACTICIPANT_NAMES`
+**YAML configuration key name:** `check_for_potential_duplicate_pacticipant_names`
**Default:** `true`
**Allowed values:** `true`, `false`
@@ -548,9 +580,9 @@ also created for the pacticipant version. This is to assist in the migration from using tags to track deployments to using the deployed and released versions feature. -**YAML configuration key name:** `create_deployed_versions_for_tags`
-**Environment variable name:** `PACT_BROKER_CREATE_DEPLOYED_VERSIONS_FOR_TAGS`
**Supported versions:** From v2.81.0
+**Environment variable name:** `PACT_BROKER_CREATE_DEPLOYED_VERSIONS_FOR_TAGS`
+**YAML configuration key name:** `create_deployed_versions_for_tags`
**Default:** `true`
**Allowed values:** `true`, `false`
**More information:** https://docs.pact.io/pact_broker/recording_deployments_and_releases/
@@ -562,9 +594,9 @@ will be used to populate the `branch` property of the version. This is to assist in the migration from using tags to track branches to using the branches feature. -**YAML configuration key name:** `use_first_tag_as_branch`
-**Environment variable name:** `PACT_BROKER_USE_FIRST_TAG_AS_BRANCH`
**Supported versions:** From v2.82.0
+**Environment variable name:** `PACT_BROKER_USE_FIRST_TAG_AS_BRANCH`
+**YAML configuration key name:** `use_first_tag_as_branch`
**Default:** `true`
**Allowed values:** `true`, `false`
@@ -575,9 +607,9 @@ the `mainBranch` property is set for that pacticipant if it is not already set. This is to assist in the migration from using tags to track branches to using the branches feature. -**YAML configuration key name:** `auto_detect_main_branch`
-**Environment variable name:** `PACT_BROKER_AUTO_DETECT_MAIN_BRANCH`
**Supported versions:** From v2.82.0
+**Environment variable name:** `PACT_BROKER_AUTO_DETECT_MAIN_BRANCH`
+**YAML configuration key name:** `auto_detect_main_branch`
**Default:** `true`
**Allowed values:** `true`, `false`
@@ -585,9 +617,9 @@ This is to assist in the migration from using tags to track branches to using th An array of potential main branch names used when automatically detecting the main branch for a pacticipant. -**YAML configuration key name:** `main_branch_candidates`
-**Environment variable name:** `PACT_BROKER_MAIN_BRANCH_CANDIDATES`
**Supported versions:** From v2.82.0
+**Environment variable name:** `PACT_BROKER_MAIN_BRANCH_CANDIDATES`
+**YAML configuration key name:** `main_branch_candidates`
**Format:** A space delimited list.
**Default:** `develop main master`
@@ -597,9 +629,9 @@ Whether or not to allow the pact content for an existing consumer version to be as allowing modification makes the results of can-i-deploy unreliable. When this is set to false as recommended, each commit must publish pacts with a unique version number. -**YAML configuration key name:** `allow_dangerous_contract_modification`
-**Environment variable name:** `PACT_BROKER_ALLOW_DANGEROUS_CONTRACT_MODIFICATION`
**Supported versions:** From v2.82.0
+**Environment variable name:** `PACT_BROKER_ALLOW_DANGEROUS_CONTRACT_MODIFICATION`
+**YAML configuration key name:** `allow_dangerous_contract_modification`
**Default:** For new installations of v2.82.0 and later, this defaults to `false`.
**Allowed values:** `true`, `false`
**More information:** https://docs.pact.io/versioning
@@ -615,6 +647,6 @@ with a unique version number. A list of features to enable in the Pact Broker for beta testing before public release. -**YAML configuration key name:** `features`
**Environment variable name:** `PACT_BROKER_FEATURES`
+**YAML configuration key name:** `features`
**Format:** A space separated list.
From 7f2f01b96ea3ecef835013eaa08678c713590ab4 Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Mon, 28 Mar 2022 16:32:38 +1100 Subject: [PATCH 12/25] chore: update webhook docs --- website/docs/pact_broker/configuration/features.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/pact_broker/configuration/features.md b/website/docs/pact_broker/configuration/features.md index 3650e06d..50ad50a8 100644 --- a/website/docs/pact_broker/configuration/features.md +++ b/website/docs/pact_broker/configuration/features.md @@ -18,7 +18,7 @@ Once you are up and running, we recommend you set the [`base_url`](/pact_broker/ To ensure that webhooks cannot be used maliciously to expose either data about your contracts or your internal network, the following validation rules are applied to webhooks via the Pact Broker configuration settings. -- **Scheme**: Must be included in the [`webhook_scheme_whitelist`](/pact_broker/configuration/settings#webhook_scheme_whitelist), which by default only includes `https`. You can change this to include `http` if absolutely necessary, however, keep in mind that the body of any http traffic is visible to the network. You can load a self signed certificate into the Pact Broker to be used for https connections using [script/insert-self-signed-certificate-from-url.rb](https://github.com/pact-foundation/pact_broker/blob/master/script/insert-self-signed-certificate-from-url.rb) in the Pact Broker Github repository. +- **Scheme**: Must be included in the [`webhook_scheme_whitelist`](/pact_broker/configuration/settings#webhook_scheme_whitelist), which by default only includes `https`. You can change this to include `http` if absolutely necessary, however, keep in mind that the body of any http traffic is visible to the network. - **HTTP method**: Must be included in the [`webhook_http_method_whitelist`](/pact_broker/configuration/settings#webhook_http_method_whitelist), which by default only includes `POST`. It is highly recommended that only `POST` requests are allowed to ensure that webhooks cannot be used to retrieve sensitive information from hosts within the same network. - **Host**: If the [`webhook_host_whitelist`](/pact_broker/configuration/settings#webhook_host_whitelist) contains any entries, the host must match one or more of the entries. By default, it is empty. If the host whitelist is empty, any host is allowed, but for security purposes the response details will not be logged to the UI \(though they can be seen in the application logs at debug level\). From 243b00bc10779f2eb1bc9d12b14c23d4635bc1cc Mon Sep 17 00:00:00 2001 From: Yousaf Nabi Date: Mon, 28 Mar 2022 17:47:38 +0100 Subject: [PATCH 13/25] chore: correct blog dates --- website/blog/{2018-07-09-welcome.md => 2018-07-10-welcome.md} | 0 ...18-07-16-publishing-pact-verification-statuses-to-github.md} | 2 +- ...phql-api.md => 2018-07-24-contract-testing-a-graphql-api.md} | 2 +- ...> 2019-05-01-announcing-pactflow-our-managed-pact-broker.md} | 2 +- ...3-provider-state-support-added-to-pact-ruby-js-go-dotnet.md} | 2 +- ...ow-weve-fixed-the-biggest-problem-with-the-pact-workflow.md} | 2 +- ...oducing-wip-pacts.md => 2020-02-24-introducing-wip-pacts.md} | 2 +- ...=> 2021-03-11-automatic-data-clean-up-in-the-pact-broker.md} | 2 +- website/blog/2021-07-04-why-we-are-getting-rid-of-tags.md | 2 +- 9 files changed, 8 insertions(+), 8 deletions(-) rename website/blog/{2018-07-09-welcome.md => 2018-07-10-welcome.md} (100%) rename website/blog/{2018-10-18-publishing-pact-verification-statuses-to-github.md => 2018-07-16-publishing-pact-verification-statuses-to-github.md} (99%) rename website/blog/{2018-24-07-contract-testing-a-graphql-api.md => 2018-07-24-contract-testing-a-graphql-api.md} (99%) rename website/blog/{2019-01-05-announcing-pactflow-our-managed-pact-broker.md => 2019-05-01-announcing-pactflow-our-managed-pact-broker.md} (98%) rename website/blog/{2019-29-05-v3-provider-state-support-added-to-pact-ruby-js-go-dotnet.md => 2019-05-29-v3-provider-state-support-added-to-pact-ruby-js-go-dotnet.md} (97%) rename website/blog/{2020-24-02-how-weve-fixed-the-biggest-problem-with-the-pact-workflow.md => 2020-02-24-how-weve-fixed-the-biggest-problem-with-the-pact-workflow.md} (99%) rename website/blog/{2020-24-02-introducing-wip-pacts.md => 2020-02-24-introducing-wip-pacts.md} (99%) rename website/blog/{2020-11-03-automatic-data-clean-up-in-the-pact-broker.md => 2021-03-11-automatic-data-clean-up-in-the-pact-broker.md} (97%) diff --git a/website/blog/2018-07-09-welcome.md b/website/blog/2018-07-10-welcome.md similarity index 100% rename from website/blog/2018-07-09-welcome.md rename to website/blog/2018-07-10-welcome.md diff --git a/website/blog/2018-10-18-publishing-pact-verification-statuses-to-github.md b/website/blog/2018-07-16-publishing-pact-verification-statuses-to-github.md similarity index 99% rename from website/blog/2018-10-18-publishing-pact-verification-statuses-to-github.md rename to website/blog/2018-07-16-publishing-pact-verification-statuses-to-github.md index 7318b13b..fbdd143e 100644 --- a/website/blog/2018-10-18-publishing-pact-verification-statuses-to-github.md +++ b/website/blog/2018-07-16-publishing-pact-verification-statuses-to-github.md @@ -4,7 +4,7 @@ author: Beth Skurrie authorURL: http://twitter.com/bethesque tags: [verification] keywords: [verification] -date: 2018-10-18 +date: 2018-07-16 draft: false hide_table_of_contents: true --- diff --git a/website/blog/2018-24-07-contract-testing-a-graphql-api.md b/website/blog/2018-07-24-contract-testing-a-graphql-api.md similarity index 99% rename from website/blog/2018-24-07-contract-testing-a-graphql-api.md rename to website/blog/2018-07-24-contract-testing-a-graphql-api.md index 249f3293..92a6f2f3 100644 --- a/website/blog/2018-24-07-contract-testing-a-graphql-api.md +++ b/website/blog/2018-07-24-contract-testing-a-graphql-api.md @@ -4,7 +4,7 @@ author: Matt Fellows authorURL: https://twitter.com/matthewfellows tags: [GraphQL] keywords: [GraphQL] -date: 2018-24-07 +date: 2018-07-24 draft: false hide_table_of_contents: true --- diff --git a/website/blog/2019-01-05-announcing-pactflow-our-managed-pact-broker.md b/website/blog/2019-05-01-announcing-pactflow-our-managed-pact-broker.md similarity index 98% rename from website/blog/2019-01-05-announcing-pactflow-our-managed-pact-broker.md rename to website/blog/2019-05-01-announcing-pactflow-our-managed-pact-broker.md index 00210f36..e5bba060 100644 --- a/website/blog/2019-01-05-announcing-pactflow-our-managed-pact-broker.md +++ b/website/blog/2019-05-01-announcing-pactflow-our-managed-pact-broker.md @@ -4,7 +4,7 @@ author: Matt Fellows authorURL: https://twitter.com/matthewfellows tags: [Pactflow] keywords: [Pactflow] -date: 2019-01-05 +date: 2019-05-01 draft: false hide_table_of_contents: true --- diff --git a/website/blog/2019-29-05-v3-provider-state-support-added-to-pact-ruby-js-go-dotnet.md b/website/blog/2019-05-29-v3-provider-state-support-added-to-pact-ruby-js-go-dotnet.md similarity index 97% rename from website/blog/2019-29-05-v3-provider-state-support-added-to-pact-ruby-js-go-dotnet.md rename to website/blog/2019-05-29-v3-provider-state-support-added-to-pact-ruby-js-go-dotnet.md index 93822349..9ad022a3 100644 --- a/website/blog/2019-29-05-v3-provider-state-support-added-to-pact-ruby-js-go-dotnet.md +++ b/website/blog/2019-05-29-v3-provider-state-support-added-to-pact-ruby-js-go-dotnet.md @@ -4,7 +4,7 @@ author: Beth Skurrie authorURL: https://twitter.com/bethskurrie tags: [ruby,js,go,.net,v3,pact] keywords: [ruby,js,go,.net,v3,pact] -date: 2019-29-05 +date: 2019-05-29 draft: false hide_table_of_contents: true --- diff --git a/website/blog/2020-24-02-how-weve-fixed-the-biggest-problem-with-the-pact-workflow.md b/website/blog/2020-02-24-how-weve-fixed-the-biggest-problem-with-the-pact-workflow.md similarity index 99% rename from website/blog/2020-24-02-how-weve-fixed-the-biggest-problem-with-the-pact-workflow.md rename to website/blog/2020-02-24-how-weve-fixed-the-biggest-problem-with-the-pact-workflow.md index a5738566..6ac08f20 100644 --- a/website/blog/2020-24-02-how-weve-fixed-the-biggest-problem-with-the-pact-workflow.md +++ b/website/blog/2020-02-24-how-weve-fixed-the-biggest-problem-with-the-pact-workflow.md @@ -4,7 +4,7 @@ author: Beth Skurrie authorURL: https://twitter.com/bethskurrie tags: [pact] keywords: [pact] -date: 2020-24-03 +date: 2020-02-24 draft: false hide_table_of_contents: true --- diff --git a/website/blog/2020-24-02-introducing-wip-pacts.md b/website/blog/2020-02-24-introducing-wip-pacts.md similarity index 99% rename from website/blog/2020-24-02-introducing-wip-pacts.md rename to website/blog/2020-02-24-introducing-wip-pacts.md index 294ad39f..6f717236 100644 --- a/website/blog/2020-24-02-introducing-wip-pacts.md +++ b/website/blog/2020-02-24-introducing-wip-pacts.md @@ -4,7 +4,7 @@ author: Beth Skurrie authorURL: https://twitter.com/bethskurrie tags: [pact] keywords: [pact] -date: 2020-24-02 +date: 2020-02-24 draft: false hide_table_of_contents: true --- diff --git a/website/blog/2020-11-03-automatic-data-clean-up-in-the-pact-broker.md b/website/blog/2021-03-11-automatic-data-clean-up-in-the-pact-broker.md similarity index 97% rename from website/blog/2020-11-03-automatic-data-clean-up-in-the-pact-broker.md rename to website/blog/2021-03-11-automatic-data-clean-up-in-the-pact-broker.md index f802eabb..c753a2e8 100644 --- a/website/blog/2020-11-03-automatic-data-clean-up-in-the-pact-broker.md +++ b/website/blog/2021-03-11-automatic-data-clean-up-in-the-pact-broker.md @@ -4,7 +4,7 @@ author: Beth Skurrie authorURL: https://twitter.com/bethskurrie tags: [pact] keywords: [pact] -date: 2020-11-03 +date: 2021-03-11 draft: false hide_table_of_contents: true --- diff --git a/website/blog/2021-07-04-why-we-are-getting-rid-of-tags.md b/website/blog/2021-07-04-why-we-are-getting-rid-of-tags.md index 5fce0b4d..4711cebb 100644 --- a/website/blog/2021-07-04-why-we-are-getting-rid-of-tags.md +++ b/website/blog/2021-07-04-why-we-are-getting-rid-of-tags.md @@ -4,7 +4,7 @@ author: Beth Skurrie authorURL: http://twitter.com/bethesque tags: [features, tags, branches, deployments, releases] keywords: [features, tags, branches, deployments, releases] -date: 2021-10-08 +date: 2021-07-04 draft: false hide_table_of_contents: true --- From a10dbd82cf9759d721e28b5985c0cecbec29d058 Mon Sep 17 00:00:00 2001 From: Github Action Date: Mon, 28 Mar 2022 17:42:41 +0000 Subject: [PATCH 14/25] chore: "synced pact-go docs" --- website/docs/implementation_guides/go/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/implementation_guides/go/readme.md b/website/docs/implementation_guides/go/readme.md index f3bcb5d9..3d979e34 100644 --- a/website/docs/implementation_guides/go/readme.md +++ b/website/docs/implementation_guides/go/readme.md @@ -478,7 +478,7 @@ Using a [Pact Broker] is recommended for any serious workloads, you can run your By integrating with a Broker, you get much more advanced collaboration features and can take advantage of automation tools, such as the [can-i-deploy tool], which can tell you at any point in time, which component is safe to release. -See the [Pact Broker](https://docs.pact.io/getting-started/sharing-pacts-with-the-pact-broker) +See the [Pact Broker](https://docs.pact.io/getting_started/sharing_pacts) documentation for more details on the Broker. #### Publishing from Go code From 45f74c6ac46c969a4f23a856788b7f7ff7d0c515 Mon Sep 17 00:00:00 2001 From: Github Action Date: Tue, 29 Mar 2022 05:08:47 +0000 Subject: [PATCH 15/25] chore: "synced pact_broker docs" --- website/docs/pact_broker/changelog.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/website/docs/pact_broker/changelog.md b/website/docs/pact_broker/changelog.md index a9a5745e..ce2832af 100644 --- a/website/docs/pact_broker/changelog.md +++ b/website/docs/pact_broker/changelog.md @@ -4,6 +4,19 @@ custom_edit_url: https://github.com/pact-foundation/pact_broker/edit/master/CHAN --- + + +### v2.97.0 (2022-03-29) + +#### Features + +* **webhook certificates** + * support setting webhook certificates using environment variables ([82c7a7e5](https://github.com/pact-foundation/pact_broker/commit/82c7a7e5)) + +#### Bug Fixes + +* do not set postgres connection driver options if database_statement_timeout is nil ([adec4b00](https://github.com/pact-foundation/pact_broker/commit/adec4b00)) + ### v2.96.0 (2022-03-21) From 3b60ee80dcdac107e99bfd3e3dcd2a7ae377a5dc Mon Sep 17 00:00:00 2001 From: Github Action Date: Tue, 29 Mar 2022 05:35:10 +0000 Subject: [PATCH 16/25] chore: "synced pact_broker docs" --- .../pact_broker/configuration/settings.md | 30 ++++++++++++++++--- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/website/docs/pact_broker/configuration/settings.md b/website/docs/pact_broker/configuration/settings.md index afcb4650..dabbbf2e 100644 --- a/website/docs/pact_broker/configuration/settings.md +++ b/website/docs/pact_broker/configuration/settings.md @@ -57,6 +57,17 @@ While the default is `file` for the Ruby application, it is set to `stdout` on t **Default:** `file`
**Allowed values:** `stdout`, `file`
+### http_debug_logging_enabled + +Enable this setting to print the entire request and response to the logs at debug level. Used for troubleshooting issues. +Do not leave this on permanently, as it will have performance and security issues. + +**Supported versions:** From v2.98.0
+**Environment variable name:** `PACT_BROKER_HTTP_DEBUG_LOGGING_ENABLED`
+**YAML configuration key name:** `http_debug_logging_enabled`
+**Default:** `false`
+**Allowed values:** `true`, `false`
+ ### hide_pactflow_messages Set to `true` to hide the messages in the logs about Pactflow @@ -426,8 +437,6 @@ chain in PEM format, indented by 2 more characters. When setting the path, the full path to the certificate file in PEM format must be specified. When using Docker, you must ensure the certificate file is [mounted into the container](https://docs.docker.com/storage/volumes/). -*NOTE: USING ENVIRONMENT VARIABLES TO SET THE WEBHOOK CERTIFICATES IS NOT SUPPORTED.* - YAML Example: ```yaml @@ -440,11 +449,24 @@ webhook_certificates: jHT1Ty2CglM= -----END CERTIFICATE----- - description: "An example self signed certificate with a path" - path: /full/path/to/the/cert.pem + path: "/full/path/to/the/cert.pem" ``` -**Supported versions:** From v2.90.0
+Environment variable example: + +```shell +PACT_BROKER_WEBHOOK_CERTIFICATES__0__LABEL="An example self signed certificate with content" +PACT_BROKER_WEBHOOK_CERTIFICATES__0__CONTENT="-----BEGIN CERTIFICATE----- + MIIDZDCCAkygAwIBAgIBATANBgkqhkiG9w0BAQsFADBCMRMwEQYKCZImiZPyLGQB + + jHT1Ty2CglM= + -----END CERTIFICATE-----" +PACT_BROKER_WEBHOOK_CERTIFICATES__1__LABEL="An example self signed certificate with a path" +PACT_BROKER_WEBHOOK_CERTIFICATES__1__PATH="/full/path/to/the/cert.pem" +``` + +**Supported versions:** From v2.90.0 for YAML and 2.97.0 for environment variables.
**Environment variable name:** `PACT_BROKER_WEBHOOK_CERTIFICATES`
**YAML configuration key name:** `webhook_certificates`
From abe0412fb29e9c425ad640caaad2aae71470b454 Mon Sep 17 00:00:00 2001 From: Github Action Date: Tue, 29 Mar 2022 05:49:36 +0000 Subject: [PATCH 17/25] chore: "synced pact_broker docs" --- website/docs/pact_broker/changelog.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/website/docs/pact_broker/changelog.md b/website/docs/pact_broker/changelog.md index ce2832af..8dede987 100644 --- a/website/docs/pact_broker/changelog.md +++ b/website/docs/pact_broker/changelog.md @@ -4,6 +4,14 @@ custom_edit_url: https://github.com/pact-foundation/pact_broker/edit/master/CHAN --- + + +### v2.98.0 (2022-03-29) + +#### Features + +* support debug logging of entire request and response ([42eb4a17](https://github.com/pact-foundation/pact_broker/commit/42eb4a17)) + ### v2.97.0 (2022-03-29) From 040f51001bb0a485386c5036463ff43bc37db479 Mon Sep 17 00:00:00 2001 From: Github Action Date: Tue, 29 Mar 2022 06:02:11 +0000 Subject: [PATCH 18/25] chore: "synced pact_broker docs" --- website/docs/pact_broker/configuration/settings.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/website/docs/pact_broker/configuration/settings.md b/website/docs/pact_broker/configuration/settings.md index dabbbf2e..42bb165f 100644 --- a/website/docs/pact_broker/configuration/settings.md +++ b/website/docs/pact_broker/configuration/settings.md @@ -61,6 +61,7 @@ While the default is `file` for the Ruby application, it is set to `stdout` on t Enable this setting to print the entire request and response to the logs at debug level. Used for troubleshooting issues. Do not leave this on permanently, as it will have performance and security issues. +Ensure the application [`log_level`](#log_level) is set to `debug` when this setting is enabled. **Supported versions:** From v2.98.0
**Environment variable name:** `PACT_BROKER_HTTP_DEBUG_LOGGING_ENABLED`
@@ -160,7 +161,7 @@ To disable noisy SQL query logging when the application `log_level` is set to `d **Environment variable name:** `PACT_BROKER_SQL_LOG_LEVEL`
**YAML configuration key name:** `sql_log_level`
-**Default:** `debug`
+**Default:** From 2.99+, the default is `none`. In previous versions, the default is `debug`.
**Allowed values:** `none`, `debug`, `info`, `warn`, `error`, `fatal`
### sql_log_warn_duration From 02cef4f45f29730f25ac9d8e1695736f4cbd27b8 Mon Sep 17 00:00:00 2001 From: Yousaf Nabi Date: Mon, 14 Mar 2022 18:56:16 +0000 Subject: [PATCH 19/25] chore: update provider badges with real examples fixes #117 note this uses a test.pactflow.io instance. this pairing [here](https://test.pactflow.io/matrix?q[][pacticipant]=FrontendWebsite&q[][version]=1.0.0&q[])[pacticipant]=ProductService&latestby=cvpv --- .../provider_verification_badges.md | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/website/docs/pact_broker/advanced_topics/provider_verification_badges.md b/website/docs/pact_broker/advanced_topics/provider_verification_badges.md index dd3405b6..a288d8c9 100644 --- a/website/docs/pact_broker/advanced_topics/provider_verification_badges.md +++ b/website/docs/pact_broker/advanced_topics/provider_verification_badges.md @@ -6,8 +6,7 @@ _See the the_ [_Badges_](/pact_broker/configuration/features#badges) _section of If you are publishing [Provider verification results](provider_verification_results.md) to your Pact Broker \(v2.3.0+\), you can also display the verification status in your READMEs using a shiny badge like this one: -[![Pact Status](https://cdn.rawgit.com/wiki/pact-foundation/pact_broker/images/foo-bar-badge-verified.svg)](https://test.pactflow.io) - +[![Pact Status](https://test.pactflow.io/pacticipants/FrontendWebsite/branches/test/latest-version/can-i-deploy/to-environment/test/badge)](https://test.pactflow.io/pacticipants/FrontendWebsite/branches/test/latest-version/can-i-deploy/to-environment/test) ## Can I Deploy badge @@ -19,6 +18,8 @@ Requires version 2.94+ of the Pact Broker Returns a status badge that can be displayed in a README file that indicates whether the latest version of a pacticipant from a particular branch can be deployed to the specified environment. +[![Can I Deploy BRANCH to ENVIRONMENT](https://test.pactflow.io/pacticipants/FrontendWebsite/branches/test/latest-version/can-i-deploy/to-environment/test/badge)](https://test.pactflow.io/pacticipants/FrontendWebsite/branches/test/latest-version/can-i-deploy/to-environment/test) + ```text [![Can I Deploy BRANCH to ENVIRONMENT](https://your-broker/pacticipants/PACTICIPANT/branches/BRANCH/latest-version/can-i-deploy/to-environment/ENVIRONMENT/badge)](https://your-broker/hal-browser/browser.html#https://your-broker/pacticipants/PACTICIPANT/branches/BRANCH/latest-version/can-i-deploy/to-environment/ENVIRONMENT) ``` @@ -31,10 +32,14 @@ Requires version 2.62+ of the Pact Broker. Returns a status badge that can be displayed in a README file that indicates whether the latest version of a pacticipant with a specified tag can be deployed to the specified environment as identified by a tag. +[![Can I deploy Foo status](https://test.pactflow.io/pacticipants/FrontendWebsite/latest-version/test/can-i-deploy/to/test/badge)](https://test.pactflow.io/pacticipants/FrontendWebsite/latest-version/test/can-i-deploy/to/test) + ```text [![Can I deploy Foo status](https://your-broker/pacticipants/PACTICIPANT/latest-version/TAG/can-i-deploy/to/ENVIRIONMENT_TAG/badge)](https://your-broker/pacticipants/PACTICIPANT/latest-version/TAG/can-i-deploy/to/ENVIRIONMENT_TAG) ``` +[![Can I deploy Foo status](https://test.pactflow.io/pacticipants/FrontendWebsite/latest-version/test/can-i-deploy/to/test/badge?label=my+custom+label+here)](https://test.pactflow.io/pacticipants/FrontendWebsite/latest-version/test/can-i-deploy/to/test) + To set a custom label for the badge, set the `label` query parameter. eg `?label=my+custom+label+here`. ## Specific consumer/provider badge @@ -55,6 +60,8 @@ The URL of the badge is the URL of the latest pact with `/badge.svg` appended, a The markdown to include in your README is as follows: +[![Foo/Bar Pact Status](https://test.pactflow.io/pacts/provider/ProductService/consumer/FrontendWebsite/latest/badge.svg)](https://test.pactflow.io/pacts/provider/ProductService/consumer/FrontendWebsite/latest) + ```text [![Foo/Bar Pact Status](https://your-broker/pacts/provider/PROVIDER/consumer/CONSUMER/latest/badge.svg)](https://your-broker) ``` @@ -62,7 +69,7 @@ The markdown to include in your README is as follows: For example: ```text -[![Foo/Bar Pact Status](https://test.pactflow.io/pacts/provider/Bar/consumer/Foo/latest/badge.svg)](https://test.pactflow.io) +[![Foo/Bar Pact Status](https://test.pactflow.io/pacts/provider/ProductService/consumer/FrontendWebsite/latest/badge.svg)](https://test.pactflow.io/pacts/provider/ProductService/consumer/FrontendWebsite/latest) ``` #### With consumer and provider tags @@ -75,17 +82,19 @@ If you are using tags for both the consumer and provider versions \(this is reco ### Options -[![Pact Status](https://cdn.rawgit.com/wiki/pact-foundation/pact_broker/images/long-badge.svg)](https://test.pactflow.io) +[![Pact Status](https://test.pactflow.io/pacts/provider/ProductService/consumer/FrontendWebsite/latest/badge.svg)](https://test.pactflow.io/pacts/provider/ProductService/consumer/FrontendWebsite/latest) If your consumer and provider name make your badge too long to be aesthetically pleasing, you can shorten it in the following ways. * Show just the consumer or provider name by adding `?label=consumer` or `?label=provider` to the end of the URL. - [![Pact Status](https://cdn.rawgit.com/wiki/pact-foundation/pact_broker/images/consumer-badge.svg)](https://test.pactflow.io) + [![Pact Status](https://test.pactflow.io/pacts/provider/ProductService/consumer/FrontendWebsite/latest/badge.svg?label=consumer)](https://test.pactflow.io/pacts/provider/ProductService/consumer/FrontendWebsite/latest) * Use the pacticipant's initials by adding `?initials=true` - [![Pact Status](https://cdn.rawgit.com/wiki/pact-foundation/pact_broker/images/initials-badge.svg)](https://test.pactflow.io) + [![Pact Status](https://test.pactflow.io/pacts/provider/ProductService/consumer/FrontendWebsite/latest/badge.svg?initials=true)](https://test.pactflow.io/pacts/provider/ProductService/consumer/FrontendWebsite/latest) * Use both the `label` and the `initials` params to show only the initials of the consumer or provider. + [![Pact Status](https://test.pactflow.io/pacts/provider/ProductService/consumer/FrontendWebsite/latest/badge.svg?initials=true&label=consumer)](https://test.pactflow.io/pacts/provider/ProductService/consumer/FrontendWebsite/latest) + From fc26371e30a86f35f1496f10bea36ecfb6e4425b Mon Sep 17 00:00:00 2001 From: Yousaf Nabi Date: Mon, 28 Mar 2022 18:29:53 +0100 Subject: [PATCH 20/25] fix: faq provider states --- website/docs/faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/faq.md b/website/docs/faq.md index 75797c02..57ddc3c0 100644 --- a/website/docs/faq.md +++ b/website/docs/faq.md @@ -278,7 +278,7 @@ When Pact reads the pact files for verification on the Provider side, it needs t * If using the JVM, you can use [request filters](https://github.com/DiUS/pact-jvm/tree/master/pact-jvm-provider-gradle#modifying-the-requests-before-they-are-sent) to modify the request headers before they are sent to the Provider. * If using Pact JS you can use [request filters](https://github.com/pact-foundation/pact-js#modify-requests-prior-to-verification-request-filters) * If using Pact Go you can use [request filters](https://github.com/pact-foundation/pact-go#request-filtering) -* Configure a relaxed OAuth2 validation service on the Provider that accepts any valid headers, so long as the match the spec \(e.g. `Authorization` header\). You might leverage the [provider states](http://docs.pact.io/documentation/provider_states.html) feature for this. +* Configure a relaxed OAuth2 validation service on the Provider that accepts any valid headers, so long as the match the spec \(e.g. `Authorization` header\). You might leverage the [provider states](http://docs.pact.io/getting_started/provider_states) feature for this. * Use Ruby's `Timecop` or similar library to manipulate the runtime clock. * Use the `--custom-provider-header` option if you are using one of the implementations that wraps the Ruby standalone and there are no other options \(Python, .NET\). * In Python, this is available via the the [`header` option](https://github.com/pact-foundation/pact-python/blob/cf5d5bcd64f0537adf9ac187b23b64944f1a2043/pact/verify.py#L54-L60) From c756eb2884b5cb33595ae25216601f2e3610977a Mon Sep 17 00:00:00 2001 From: Yousaf Nabi Date: Mon, 28 Mar 2022 18:47:03 +0100 Subject: [PATCH 21/25] chore: fixing some broken links and redirects --- website/docs/blogs_videos_and_articles.md | 2 +- website/docs/getting_started.md | 4 ++-- website/docs/getting_started/further_reading.md | 2 +- website/docs/getting_started/how_pact_works.md | 4 ++-- website/docs/implementation_guides/cpp.md | 2 +- website/docs/implementation_guides/go/readme.md | 2 +- website/docs/implementation_guides/javascript/readme.md | 2 +- website/docs/implementation_guides/jvm/provider/gradle.md | 3 +-- 8 files changed, 10 insertions(+), 11 deletions(-) diff --git a/website/docs/blogs_videos_and_articles.md b/website/docs/blogs_videos_and_articles.md index 47b4569e..389b3c06 100644 --- a/website/docs/blogs_videos_and_articles.md +++ b/website/docs/blogs_videos_and_articles.md @@ -131,4 +131,4 @@ If you've seen a really good talk that's not on this list, please submit a PR to - [SE Radio](http://www.se-radio.net/2014/10/episode-213-james-lewis-on-microservices/) - [A microservices implementation retrospective](http://techblog.realestate.com.au/a-microservices-implementation-retrospective/) - [Karma Refactors to Microservices](http://www.infoq.com/news/2014/07/karma-microservices) -- [Simplifying microservices testing with pacts](http://dius.com.au/2014/05/19/simplifying-micro-service-testing-with-pacts/) +- [Simplifying microservices testing with pacts](https://dius.com.au/2014/05/20/simplifying-microservice-testing-with-pacts/) diff --git a/website/docs/getting_started.md b/website/docs/getting_started.md index 0212b342..ccbe8b4f 100644 --- a/website/docs/getting_started.md +++ b/website/docs/getting_started.md @@ -6,7 +6,7 @@ slug: / Pact is a code-first tool for testing HTTP and message integrations using `contract tests`. Contract tests assert that inter-application messages conform to a shared understanding that is documented in a contract. Without contract testing, the only way to ensure that applications will work correctly together is by using expensive and brittle integration tests. -Do you [set your house on fire to test your smoke alarm?](https://dius.com.au/2014/05/19/simplifying-micro-service-testing-with-pacts/) No, you test the contract it holds with your ears by using the testing button. Pact provides that testing button for your code, allowing you to safely confirm that your applications will work together without having to deploy the world first. +Do you [set your house on fire to test your smoke alarm?](https://dius.com.au/2014/05/20/simplifying-microservice-testing-with-pacts/) No, you test the contract it holds with your ears by using the testing button. Pact provides that testing button for your code, allowing you to safely confirm that your applications will work together without having to deploy the world first. To view an animated step-by-step explanation of how Pact works, check out this [How Pact works](https://pactflow.io/how-pact-works?utm_source=ossdocs&utm_campaign=getting_started) (external↗️) page. @@ -43,7 +43,7 @@ In general, a contract is between a _consumer_ \(for example, a client that want ## Consumer Driven Contracts -Pact is a code-first [_consumer-driven_](http://martinfowler.com/articles/consumerDrivenContracts.html) contract testing tool, and is generally used by developers and testers who code. The contract is generated during the execution of the automated consumer tests. A major advantage of this pattern is that only parts of the communication that are actually used by the consumer\(s\) get tested. This in turn means that any provider behaviour not used by current consumers is free to change without breaking tests. +Pact is a code-first [_consumer-driven_](https://martinfowler.com/articles/consumerDrivenContracts.html) contract testing tool, and is generally used by developers and testers who code. The contract is generated during the execution of the automated consumer tests. A major advantage of this pattern is that only parts of the communication that are actually used by the consumer\(s\) get tested. This in turn means that any provider behaviour not used by current consumers is free to change without breaking tests. Unlike a schema or specification \(eg. OAS\), which is a static artefact that describes all possible states of a resource, a Pact contract is enforced by executing a collection of test cases, each of which describes a single concrete request/response pair - Pact is, in effect, "contract by example". Read more on the [difference between schema testing and contract testing](https://pactflow.io/blog/contract-testing-using-json-schemas-and-open-api-part-1/). diff --git a/website/docs/getting_started/further_reading.md b/website/docs/getting_started/further_reading.md index 517b28eb..feaafb0b 100644 --- a/website/docs/getting_started/further_reading.md +++ b/website/docs/getting_started/further_reading.md @@ -27,7 +27,7 @@ Hear how Soundcloud ["Move Fast and Consumer-Driven-Contract-Testing Things"](ht ## Introductory articles -* [Getting started with Pact](https://dius.com.au/2014/05/19/simplifying-micro-service-testing-with-pacts/) +* [Getting started with Pact](https://dius.com.au/2014/05/20/simplifying-microservice-testing-with-pacts/) * [...and more!](../blogs_videos_and_articles.md) ## Getting Help diff --git a/website/docs/getting_started/how_pact_works.md b/website/docs/getting_started/how_pact_works.md index 4d969b39..08a2347e 100644 --- a/website/docs/getting_started/how_pact_works.md +++ b/website/docs/getting_started/how_pact_works.md @@ -36,7 +36,7 @@ Following the diagram: Pact tests are only successful if each step completes without error. -Usually, the interaction definition and consumer test are written together, such as this example from [this Pact walkthrough guide](https://dius.com.au/2014/05/19/simplifying-micro-service-testing-with-pacts/): +Usually, the interaction definition and consumer test are written together, such as this example from [this Pact walkthrough guide](https://dius.com.au/2014/05/20/simplifying-microservice-testing-with-pacts/): ```ruby # Describe the interaction @@ -190,7 +190,7 @@ The `publish` is the bit ("Adapter") that knows how to talk to AWS SNS, the `upd #### Further Reading -Take a look at an [example consumer project](https://docs.pactflow.io/docs/examples/aws/sns/consumer/readme) and its [example provider project](https://docs.pactflow.io/docs/examples/aws/sns/provider/readme) to see this in action. +Take a look at an [example consumer project](https://docs.pactflow.io/docs/examples/aws/sns/consumer) and its [example provider project](https://docs.pactflow.io/docs/examples/aws/sns/provider) to see this in action. ## Next steps diff --git a/website/docs/implementation_guides/cpp.md b/website/docs/implementation_guides/cpp.md index 8f7b4b8f..e7d1f30f 100644 --- a/website/docs/implementation_guides/cpp.md +++ b/website/docs/implementation_guides/cpp.md @@ -19,7 +19,7 @@ From the [Ruby Pact website](https://github.com/pact-foundation/pact-ruby): > >This allows testing of both sides of an integration point using fast unit tests. > ->This gem is inspired by the concept of "Consumer driven contracts". See http://martinfowler.com/articles/consumerDrivenContracts.html for more information. +>This gem is inspired by the concept of "Consumer driven contracts". See https://martinfowler.com/articles/consumerDrivenContracts.html for more information. Read [Getting started with Pact](https://docs.pact.io/5-minute-getting-started-guide) for more information on how to get going. diff --git a/website/docs/implementation_guides/go/readme.md b/website/docs/implementation_guides/go/readme.md index 3d979e34..63259c24 100644 --- a/website/docs/implementation_guides/go/readme.md +++ b/website/docs/implementation_guides/go/readme.md @@ -25,7 +25,7 @@ DSL for the consumer project, and interaction playback and verification for the From the [Pact website]: -> The Pact family of frameworks provide support for [Consumer Driven Contracts](http://martinfowler.com/articles/consumerDrivenContracts.html) testing. +> The Pact family of frameworks provide support for [Consumer Driven Contracts](https://martinfowler.com/articles/consumerDrivenContracts.html) testing. > A Contract is a collection of agreements between a client (Consumer) and an API (Provider) that describes the interactions that can take place between them. diff --git a/website/docs/implementation_guides/javascript/readme.md b/website/docs/implementation_guides/javascript/readme.md index 549632b2..7127cd56 100644 --- a/website/docs/implementation_guides/javascript/readme.md +++ b/website/docs/implementation_guides/javascript/readme.md @@ -21,7 +21,7 @@ Implementation of the consumer driven contract library [Pact](https://docs.pact. From the [Pact website](http://docs.pact.io/): -> The Pact family of frameworks provide support for [Consumer Driven Contracts](http://martinfowler.com/articles/consumerDrivenContracts.html) testing. +> The Pact family of frameworks provide support for [Consumer Driven Contracts](https://martinfowler.com/articles/consumerDrivenContracts.html) testing. > A Contract is a collection of agreements between a client (Consumer) and an API (Provider) that describes the interactions that can take place between them. diff --git a/website/docs/implementation_guides/jvm/provider/gradle.md b/website/docs/implementation_guides/jvm/provider/gradle.md index 25521f9f..50298df9 100644 --- a/website/docs/implementation_guides/jvm/provider/gradle.md +++ b/website/docs/implementation_guides/jvm/provider/gradle.md @@ -367,8 +367,7 @@ an override property: `pact.content_type.override..=text|binary`. ## Provider States -For a description of what provider states are, see the pact documentations: http://docs.pact.io/documentation/provider_states.html - +For a description of what provider states are, see the pact documentation: [Provider states](/getting_started/provider_states) ### Using a state change URL For each provider you can specify a state change URL to use to switch the state of the provider. This URL will From 9715e4d92a5d8cff3ea0108fa13c907bc3eaf530 Mon Sep 17 00:00:00 2001 From: Yousaf Nabi Date: Mon, 28 Mar 2022 19:52:51 +0100 Subject: [PATCH 22/25] chore: update blog.pact.io refs to https://docs.pact.io/blog --- ...w-weve-fixed-the-biggest-problem-with-the-pact-workflow.md | 2 +- website/blog/2020-02-24-introducing-wip-pacts.md | 4 ++-- website/core/Footer.js | 2 +- website/docs/blogs_videos_and_articles.md | 2 +- website/docs/help.md | 2 +- website/docs/implementation_guides/go/readme.md | 4 ++-- website/docs/implementation_guides/javascript/readme.md | 4 ++-- website/docusaurus.config.js | 2 +- website/src/pages/help.js.bak | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/website/blog/2020-02-24-how-weve-fixed-the-biggest-problem-with-the-pact-workflow.md b/website/blog/2020-02-24-how-weve-fixed-the-biggest-problem-with-the-pact-workflow.md index 6ac08f20..b438e651 100644 --- a/website/blog/2020-02-24-how-weve-fixed-the-biggest-problem-with-the-pact-workflow.md +++ b/website/blog/2020-02-24-how-weve-fixed-the-biggest-problem-with-the-pact-workflow.md @@ -60,7 +60,7 @@ We're pretty excited about this new workflow, and we hope it will help make your [tags]: https://docs.pact.io/best_practices/pact_nirvana#5-allow-contracts-to-change-without-breaking-your-builds [webhooks]: https://docs.pact.io/pact_broker/advanced_topics/webhooks -[github]: http://blog.pact.io/2018/07/16/publishing-pact-verification-statuses-to-github/ +[github]: https://docs.pact.io/blog/2018/07/16/publishing-pact-verification-statuses-to-github/ [slack]: https://github.com/pact-foundation/pact_broker/wiki/Webhook-template-library#slack---post-notification [pact-foundation-slack]: https://pact-foundation.slack.com [join]: https://slack.pact.io diff --git a/website/blog/2020-02-24-introducing-wip-pacts.md b/website/blog/2020-02-24-introducing-wip-pacts.md index 6f717236..ae86cbc1 100644 --- a/website/blog/2020-02-24-introducing-wip-pacts.md +++ b/website/blog/2020-02-24-introducing-wip-pacts.md @@ -37,6 +37,6 @@ Head to https://docs.pact.io/wip for information on how to setup your Pact Broke To start getting the benefit of this new and improved workflow, you will need to upgrade to the latest version of the Pact Broker and your Pact testing libraries. Consult the documentation for your language to find out how to enable the WIP pacts feature. -[pending-pacts]: http://blog.pact.io/2020/02/24/how-we-have-fixed-the-biggest-problem-with-the-pact-workflow/ -[git-status]: http://blog.pact.io/2018/07/16/publishing-pact-verification-statuses-to-github/ +[pending-pacts]: https://docs.pact.io/blog/2020/02/24/how-we-have-fixed-the-biggest-problem-with-the-pact-workflow/ +[git-status]: https://docs.pact.io/blog/2018/07/16/publishing-pact-verification-statuses-to-github/ [join-slack]: https://slack.pact.io diff --git a/website/core/Footer.js b/website/core/Footer.js index 58883a66..afd9c527 100644 --- a/website/core/Footer.js +++ b/website/core/Footer.js @@ -81,7 +81,7 @@ class Footer extends React.Component {
More
Pact home page Feature requests and roadmap - Blog + Blog GitHub {this.props.config.twitterUsername && (
diff --git a/website/docs/blogs_videos_and_articles.md b/website/docs/blogs_videos_and_articles.md index 389b3c06..166eaafc 100644 --- a/website/docs/blogs_videos_and_articles.md +++ b/website/docs/blogs_videos_and_articles.md @@ -2,7 +2,7 @@ title: Community videos and articles --- -Check out the official Pact blog at [blog.pact.io](http://blog.pact.io) and the [Pactflow blog](https://pactflow.io/blog) for blogs written by Pact maintainers. +Check out the official Pact blog at [blog.pact.io](https://docs.pact.io/blog) and the [Pactflow blog](https://pactflow.io/blog) for blogs written by Pact maintainers. If you've seen a really good talk that's not on this list, please submit a PR to this page with the new link. diff --git a/website/docs/help.md b/website/docs/help.md index f88d239e..ee132776 100644 --- a/website/docs/help.md +++ b/website/docs/help.md @@ -30,7 +30,7 @@ View our roadmap, request a feature, or add your vote to an existing one at [Can ## Stay up to date -Find out what's new with this project by reading our [blog](http://blog.pact.io) +Find out what's new with this project by reading our [blog](https://docs.pact.io/blog) ## Found a bug? diff --git a/website/docs/implementation_guides/go/readme.md b/website/docs/implementation_guides/go/readme.md index 63259c24..fa95ea39 100644 --- a/website/docs/implementation_guides/go/readme.md +++ b/website/docs/implementation_guides/go/readme.md @@ -454,7 +454,7 @@ Pending pacts is a feature that allows consumers to publish new contracts or cha This enables safe introduction of new contracts into the system, without breaking Provider builds, whilst still providing feedback to Consumers as per before. -See the [docs](https://docs.pact.io/pending) and this [article](http://blog.pact.io/2020/02/24/how-we-have-fixed-the-biggest-problem-with-the-pact-workflow/) for more background. +See the [docs](https://docs.pact.io/pending) and this [article](https://docs.pact.io/blog/2020/02/24/how-we-have-fixed-the-biggest-problem-with-the-pact-workflow/) for more background. #### WIP Pacts @@ -462,7 +462,7 @@ _NOTE_: This feature is currently only available on [Pactflow] WIP Pacts builds upon pending pacts, enabling provider tests to pull in _any_ contracts applicable to the provider regardless of the `tag` it was given. This is useful, because often times consumers won't follow the exact same tagging convention and so their workflow would be interrupted. This feature enables any pacts determined to be "work in progress" to be verified by the Provider, without causing a build failure. You can enable this behaviour by specifying a valid `time.Time` field for `IncludeWIPPactsSince`. This sets the start window for which new WIP pacts will be pulled down for verification, regardless of the tag. -See the [docs](https://docs.pact.io/wip) and this [article](http://blog.pact.io/2020/02/24/introducing-wip-pacts/) for more background. +See the [docs](https://docs.pact.io/wip) and this [article](https://docs.pact.io/blog/2020/02/24/introducing-wip-pacts/) for more background. #### Lifecycle of a provider verification diff --git a/website/docs/implementation_guides/javascript/readme.md b/website/docs/implementation_guides/javascript/readme.md index 7127cd56..3120b97d 100644 --- a/website/docs/implementation_guides/javascript/readme.md +++ b/website/docs/implementation_guides/javascript/readme.md @@ -432,7 +432,7 @@ Pending pacts is a feature that allows consumers to publish new contracts or cha This enables safe introduction of new contracts into the system, without breaking Provider builds, whilst still providing feedback to Consumers as per before. -See the [docs](https://docs.pact.io/pending) and this [article](http://blog.pact.io/2020/02/24/how-we-have-fixed-the-biggest-problem-with-the-pact-workflow/) for more background. +See the [docs](https://docs.pact.io/pending) and this [article](https://docs.pact.io/blog/2020/02/24/how-we-have-fixed-the-biggest-problem-with-the-pact-workflow/) for more background. #### WIP Pacts @@ -440,7 +440,7 @@ _NOTE_: This feature is available on [Pactflow] by default, and requires [config WIP Pacts builds upon pending pacts, enabling provider tests to pull in _any_ contracts applicable to the provider regardless of the `tag` it was given. This is useful, because often times consumers won't follow the exact same tagging convention and so their workflow would be interrupted. This feature enables any pacts determined to be "work in progress" to be verified by the Provider, without causing a build failure. You can enable this behaviour by specifying a valid timestamp for `includeWipPactsSince`. This sets the start window for which new WIP pacts will be pulled down for verification, regardless of the tag. -See the [docs](https://docs.pact.io/wip) and this [article](http://blog.pact.io/2020/02/24/introducing-wip-pacts/) for more background. +See the [docs](https://docs.pact.io/wip) and this [article](https://docs.pact.io/blog/2020/02/24/introducing-wip-pacts/) for more background. #### Verifying multiple contracts with the same tag (e.g. for Mobile use cases) diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index 9f663ea0..ca3d8fff 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -168,7 +168,7 @@ const siteConfig = { items: [ { label: "Blog", - href: "http://blog.pact.io", + href: "https://docs.pact.io/blog", }, { label: "GitHub", diff --git a/website/src/pages/help.js.bak b/website/src/pages/help.js.bak index ec0f7d00..378920e6 100644 --- a/website/src/pages/help.js.bak +++ b/website/src/pages/help.js.bak @@ -31,7 +31,7 @@ function Help(props) { title: 'Request a feature' }, { - content: "Find out what's new with this project by reading our [blog](http://blog.pact.io)", + content: "Find out what's new with this project by reading our [blog](https://docs.pact.io/blog)", title: 'Stay up to date', },{ content: 'Please create an executable example and raise an issue in the [repository](https://github.com/pact-foundation) of the appropriate implementation.', From 58a47941422a3eacb42dabe9e588a14235997fa3 Mon Sep 17 00:00:00 2001 From: Yousaf Nabi Date: Mon, 28 Mar 2022 19:56:30 +0100 Subject: [PATCH 23/25] chore: more blog links - gotta catch em all :) --- .../blog/2020-02-24-introducing-wip-pacts.md | 2 +- .../docs/implementation_guides/go/readme.md | 107 +++++++++--------- .../javascript/readme.md | 2 +- 3 files changed, 55 insertions(+), 56 deletions(-) diff --git a/website/blog/2020-02-24-introducing-wip-pacts.md b/website/blog/2020-02-24-introducing-wip-pacts.md index ae86cbc1..336b1286 100644 --- a/website/blog/2020-02-24-introducing-wip-pacts.md +++ b/website/blog/2020-02-24-introducing-wip-pacts.md @@ -37,6 +37,6 @@ Head to https://docs.pact.io/wip for information on how to setup your Pact Broke To start getting the benefit of this new and improved workflow, you will need to upgrade to the latest version of the Pact Broker and your Pact testing libraries. Consult the documentation for your language to find out how to enable the WIP pacts feature. -[pending-pacts]: https://docs.pact.io/blog/2020/02/24/how-we-have-fixed-the-biggest-problem-with-the-pact-workflow/ +[pending-pacts]: https://docs.pact.io/blog/2020/02/24/how-weve-fixed-the-biggest-problem-with-the-pact-workflow [git-status]: https://docs.pact.io/blog/2018/07/16/publishing-pact-verification-statuses-to-github/ [join-slack]: https://slack.pact.io diff --git a/website/docs/implementation_guides/go/readme.md b/website/docs/implementation_guides/go/readme.md index fa95ea39..73f6232c 100644 --- a/website/docs/implementation_guides/go/readme.md +++ b/website/docs/implementation_guides/go/readme.md @@ -45,59 +45,58 @@ Read [Getting started with Pact] for more information for beginners. -- [Pact Go](#pact-go) - - [Introduction](#introduction) - - [Table of Contents](#table-of-contents) - - [Versions](#versions) - - [Installation](#installation) - - [Go get](#go-get) - - [Installation on \*nix](#installation-on-\nix) - - [V3 Beta](#v3-beta) - - [Using Pact](#using-pact) - - [HTTP API Testing](#http-api-testing) - - [Consumer Side Testing](#consumer-side-testing) - - [Provider API Testing](#provider-api-testing) - - [Provider Verification](#provider-verification) - - [Provider States](#provider-states) - - [Before and After Hooks](#before-and-after-hooks) - - [Request Filtering](#request-filtering) - - [Example: API with Authorization](#example-api-with-authorization) - - [Pending Pacts](#pending-pacts) - - [WIP Pacts](#wip-pacts) - - [Lifecycle of a provider verification](#lifecycle-of-a-provider-verification) - - [Publishing pacts to a Pact Broker and Tagging Pacts](#publishing-pacts-to-a-pact-broker-and-tagging-pacts) - - [Publishing from Go code](#publishing-from-go-code) - - [Publishing Provider Verification Results to a Pact Broker](#publishing-provider-verification-results-to-a-pact-broker) - - [Publishing from the CLI](#publishing-from-the-cli) - - [Using the Pact Broker with Basic authentication](#using-the-pact-broker-with-basic-authentication) - - [Using the Pact Broker with Bearer Token authentication](#using-the-pact-broker-with-bearer-token-authentication) - - [Asynchronous API Testing](#asynchronous-api-testing) - - [Consumer](#consumer) - - [Provider (Producer)](#provider-producer) - - [Pact Broker Integration](#pact-broker-integration) - - [Matching](#matching) - - [Matching on types](#matching-on-types) - - [Matching on arrays](#matching-on-arrays) - - [Matching by regular expression](#matching-by-regular-expression) - - [Match common formats](#match-common-formats) - - [Auto-generate matchers from struct tags](#auto-generate-matchers-from-struct-tags) - - [Tutorial (60 minutes)](#tutorial-60-minutes) - - [Examples](#examples) - - [HTTP APIs](#http-apis) - - [Asynchronous APIs](#asynchronous-apis) - - [Integrated examples](#integrated-examples) - - [Troubleshooting](#troubleshooting) - - [Splitting tests across multiple files](#splitting-tests-across-multiple-files) - - [Output Logging](#output-logging) - - [Check if the CLI tools are up to date](#check-if-the-cli-tools-are-up-to-date) - - [Disable CLI checks to speed up tests](#disable-cli-checks-to-speed-up-tests) - - [Re-run a specific provider verification test](#re-run-a-specific-provider-verification-test) - - [Verifying APIs with a self-signed certificate](#verifying-apis-with-a-self-signed-certificate) - - [Testing AWS API Gateway APIs](#testing-aws-api-gateway-apis) - - [Contact](#contact) - - [Documentation](#documentation) - - [Roadmap](#roadmap) - - [Contributing](#contributing) +- [Introduction](#introduction) +- [Table of Contents](#table-of-contents) +- [Versions](#versions) +- [Installation](#installation) + - [Go get](#go-get) + - [Installation on \*nix](#installation-on-nix) +- [V3 Beta](#v3-beta) +- [Using Pact](#using-pact) +- [HTTP API Testing](#http-api-testing) + - [Consumer Side Testing](#consumer-side-testing) + - [Provider API Testing](#provider-api-testing) + - [Provider Verification](#provider-verification) + - [Provider States](#provider-states) + - [Before and After Hooks](#before-and-after-hooks) + - [Request Filtering](#request-filtering) + - [Example: API with Authorization](#example-api-with-authorization) + - [Pending Pacts](#pending-pacts) + - [WIP Pacts](#wip-pacts) + - [Lifecycle of a provider verification](#lifecycle-of-a-provider-verification) + - [Publishing pacts to a Pact Broker and Tagging Pacts](#publishing-pacts-to-a-pact-broker-and-tagging-pacts) + - [Publishing from Go code](#publishing-from-go-code) + - [Publishing Provider Verification Results to a Pact Broker](#publishing-provider-verification-results-to-a-pact-broker) + - [Publishing from the CLI](#publishing-from-the-cli) + - [Using the Pact Broker with Basic authentication](#using-the-pact-broker-with-basic-authentication) + - [Using the Pact Broker with Bearer Token authentication](#using-the-pact-broker-with-bearer-token-authentication) +- [Asynchronous API Testing](#asynchronous-api-testing) + - [Consumer](#consumer) + - [Provider (Producer)](#provider-producer) + - [Pact Broker Integration](#pact-broker-integration) +- [Matching](#matching) + - [Matching on types](#matching-on-types) + - [Matching on arrays](#matching-on-arrays) + - [Matching by regular expression](#matching-by-regular-expression) + - [Match common formats](#match-common-formats) + - [Auto-generate matchers from struct tags](#auto-generate-matchers-from-struct-tags) +- [Tutorial (60 minutes)](#tutorial-60-minutes) +- [Examples](#examples) + - [HTTP APIs](#http-apis) + - [Asynchronous APIs](#asynchronous-apis) + - [Integrated examples](#integrated-examples) +- [Troubleshooting](#troubleshooting) + - [Splitting tests across multiple files](#splitting-tests-across-multiple-files) + - [Output Logging](#output-logging) + - [Check if the CLI tools are up to date](#check-if-the-cli-tools-are-up-to-date) + - [Disable CLI checks to speed up tests](#disable-cli-checks-to-speed-up-tests) + - [Re-run a specific provider verification test](#re-run-a-specific-provider-verification-test) + - [Verifying APIs with a self-signed certificate](#verifying-apis-with-a-self-signed-certificate) + - [Testing AWS API Gateway APIs](#testing-aws-api-gateway-apis) +- [Contact](#contact) +- [Documentation](#documentation) +- [Roadmap](#roadmap) +- [Contributing](#contributing) ## Versions @@ -454,7 +453,7 @@ Pending pacts is a feature that allows consumers to publish new contracts or cha This enables safe introduction of new contracts into the system, without breaking Provider builds, whilst still providing feedback to Consumers as per before. -See the [docs](https://docs.pact.io/pending) and this [article](https://docs.pact.io/blog/2020/02/24/how-we-have-fixed-the-biggest-problem-with-the-pact-workflow/) for more background. +See the [docs](https://docs.pact.io/pending) and this [article](https://docs.pact.io/blog/2020/02/24/how-weve-fixed-the-biggest-problem-with-the-pact-workflow) for more background. #### WIP Pacts diff --git a/website/docs/implementation_guides/javascript/readme.md b/website/docs/implementation_guides/javascript/readme.md index 3120b97d..95bb0044 100644 --- a/website/docs/implementation_guides/javascript/readme.md +++ b/website/docs/implementation_guides/javascript/readme.md @@ -432,7 +432,7 @@ Pending pacts is a feature that allows consumers to publish new contracts or cha This enables safe introduction of new contracts into the system, without breaking Provider builds, whilst still providing feedback to Consumers as per before. -See the [docs](https://docs.pact.io/pending) and this [article](https://docs.pact.io/blog/2020/02/24/how-we-have-fixed-the-biggest-problem-with-the-pact-workflow/) for more background. +See the [docs](https://docs.pact.io/pending) and this [article](https://docs.pact.io/blog/2020/02/24/how-weve-fixed-the-biggest-problem-with-the-pact-workflow) for more background. #### WIP Pacts From d024f47b4bbe460e936dbfe6d6ba32116f104a4d Mon Sep 17 00:00:00 2001 From: Yousaf Nabi Date: Tue, 29 Mar 2022 16:44:23 +0100 Subject: [PATCH 24/25] docs: update blog link --- website/blog/2018-07-10-welcome.md | 2 +- website/docs/blogs_videos_and_articles.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/website/blog/2018-07-10-welcome.md b/website/blog/2018-07-10-welcome.md index 17b09281..76e44a3c 100644 --- a/website/blog/2018-07-10-welcome.md +++ b/website/blog/2018-07-10-welcome.md @@ -6,4 +6,4 @@ Pact is a tool for implementing "consumer driven contracts" - a technique for te Since its creation in 2013, Pact has come a long way. We're always adding new features in response to the feedback we get from our users and our own experience, but recently we've realised that we've done a poor job of letting everyone know about the awesome new things we've added along the way. -So, we've started blog.pact.io as a place to let everyone know about new features in Pact, to share people's Pact experiences (good and bad!), and to help build a community of Pact users who can help each other. If you haven't already, please join us at [slack.pact.io](http://slack.pact.io/), and if you'd like to contribute a post to our blog, chat to us on the #blog channel. +So, we've started [docs.pact.io/blog](https://docs.pact.io/blog) as a place to let everyone know about new features in Pact, to share people's Pact experiences (good and bad!), and to help build a community of Pact users who can help each other. If you haven't already, please join us at [slack.pact.io](http://slack.pact.io/), and if you'd like to contribute a post to our blog, chat to us on the #blog channel. diff --git a/website/docs/blogs_videos_and_articles.md b/website/docs/blogs_videos_and_articles.md index 166eaafc..45b614eb 100644 --- a/website/docs/blogs_videos_and_articles.md +++ b/website/docs/blogs_videos_and_articles.md @@ -2,7 +2,7 @@ title: Community videos and articles --- -Check out the official Pact blog at [blog.pact.io](https://docs.pact.io/blog) and the [Pactflow blog](https://pactflow.io/blog) for blogs written by Pact maintainers. +Check out the official Pact blog at [docs.pact.io/blog](https://docs.pact.io/blog) and the [Pactflow blog](https://pactflow.io/blog) for blogs written by Pact maintainers. If you've seen a really good talk that's not on this list, please submit a PR to this page with the new link. From 4d2298d051acf6497617f2da80d3e4ed0fb18d0a Mon Sep 17 00:00:00 2001 From: Yousaf Nabi Date: Tue, 29 Mar 2022 19:22:07 +0100 Subject: [PATCH 25/25] chore: make amendments to display in Pact concepts --- website/docs/getting_started/conceptual_overview.md | 8 +++++--- .../consumer-domain-model.png | Bin .../conceptual_overview_images/pacticipant.png | Bin .../provider-domain-model.png | Bin website/sidebars.json | 1 + 5 files changed, 6 insertions(+), 3 deletions(-) rename website/docs/{getting_started => media}/conceptual_overview_images/consumer-domain-model.png (100%) rename website/docs/{getting_started => media}/conceptual_overview_images/pacticipant.png (100%) rename website/docs/{getting_started => media}/conceptual_overview_images/provider-domain-model.png (100%) diff --git a/website/docs/getting_started/conceptual_overview.md b/website/docs/getting_started/conceptual_overview.md index 50605e21..ad106fb7 100644 --- a/website/docs/getting_started/conceptual_overview.md +++ b/website/docs/getting_started/conceptual_overview.md @@ -1,8 +1,10 @@ # Pact Conceptual Overview + Using Pact successfully requires you to understand how Pact works and the concepts and terminology behind Pact. If you try to build your CI/CD without this foundational understanding, you may find yourself getting confused or getting unexpected results. ## Consumers and publishing pacts + Whenever a consumer runs a contract test for a particular provider and it succeeds, a file is generated that records all of the interactions between the consumer and the provider. This record is called a pact. @@ -16,7 +18,7 @@ toggles. In general, you want to uniquely identify each version of the consumer A given pact published by the consumer may or may not change actual contents of the pact (e.g. by adding a request parameter, or changing the expected results). If it does change, then the pact gets a new __pact version__. -![Consumer domain model](conceptual_overview_images/consumer-domain-model.png) +![Consumer domain model](../media/conceptual_overview_images/consumer-domain-model.png) It's important to understand a few rules about how consumers relate to pacts: @@ -61,7 +63,7 @@ current branch (e.g. a PR branch or the main branch), or you can tag it with the The general recommendation is to set a tag of the branch name when a verification passes, and set a tag of the environment name (like "prod" or "staging") when the provider is deployed to that environment. -![Provider domain model](conceptual_overview_images/provider_domain_model.png) +![Provider domain model](../media/conceptual_overview_images/provider-domain-model.png) Let's expand the example from above to include the provider and its verifications. @@ -82,7 +84,7 @@ The Pact team has generalized the "consumer" and "provider" roles of a pact usin pact publication has two pacticipants: the consumer and the provider. A verification result also has two pacticipants: the consumer and the provider. -![Pacticipant domain model](conceptual_overview_images/pacticipant.png) +![Pacticipant domain model](../media/conceptual_overview_images/pacticipant.png) This generalized concept of a pacticipant can be useful because sometimes you can perform the same operations on a pacticipant regardless of whether it is a consumer or a provider. diff --git a/website/docs/getting_started/conceptual_overview_images/consumer-domain-model.png b/website/docs/media/conceptual_overview_images/consumer-domain-model.png similarity index 100% rename from website/docs/getting_started/conceptual_overview_images/consumer-domain-model.png rename to website/docs/media/conceptual_overview_images/consumer-domain-model.png diff --git a/website/docs/getting_started/conceptual_overview_images/pacticipant.png b/website/docs/media/conceptual_overview_images/pacticipant.png similarity index 100% rename from website/docs/getting_started/conceptual_overview_images/pacticipant.png rename to website/docs/media/conceptual_overview_images/pacticipant.png diff --git a/website/docs/getting_started/conceptual_overview_images/provider-domain-model.png b/website/docs/media/conceptual_overview_images/provider-domain-model.png similarity index 100% rename from website/docs/getting_started/conceptual_overview_images/provider-domain-model.png rename to website/docs/media/conceptual_overview_images/provider-domain-model.png diff --git a/website/sidebars.json b/website/sidebars.json index 93b58e62..24c56052 100644 --- a/website/sidebars.json +++ b/website/sidebars.json @@ -176,6 +176,7 @@ }, { "Pact concepts": [ + "getting_started/conceptual_overview", "getting_started/terminology", "getting_started/testing-scope", {