Hi team, I need help understanding VersionSelector...
# pact-broker
r
Hi team, I need help understanding VersionSelector annotation. I specified my branch name in tag and still it verifies against all previous versions of that branch? annotation:
Copy code
@Provider("booking-server")
@PactBroker(
    url = "<https://pact-broker.rcue102.viatorsystems.com>",
    consumerVersionSelectors = @VersionSelector(consumer = "orion", tag = "feature_COPS-8656-orion-create-v2-pact-consumer-SNAPSHOT", fallbackTag = "develop")
)
@Tag("Contract")
ProviderTestRun:
cc: @Deven Chen
m
What do you mean all previous versions of that branch?
d
my latest pact consumer only has two pacts, I deleted them in broker and republish, looks like it keeps check all historical pacts (5 in total)
r
we published initial versions through consumer and it had some errors. Deleted integration/ deleted pacts. still when we run provider test, it tests against all versions(i think) as only final version is verified as success
as shown in screenshot above
m
How do you know that's happened?
r
on broker i see only one version and it is verified as failure
m
The versions based on the hash looks the same. Also, you had a fallback tag of develop. Is it possible it's fetching that too?
r
currently we have pacts published from feature branch only
m
So it just looks like there is only one version
my latest pact consumer only has two pacts, I deleted them in broker and republish, looks like it keeps check all historical pacts (5 in total)
Do you you mean 2 interactions. A pact is a contract between two applications. So you can only have one pact between a consumer and provider
The log output should show what it's verifying and why. I'd start there
r
no he meant, one pact but with different data
👍 1
d
like 5 interactions, but I am only expecting 2
m
Check the logs, it'll tell you which pact it's verifying and you can then look at each pact to see what's in it
d
is there a way to debug into the kotlin code and see how it reads those interactions ?
I am using maven, what's the corresponding 'info' flag to gradle in maven?
m
I'm not sure sorry, but I don't think it's anything different to whatever normal log level looks like in Java
b
@Deven Chen best to ask in the #pact-jvm channel. I know nothing about Java.
1