-
Notifications
You must be signed in to change notification settings - Fork 48
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
can-i-deploy --to=TAG fails if there's no participant version with such tag #48
Comments
If you know it's compatible, run the first deployment without the can-i-deploy check. Then, when each of them have a version in production, tag those versions as |
Thanks for answering my question so quickly. Isn't it a gap which should be fixed? |
Are you using test environments? Typically, you would tag each version with the stage name of each environment (eg. Have you read this? https://docs.pact.io/best_practices/pact_nirvana |
Yes, we are using test environments and I've read this article but it doesn't solve our problem. And with this approach we have such situation when a new consumer wants to use provider API and publishes new pact and tags it as test, provider is no longer able to deploy to prod because new consumer didn't tag its version still and |
It does make sense that you should be able to deploy a provider with a missing consumer, but not the other way around. I'll have a look and see if I can add this logic. I've been meaning to add an In the meantime, if you explicitly list the names of the apps your provider integrates with, it will just check those apps, and not do an automatic calculation. |
I'm working on this, but it's turned out to be more complex than expected! It will be in the next release. |
Thanks a lot! |
Please upgrade to 2.29.0 (docker tag 2.29.0-1) and retest. Let me know how you go. |
… the consumer having to be deployed there already Closes: pact-foundation/pact_broker-client#48
The issue works correctly for us now. Thanks a lot |
Great! Thanks for persisting with this. It's a problem I'm glad to have fixed. I hadn't fully understood the implications of it until you kept explaining. |
Hi!
We want to use the recommended approach for pact testing (we don't have CD) with
can-i-deploy --to=TAG
command.When a consumer publishes new pact, it is tagged with the name of a feature branch and verified by provider.
After successful deployment it is tagged with the name of the stage.
So before deploy to production we want to use command:
./pact-broker can-i-deploy -a backend-catalog -e eaae34f4 --to prod
But we face the following problem.
If there is some participant which doesn't yet have participant version tagged with "prod" this command fails.
It returns:
Does this really should fail?
This means that every new consumer which publishes new pact with tag different from somehow expected to have prod version at once.
But how it can be achieved?
The first step is consumer publish pact and provider verifies it.
And only after provider deploys version which will verify this pact - consumer version will be deployed and tagged as "prod". But provider can't deploy its version because of the error.
We expect that this command will not fail if there is no version with some tag for some participant.
The text was updated successfully, but these errors were encountered: