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

Allow can-i-deploy to return true when there is a missing verification between a consumer version/provider version if there is another successful verification that contains verifications for all the interactions in the pact #46

Open
canny bot opened this issue Jun 26, 2024 · 6 comments

Comments

@canny
Copy link

canny bot commented Jun 26, 2024

@YOU54F
Copy link
Member

YOU54F commented Jun 27, 2024

Tim Jones - February 17, 2021

Oooh! I like this

@YOU54F
Copy link
Member

YOU54F commented Jun 27, 2024

Beth - February 17, 2021

eg.

  • Pact A contains interaction a, b
  • Pact B contains interactions a, b, c
  • Consumer v1 publishes pact A, Provider v1 verifies it successfully.
  • Consumer v2 publishes pact B, Provider v2 verifies it successfully.

Currently, matrix would look like:

  • C1 / P1 success=true
  • C2 / P2 success=true
  • C1 / P2 success=??? (never verified, but we know that because Pact A was successfully verified by P2, then P1 must also be valid).

Question - is this useful? Or does it never really come up in practice? Need to do some further thinking about it.

@YOU54F
Copy link
Member

YOU54F commented Jun 27, 2024

Matt Fellows - February 17, 2021

I can see at least one potential use - a provider "self-verification". If it could write a Pact test for itself with all of its defined behaviour, any new consumer coming on board would automatically be compatible if it only used a subset of that contract. Very useful in the retrofitting use case, and helps get around the chicken-egg problem when first adding a consumer contract.

@YOU54F
Copy link
Member

YOU54F commented Jun 27, 2024

Matt Fellows - February 17, 2021

Related to this, although it's a separate request I think, is being able to collapse contracts at the point of verification. As it works today, in the Pacts for verification API, you are returned multiple contracts to verify. In many cases, there may be overlap (e.g. master and prod will likely overlap significantly for a given consumer). Collapsing the contracts into only the different interactions could speed things up.
I think we tested this though, and from memory, it didn't lead to a big performance improvement. But worth remembering.

@YOU54F
Copy link
Member

YOU54F commented Jun 27, 2024

Matt Fellows - February 17, 2021

Related to this, although it's a separate request I think, is being able to collapse contracts at the point of verification. As it works today, in the Pacts for verification API, you are returned multiple contracts to verify. In many cases, there may be overlap (e.g. master and prod will likely overlap significantly for a given consumer). Collapsing the contracts into only the different interactions could speed things up.
I think we tested this though, and from memory, it didn't lead to a big performance improvement. But worth remembering.

Beth - February 17, 2021

Matt Fellows: Ah yes. I did the stats on this and the numbers said, there were a small number of users for whom it would make a big difference, and a large number of users for whom it would make a small/medium difference.

4 likes

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