Skip to content

Commit 6b6b9ee

Browse files
committed
chore: add docs for fixing slow 'pacts for verification' response
1 parent 5bf269f commit 6b6b9ee

File tree

2 files changed

+42
-1
lines changed

2 files changed

+42
-1
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Slow responses when fetching pacts for verification
2+
3+
Slow responses when fetching pacts for verification when [WIP pacts](https://docs.pact.io/wip) is enabled is caused by performance problems calculating the latest pact for each tag when large numbers of application versions exist. This problem does not exist when using branches instead of tags.
4+
5+
To speed up the response, we advise optimising your PactFlow database performance by using the following steps:
6+
7+
1. Use branches/deployments instead of tags
8+
9+
a) Publish pacts and verifications with the "branch" property set rather than the "tag" property.
10+
11+
b) Use branches instead of tags in the consumer version selectors in every provider verification configuration.
12+
13+
c) Record deployments/releases for can-i-deploy rather than using tags.
14+
15+
2. Delete tags from database
16+
17+
## 1. Use branches/deployments instead of tags
18+
19+
### a) Publish pacts and verifications with the "branch" property set
20+
21+
See documentation [here](https://docs.pact.io/pact_broker/branches).
22+
23+
### b) Use branches instead of tags in the consumer version selectors
24+
25+
See documentation [here](https://docs.pact.io/provider/recommended_configuration).
26+
27+
### c) Record deployments/releases
28+
29+
See documentation [here](https://docs.pact.io/pact_broker/recording_deployments_and_releases).
30+
31+
## 2. Delete tags from database
32+
33+
Once there is no dependency on tags, they can be deleted.
34+
35+
For SaaS customers, please [raise a support ticket](https://support.smartbear.com/pactflow/message/) explaining that you would like your tags deleted, with a reference to this document.
36+
37+
For On-premises customers, please run the following SQL statement against the database:
38+
39+
```sql
40+
delete from tags;
41+
```

website/sidebars.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ module.exports = {
117117
{
118118
type: 'category',
119119
label: 'Troubleshooting',
120-
items: ['docs/login-help', `docs/authorization-help`, 'docs/webhooks-help', 'docs/powershell-guide', 'docs/troubleshooting/disabling-dangerous-contract-modification']
120+
items: ['docs/login-help', `docs/authorization-help`, 'docs/webhooks-help', 'docs/powershell-guide', 'docs/troubleshooting/disabling-dangerous-contract-modification', 'docs/troubleshooting/slow-response-when-fetching-pacts-for-verification']
121121
},
122122
{
123123
type: 'link',

0 commit comments

Comments
 (0)