Hi, We are using Pactflow subscription for our con...
# pactflow
j
Hi, We are using Pactflow subscription for our contract tests. Do we have automatic data cleanup feature for Pactflow subscription based model or how can we enable this? i.e. I am looking for something like this https://docs.pactflow.io/docs/on-premises/maintenance/database which is available in on-premise version. Thanks
m
The data cleanup is enabled by default, we actively managed that. Why do you ask?
j
We do see some contracts which are published from feature branch and 4 months old shown in Pactflow subscription. So I was wondering whether this is applicable for Pactflow. Also, is there a way to override or change the settings?
m
It would never delete the “head” version of the contract anyway, so I don’t think that contract would disappear. It only deletes “unimportant” data (read that doc above for detail). No, it’s not configurable at this time. Is there a problem you’re trying to solve?
j
@Matt (pactflow.io / pact-js / pact-go) Yes. Currently we are publishing the contracts only from the
main
branch. We are thinking to enable it for feature branches as well, so that developers can get the feedback on contract test failures much earlier. But we also do not want to publish too many versions to Pactflow subscription to cause any performance degradation issues. So I am checking if there are any possible ways to automatically remove the contract versions which are published from feature branches.
m
What performance issues are you seeing? I’d like to know as we can incorporate any adjustments into our backlog.
You can delete old branches though after merging (see also https://docs.pact.io/blog/2024/02/21/deleting-branches-automatically)
j
It is a preventive measure to avoid performance issues due to lot of pact contracts from feature branches. If we have some admin setting or a way to automatically remove the contracts and pacticipant versions from feature branch, it would be really helpful. Also, the deleting branches functionality is used to remove a branch from Pacticipant version , but does not seems to be deleting all the contracts and the pacticipant version which may be introduced by that branch.
👍 1
m
PactFlow will automatically prune old pacts over time, so unless you’re seeing performance issues I wouldn’t worry about it
deleting the branch resource, whilst seemingly not that important, actually is a factor in performance because a lot of queries involve finding important active branches. If those branches are deleted, there is no relationship to follow to defunct pacts. So definitely worth doing if you can
j
In Pactflow SaaS subscription, what is the time taken to automatically prune old pacts? Regarding this point
If those branches are deleted, there is no relationship to follow to defunct pacts. So definitely worth doing if you can
, is it possible to provide some guidance how to implement this for Pactflow SaaS product?
m
The link I gave you earlier is the same for OSS or PactFlow.
In Pactflow SaaS subscription, what is the time taken to automatically prune old pacts?
This is secret 😉 j/k but the point is it’s internally managed and you can’t change it
😃 1
j
One more question on the unrelated topic, If I have two services (Service A and Service B), which have 2-way interactions (i.e. Service A acts as a consumer of Service B & Service B acts as a consumer of Service A). How do handle this scenario at the time of deployment? I think for the first time deployment, we need to introduce the 1-way interaction i.e Service A to Service B, promote it to the environments , followed by the interaction for Service B. For the subsequent promotions (with any changes on the interactions), probably we need to split the PRs in such a way that , it doesn't introduce any inter-dependency between the services. Do you think of any other better way of doing things?
m
j
Thanks
Hi @Matt (pactflow.io / pact-js / pact-go), We came across another issue where the API routes are considered case sensitive for Bidirectional contract verification. I think I found that there will be feature request to change this verification to case insensitive. Could you please tell me if this is available now for Pactflow SaaS subscription? Thanks.
m
Hi, yes routes are case sensitive. There are no plans to change that
j
But for .NET core API routes are not case sensitive, so do you have any guidance or approach, how to avoid the developers accidentally mentioning the routes in pascal case?