Stanislav Vodetskyi
10/15/2024, 6:58 PMcan-i-deploy or can-i-merge for that version with --retry-while-unknown flag it behaves differently depending on whether the service is a consumer-only or if it has provider tests:
• if the service has consumer tests only, the command will not retry and will exit immediately
• if the service has provider tests (in my case it was provider tests only), it will retry as specified by flagsStanislav Vodetskyi
10/15/2024, 7:01 PMunknown in the result returned by the broker.
What's the logic behind the unknown field, like when is it populated?Matt (pactflow.io / pact-js / pact-go)
--retry-while-unknown is orthogonal to the application’s role, although in practice I think it means a verification result has not yet been populated for the target version to be deployed/merged.
e.g. if you wanted to do can-i-deploy -a X -v vX then it would lookup vX in the broker, check for any related contracts and verification results associated with them. If there are any results not published, I think this would produce an unknown value for that, and wait.
I think what you might be saying is that you’ve created version vX in the broker, but have yet to publish a contract associated with it and it’s not waiting?Stanislav Vodetskyi
10/16/2024, 7:58 AMStanislav Vodetskyi
10/16/2024, 7:59 AMprovider object under matrix had name set to X but version to nullStanislav Vodetskyi
10/16/2024, 8:02 AMX as a dependency, but vX was never verified against that consumer pact. However in case of a service that's consumer-only, there is no contract in the broker that calls it a dependency, so it just exits?Matt (pactflow.io / pact-js / pact-go)
Stanislav Vodetskyi
11/07/2024, 7:13 PMStanislav Vodetskyi
11/07/2024, 7:14 PM/can-i-deploy?pacticipant=cc-useless-service&version=non-existent&environment=stag API call via HAL,
this is a provider service (ie there are consumers present and deployed that depend on it)Stanislav Vodetskyi
11/07/2024, 7:14 PMcan-i-deploy cli for this, it will retry as specified via --retry flagsStanislav Vodetskyi
11/07/2024, 7:15 PM{
"summary": {
"deployable": false,
"reason": "No pacts or verifications have been published for version non-existent of cc-pointless-service",
"success": 0,
"failed": 0,
"unknown": 0
},
"notices": [
{
"type": "error",
"text": "No pacts or verifications have been published for version non-existent of cc-pointless-service"
}
],
"matrix": []
}