-
-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
169 additions
and
0 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
script/github-issues/add-branch-support-for-provider-versions/issue-text.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Add support for publishing verification results with a branch using the pact-ruby-standalone | ||
|
||
The Pact Broker now supports branches as first class entities. You can read more about this here: https://github.com/pact-foundation/docs.pact.io/blob/feat/deployments-and-releases/website/blog/2021-07-04-why-we-are-getting-rid-of-tags.md | ||
|
||
To allow users to use this feature: | ||
|
||
* Upgrade the pact-ruby-standalone to at least version `1.88.70` | ||
* Add an appropriately prefixed "branch" property to the user facing interface (make it match the existing provider name, tag, and version properties) | ||
* Pass the branch through to the pact provider verifier CLI using the parameter `--provider-version-branch` |
6 changes: 6 additions & 0 deletions
6
script/github-issues/add-branch-support-for-provider-versions/issues.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
https://github.com/pact-foundation/pact-js/issues/750 | ||
https://github.com/pact-foundation/pact-net/issues/327 | ||
https://github.com/pact-foundation/pact-python/issues/267 | ||
https://github.com/pact-foundation/pact-php/issues/223 | ||
https://github.com/pact-foundation/pact-go/issues/180 | ||
https://github.com/DiUS/pact-consumer-swift/issues/127 |
10 changes: 10 additions & 0 deletions
10
script/github-issues/add-branch-support-for-provider-versions/raise-issue-in-client-repos.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/sh | ||
|
||
repos="pact-js pact-net pact-python pact-php pact-go pact-consumer-swift" | ||
|
||
issue_text_file=$(realpath $(dirname "$0")/issue-text.txt) | ||
|
||
for repo in $repos; do | ||
cd "../${repo}" | ||
hub issue create --file "${issue_text_file}" --labels "help wanted,enhancement" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Add branch support | ||
|
||
The Pact Broker now supports branches as first class entities. You can read more about this here: https://github.com/pact-foundation/docs.pact.io/blob/feat/deployments-and-releases/website/blog/2021-07-04-why-we-are-getting-rid-of-tags.md | ||
|
||
Please add support for branches in the following way (depending on how you publish pacts and verifications): | ||
|
||
* If this |
Empty file.
10 changes: 10 additions & 0 deletions
10
script/github-issues/add-branch-support/raise-issue-in-client-repos.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/sh | ||
|
||
repos="pact-js pact-jvm pact-net pact-python scala-pact pact-php pact-go pact pact-reference pact4s" | ||
|
||
issue_text_file=$(realpath $(dirname "$0")/issue-text.txt) | ||
|
||
for repo in $repos; do | ||
cd "../${repo}" | ||
hub issue create --file "${issue_text_file}" --labels "help wanted,good first issue,enhancement" | ||
done |
47 changes: 47 additions & 0 deletions
47
script/github-issues/branch-consumer-version-selector/issue-text.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
Add support for branches in consumer version selectors used | ||
|
||
The Pact Broker now supports branches as first class entities. You can read more about this here: https://docs.pact.io/pact_broker/branches | ||
|
||
## Description | ||
|
||
Please add support for specifying branch related properties in the consumer version selectors that are sent to the Pact Broker when requesting pacts to verify. Please do not do any verification of the consumer version selectors on the client side - the validation rules are subject to change. Just ensure that any error response is displayed to the user. | ||
|
||
* Allow a String `branch` property to be set for the consumer version selector. | ||
* Allow a Boolean `mainBranch` property to be set for the consumer version selector. | ||
* Expose and document the `branch` and `mainBranch` properties in the user facing API. | ||
|
||
## Verifying the changes | ||
|
||
* Publish tests pacts to the test broker | ||
|
||
``` | ||
export PACT_BROKER_BASE_URL="https://test.pact.dius.com.au" | ||
export PACT_BROKER_USERNAME="dXfltyFMgNOFZAxr8io9wJ37iUpY42M" | ||
export PACT_BROKER_PASSWORD="O5AIZWxelWbLvqMd8PkAVycBJh2Psyg1" | ||
|
||
docker run --rm \ | ||
-e PACT_BROKER_BASE_URL \ | ||
-e PACT_BROKER_USERNAME \ | ||
-e PACT_BROKER_PASSWORD \ | ||
pactfoundation/pact-cli:0.50.0.14 \ | ||
publish \ | ||
/pact/example/pacts \ | ||
--consumer-app-version fake-git-sha-for-demo-$(date +%s) \ | ||
--branch main | ||
|
||
docker run --rm \ | ||
-e PACT_BROKER_BASE_URL \ | ||
-e PACT_BROKER_USERNAME \ | ||
-e PACT_BROKER_PASSWORD \ | ||
pactfoundation/pact-cli:0.50.0.14 \ | ||
publish \ | ||
/pact/example/pacts \ | ||
--consumer-app-version fake-git-sha-for-demo-$(date +%s) \ | ||
--branch feat/x | ||
``` | ||
|
||
* Using your pact client library, verify `{ "mainBranch": true }` | ||
* You should receive the main pact | ||
* Using your pact client library, verify `{ "branch": "feat/x" }` | ||
* You should receive the feat/x pact | ||
|
Empty file.
10 changes: 10 additions & 0 deletions
10
script/github-issues/branch-consumer-version-selector/raise-issue-in-client-repos.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/sh | ||
|
||
repos="pact-js pact-jvm pact-net pact-python scala-pact pact-php pact-go pact-reference pact4s pact-consumer-swift" | ||
|
||
issue_text_file=$(realpath $(dirname "$0")/issue-text.txt) | ||
|
||
for repo in $repos; do | ||
cd "../${repo}" | ||
hub issue create --file "${issue_text_file}" --labels "help wanted,good first issue,enhancement" | ||
done |
File renamed without changes.
File renamed without changes.
File renamed without changes.
26 changes: 26 additions & 0 deletions
26
script/github-issues/deployed-and-released-selectors-docs/issue-text.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Add support for consumer version selectors for deployed and released versions | ||
|
||
Please add support for the following keys to be used in the consumer version selectors when fetching pacts for verification: | ||
|
||
``` | ||
{ "deployedOrReleased": true } | ||
|
||
{ "deployed": true } | ||
|
||
{ "released": true } | ||
|
||
{ "environment": "<env name>" } | ||
|
||
{ "deployed": true } | ||
|
||
{ "released": true } | ||
|
||
``` | ||
|
||
These keys can be used in various combinations ( eg. `{ "environment": "prod", released: true, consumer: "Foo" }` ). Please allow any combination of keys, and do not validate them locally, as the validation rules can change over time as support is added for new selectors - just ensure that any errors returned from the API are displayed clearly to the user. | ||
|
||
See https://github.com/pact-foundation/pact_broker/blob/master/lib/pact_broker/doc/views/provider-pacts-for-verification.markdown for the usage docs of each selector. | ||
|
||
As more selectors will be added over time, it's my preference that the consumer version selectors are not strongly typed, and are just passed through straight from the configuration object to the API, so that we don't have to make code changes to the Pact clients each time we add new selectors. (eg. there will be new selectors coming for branch support very soon). I understand that this is not compatible with the idioms of every Pact client language however, so do whatever you need to do to make the new selectors work elegantly within your language. | ||
|
||
Please update https://docs.pact.io/pact_broker/advanced_topics/consumer_version_selectors/ for your language once the selectors have been released. |
9 changes: 9 additions & 0 deletions
9
script/github-issues/deployed-and-released-selectors-docs/issues.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
https://github.com/pact-foundation/pact-js/issues/715 | ||
https://github.com/pact-foundation/pact-jvm/issues/1407 | ||
https://github.com/pact-foundation/pact-net/issues/311 | ||
https://github.com/pact-foundation/pact-python/issues/246 | ||
https://github.com/ITV/scala-pact/issues/224 | ||
https://github.com/pact-foundation/pact-php/issues/206 | ||
https://github.com/pact-foundation/pact-go/issues/172 | ||
https://github.com/pact-foundation/pact-ruby/issues/243 | ||
https://github.com/pact-foundation/pact-reference/issues/125 |
10 changes: 10 additions & 0 deletions
10
script/github-issues/deployed-and-released-selectors-docs/raise-issue-in-client-repos.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/sh | ||
|
||
repos="pact-js pact-jvm pact-net pact-python scala-pact pact-php pact-go pact pact-reference" | ||
|
||
issue_text_file=$(realpath $(dirname "$0")/issue-text.txt) | ||
|
||
for repo in $repos; do | ||
cd "../${repo}" | ||
hub issue create --file "${issue_text_file}" --labels "help wanted,good first issue,enhancement" | ||
done |
5 changes: 5 additions & 0 deletions
5
script/github-issues/include-pending-by-default/issue-text.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Set "enable pending" to true by default | ||
|
||
The [pending](https://docs.pact.io/pending) feature has been used for long enough now to show that it works, and that there is little reason to ever have it turned off any more. The Pact Broker now defaults to `true` if the `includePendingStatus` field is not set, however, this will not take effect if the client side has it set to false by default. Please set `enablePending` to true by default now, to ensure it is turned on for all older and future versions of the Pact Broker. | ||
|
||
Consider printing a warning message if the user does set it to false explicitly, along the lines of "We recommend setting enablePending to true. For more information, please see https://docs.pact.io/pending" |
10 changes: 10 additions & 0 deletions
10
script/github-issues/include-pending-by-default/issues.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
https://github.com/pact-foundation/pact-js/issues/740 | ||
https://github.com/pact-foundation/pact-jvm/issues/1440 | ||
https://github.com/pact-foundation/pact-net/issues/322 | ||
https://github.com/pact-foundation/pact-python/issues/264 | ||
https://github.com/ITV/scala-pact/issues/228 | ||
https://github.com/pact-foundation/pact-php/issues/221 | ||
https://github.com/pact-foundation/pact-go/issues/178 | ||
https://github.com/pact-foundation/pact-ruby/issues/246 | ||
https://github.com/pact-foundation/pact-reference/issues/143 | ||
https://github.com/jbwheatley/pact4s/issues/69 |
10 changes: 10 additions & 0 deletions
10
script/github-issues/include-pending-by-default/raise-issue-in-client-repos.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/sh | ||
|
||
repos="pact-js pact-jvm pact-net pact-python scala-pact pact-php pact-go pact pact-reference pact4s" | ||
|
||
issue_text_file=$(realpath $(dirname "$0")/issue-text.txt) | ||
|
||
for repo in $repos; do | ||
cd "../${repo}" | ||
hub issue create --file "${issue_text_file}" --labels "help wanted,good first issue,enhancement" | ||
done |