Ashish Garg
03/14/2023, 2:19 PM14:50:49 r6mE7ZKysbDjBMD6lurpN0xZ | {"notices":[{"type":"error","text":"Cannot change the content of the pact for label-svc version 2.4.0.ffc70b7 and provider label-svc, as race conditions will cause unreliable results for can-i-deploy. Each pact must be published with a unique consumer version number. For more information see <https://docs.pact.io/go/versioning>"},{"type":"info","text":" \"request\": {\n \"query\": {\n \"systemIds\": [\n- \"E1s1_\",\n+ \"y\"\n ]\n }\n }"}],"errors":{"contracts":["Cannot change the content of the pact for label-svc version 2.4.0.ffc70b7 and provider label-svc, as race conditions will cause unreliable results for can-i-deploy. Each pact must be published with a unique consumer version number. For more information see <https://docs.pact.io/go/versioning>"]}}
Thanks.Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Ashish Garg
03/14/2023, 9:56 PMAshish Garg
03/14/2023, 10:00 PMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Ashish Garg
03/15/2023, 2:53 AMTimothy Jones
03/15/2023, 3:42 AMMy guess would be that you’re using matchers and not providing example values, and they are being populated with random values and therefore changingAside, but shouldn’t it… not do this?
Timothy Jones
03/15/2023, 3:43 AMAshish Garg
03/15/2023, 7:06 AMMatt (pactflow.io / pact-js / pact-go)
Aside, but shouldn’t it… not do this?Yes, I’ve argued this point also, but there are some APIs in Pact JVM that would require deprecation for this to happen. In any case we have matchers that don’t accept examples, the example is always a hard coded value, not a generated one
Matt (pactflow.io / pact-js / pact-go)
Wouldn’t it be better to have the random examples generated at verification time? Since the contract is “this bit is <any string>”yes. These matchers existed before the concept of generators though. It’s actually a much simpler problem than generators - it’s just that the implementation uses random strings, rather than hard coded ones. Probably that would be the way to resolve this (that way the API hasn’t broken). It’s possible of course people have relied on the random behaviour (aka Hyrum’s Law)
Beth (pactflow.io/Pact Broker/pact-ruby)
Beth (pactflow.io/Pact Broker/pact-ruby)
Cannot change the content of the pact for %{consumer_name} version %{consumer_version_number} and provider %{provider_name}, as race conditions will cause unreliable results for can-i-deploy. Each pact must be published with a unique consumer version number. Some Pact libraries generate random data when a concrete value for a type matcher is not specified, and this can cause the contract to mutate - ensure you have given example values for all type matchers. For more information see <https://docs.pact.io/go/versioning>Timothy Jones
03/17/2023, 1:55 AM