hi pact-broker team! i've got a question related t...
# pact-broker
j
hi pact-broker team! i've got a question related to the default consumer version selectors again. i'm trying to understand why a certain pact is not being fetched by the provider. it's the first and only pact for that consumer and that pact's branch, tag or environments fields are not set (all N/A). when does this line of code evaluate to true? btw, confirmed the
mainBranch
for that consumer is set to
main
🙏 https://github.com/pact-foundation/pact_broker/blob/master/lib/pact_broker/pacts/pacts_for_verification_repository.rb#L151-L152 i was expecting that would return false so this line of code is executed instead which would fetch the latest pact for that consumer, but i guess i was wrong. 😅 https://github.com/pact-foundation/pact_broker/blob/master/lib/pact_broker/pacts/pacts_for_verification_repository.rb#L156
b
Without having the actual database to debug it, I can’t tell you either.
Is there anything stopping the branch or tag being set? You could spend a lot of time trying to work out why it’s happening, or you could do the recommended best practise and set the branch name.