Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature pacts created before the provider branches aren't included in WIP #427

Closed
bethesque opened this issue May 7, 2021 · 2 comments
Closed

Comments

@bethesque
Copy link
Member

I am experiment WIP feature from
https://docs.pact.io/pact_broker/advanced_topics/wip_pacts/#technical-details
http://blog.pact.io/2020/02/24/introducing-wip-pacts/
And https://docs.pactflow.io/docs/workshops/ci-cd/workshop/verifying-feature-pacts
Most of them demonstrate on Provider master branch. It will work because In mature of contract testing, master tag should be already exist.
But in our case we want something.
Consumer: Checkout c-feat-x branch require API getUser from provider, writing test and publish it with c-feat-x tag
Provider: Checkout p-feat-x branch, after implement getUser when verify we want it will verify c-feat-x without modify Verify configuration then we think WIP feature will work so we have pactfoundation/pact-broker:2.79.1.0 running locally and something like this.
....
enablePending: true,
includeWipPactsSince: "2020-10-31",
providerVersion: gitHash, // gitHash is short version 9d76502
providerVersionTags: [gitBranch], // p-feat-x
What we expect when run verify: c-feat-x is veified
BUT What we got when run verify: c-feat-x is not included in WIP list => it’s not verified
Dig more into the docs(https://docs.pact.io/pact_broker/advanced_topics/wip_pacts/#technical-details) we find out at at number 5
5. Discard all the pacts that were published before the first instance of this provider tag (this is so that if you create a brand new
provider branch, you don’t get EVERY head pact included in the WIP pacts list).
Yeah it explain why we don’t have c-feat-x in the WIP list because it’s published before first p-feat-x tag created.
==> Now we can understand it but we can not find out our solution for our case (i think that’s is common workflow of dev team).

https://pact-foundation.slack.com/archives/C9VBGLUM9/p1620349213299100

@bethesque
Copy link
Member Author

PR to fix this #432

@bethesque
Copy link
Member Author

Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant