Ruth
08/27/2024, 12:07 PMProviderPactTest.initializationError
au.com.dius.pact.core.pactbroker.RequestFailedException: Request to path 'https://<orga>.<http://pactflow.io/pacts/provider/<provider/for-verification|pactflow.io/pacts/provider/<provider/for-verification>' failed with response 500
So I have to run them 2-3 times to get them working. any idea what the problem is?Matt (pactflow.io / pact-js / pact-go)
Ilia
08/27/2024, 11:15 PMIlia
08/27/2024, 11:15 PMMatt (pactflow.io / pact-js / pact-go)
Ruth
08/30/2024, 7:47 AMIlia
08/30/2024, 8:13 AMRuth
08/30/2024, 8:35 AMphanindra srungavarapu
08/30/2024, 10:34 AM"includeWipPactsSince":"2024-01-01"
is there a way to change this date to more recent, onephanindra srungavarapu
08/30/2024, 10:40 AMincludeWipPactsSinceRuth
08/30/2024, 10:40 AMphanindra srungavarapu
08/30/2024, 10:40 AMphanindra srungavarapu
08/30/2024, 10:40 AMRuth
08/30/2024, 10:40 AMphanindra srungavarapu
08/30/2024, 10:42 AMYousaf Nabi (pactflow.io)
includeWipPactsSince date to see if this reduces the quantity returned.
You will be able to see which pacts are being returned.
It would be good to see if these additional pacts which are being retrieved by including WIP pacts, as these follow a specific criteria. By working out which pacts are being picked up and why they aren't verified would be a good start in reducing the amount of pacts that are returned
A āwork in progressā pact is a pact that:
1. is the latest for its branch (or tags)
2. does not have a successful verification result from the current provider branch (or tags) - that is, the pact is in āpendingā state.
3. was not explicitly specified in the consumer version selectorsThese has been some discussion about simplifying the wip workflow https://github.com/pact-foundation/pact_broker/discussions/640 with a current tl;dr of deleting branches from your pact broker when removed in your SCM https://docs.pact.io/blog/2024/02/21/deleting-branches-automatically
Yousaf Nabi (pactflow.io)
I do not understand why I need that date at allThat is the way it is coded
I would like to have a relative time frame instead of a fixed date.You can set this in your code, rather than hard coding a set, set it to be a date offset from the current time the test is run
But it should not fetch so much data as it only gets the poacts that have not yet been verified, right?Correct, see selection criteria above. Seeing which pacts are selected, and why they aren't verified for this provider would be a good start
Yousaf Nabi (pactflow.io)
it did not work without itwith regards to removing
includeWipPactsSince - how exactly did this not work?
Still too many pacts, or failed to compile?Ruth
09/02/2024, 6:44 AMwith regards to removingWhen I initially tried it without a date I got the error message that a date has to be set. But that does not happen anymore, so maybe that was a red hering when I initially tried out that feature- how exactly did this not work?includeWipPactsSince
Ruth
09/02/2024, 6:45 AMYou can set this in your code, rather than hard coding a set, set it to be a date offset from the current time the test is runAs it is java annotations I use I could not create a relative date there as it is not static. but I could add a gradle property and then calculate it. but if it actually works without it then I prefer that anywys š
Ruth
09/02/2024, 6:54 AMwith a current tl;dr of deleting branches from your pact broker when removed in your SCMI read in the discussion
The API deletes the branches asynchronously, and doesn't actually delete the application versions or pacts - it just deletes the branches. This means that even though the pacts still exist, they won't show up in the "latest pact for each branch" verification response.So does that mean that there is a pact but is "looks" like it is done without branch information?
Yousaf Nabi (pactflow.io)
Ruth
09/02/2024, 10:34 AMYousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Matt (pactflow.io / pact-js / pact-go)
Ruth
09/02/2024, 10:44 AMMatt (pactflow.io / pact-js / pact-go)
/..../for-verification endpoint was contributing to this, and additional requests that overlapped with this table would cause locks etc.