Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrongly failing the build because pact is no longer supported #494

Closed
dimkin-eu opened this issue Aug 30, 2021 · 2 comments
Closed

Wrongly failing the build because pact is no longer supported #494

dimkin-eu opened this issue Aug 30, 2021 · 2 comments

Comments

@dimkin-eu
Copy link

dimkin-eu commented Aug 30, 2021

Creating ticket as was asked in slack conversation

Dmitry Munda  
how to rename provider - simple as is ? :slightly_smiling_face:
consumerA has contract with providerB
after some refactor providerB was split to providerB and providerC and consumerA has nothing for  providerB  now
for human being its simple, but for broker, its just a new pact consumerA : providerC and consumerA  :providerB is kinda abandoned
but now when providerB tests are running ( for other consumer ), broker still asks for  consumerA  :providerB compatibility :disappointed: (edited) 

Dmitry Munda  3 days ago
simple answer could be - delete pact consumerA  :providerB

Dmitry Munda  3 days ago
but is it correct one ?

Beth (pactflow.io/Pact Broker/pact-ruby)  14 minutes ago
If there is no production relationship between the two, then yes, you you can delete it. (edited) 

Beth (pactflow.io/Pact Broker/pact-ruby)  14 minutes ago
It's going to keep returning the latest pact, even if that latest pact isn't used by anything @Dmitry Munda (edited) 

Dmitry Munda  13 minutes ago
sadly it returns for current provider old needs :disappointed: (edited) 

Dmitry Munda  13 minutes ago
so, i’ve deleted old pact, but this sounds a bit wrong for me :disappointed:

Dmitry Munda  13 minutes ago
maybe some pact parked  property or something is needed

Beth (pactflow.io/Pact Broker/pact-ruby)  12 minutes ago
I think it's because it returns the latest pact that has the prod tag, rather than the pact for the latest version with the prod tag, if that makes sense.

Dmitry Munda  11 minutes ago
( i know if you dont like - advice solution, but i’m kinda lost here )

Beth (pactflow.io/Pact Broker/pact-ruby)  10 minutes ago
What selectors are you using?

Dmitry Munda  9 minutes ago
it returned latest  pact with tag test for that combo (edited) 

Beth (pactflow.io/Pact Broker/pact-ruby)  9 minutes ago
And the problem is that there is a later version of the consumer that does not actually have a pact with the provider any more?

Dmitry Munda  9 minutes ago
yup

Beth (pactflow.io/Pact Broker/pact-ruby)  8 minutes ago
Yeah, I know why it's doing that. I know how to fix it, but it'll take a bit of work.

Dmitry Munda  8 minutes ago
now worries :slightly_smiling_face:

Beth (pactflow.io/Pact Broker/pact-ruby)  7 minutes ago
Trying to think of a tactical solution

Beth (pactflow.io/Pact Broker/pact-ruby)  7 minutes ago
I take it it's failing the build because you no longer support that pact?

Beth (pactflow.io/Pact Broker/pact-ruby)  7 minutes ago
The provider build

Dmitry Munda  7 minutes ago
yes

Dmitry Munda  6 minutes ago
sounds like this, pact is no longer in use by consumer, but fails provider

Beth (pactflow.io/Pact Broker/pact-ruby)  6 minutes ago
You could explicitly specify the consumers in the consumer version selectors

Beth (pactflow.io/Pact Broker/pact-ruby)  6 minutes ago
And not specify the one you don't want any more

Beth (pactflow.io/Pact Broker/pact-ruby)  6 minutes ago
The CVS allows you to specify the consumer name.

Dmitry Munda  6 minutes ago
now they are added automagically, but this workaround could bring more hassle

Beth (pactflow.io/Pact Broker/pact-ruby)  5 minutes ago
I'd been planning an ignore for a while, but haven't gotten around to it

Dmitry Munda  5 minutes ago
so, in short - for now everything is fine, and we will be warned on next refactor :slightly_smiling_face:

Beth (pactflow.io/Pact Broker/pact-ruby)  5 minutes ago
You could remove all the test tags

Beth (pactflow.io/Pact Broker/pact-ruby)  4 minutes ago
Can you raise an issue in the pact broker repo for me?

Dmitry Munda  4 minutes ago
You could remove all the test tags
i thought also about this. probably nicer solution, but again - must be done more carefully (edited) 

Beth (pactflow.io/Pact Broker/pact-ruby)  3 minutes ago
The fix is, to return the pact for the latest version with the tag, not the latest version with the tag that also has a pact.

Beth (pactflow.io/Pact Broker/pact-ruby)  2 minutes ago
Currently /latest pact never returns a 404. This change would make it return a 404.

Dmitry Munda  2 minutes ago
sounds very logical 
@bethesque
Copy link
Member

bethesque commented Sep 10, 2021

Can you upgrade to 2.84.0.0 of the docker image, and set the env var PACT_BROKER_FEATURES=fix_issue_494. You should see that you no longer receive the test pact any more. Once you have confirmed, I'll put out a release that doesn't need the feature toggle.

@dimkin-eu
Copy link
Author

will do 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants