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 json output should return provider version in the matrix when verification did not happen yet #588
Comments
I am in the same situation trying to set up a webhook-less flow for cross-verification of pacts. Similarly, the matrix endpoint does not return the {
"environments":[]
} but I expect full environment details like: {
"environments":[
{
"uuid":"uuid",
"name":"prod",
"displayName":"Prod",
"production":true,
"createdAt":"timestamp",
"_links":{
"self":{
"title":"Environment",
"name":"prod",
"href":"https://pact-broker/environments/uuid"
}
}
}
]
} For now, I am working on a workaround to use |
Rather than describing a change to the existing tool, can you describe what you're trying to do, and what information you need @uittorio . We may be able to build a better tool specifically for your usecase. |
@bethesque We want to get the Prod version of a specific provider in order to be able to check out that version and run the provider tests in a webhook-less flow. We're aware of the endpoint that you can call to get a list of application versions within an environment, which you pointed out to me (thanks!), and we've implemented some logic using that (as @tplass-ias is doing). However it would be useful to extend What @uittorio described above comes off the back of a conversation and he and I have had. We noticed that the provider version is null when |
Thanks Anto. So, it sounds like the "what version(s) is in this environment" command is actually a better fit for your problem. I think I created a card for it the other day. I'll double check it tomorrow and make sure it's on the pactflow roadmap. It's not a big piece of work. |
For background, the reason the provider version is null is because left outer join. The query starts with the consumer version, and tries to join it to an appropriate provider version via the verifications table. If there is no matching provider version, the consumer version is still returned, but the provider version columns are empty. I can see why adding it would be potentially useful, but if I'm understanding things correctly, the other command would be more useful for you. |
Interesting! Where is the provider version coming from in the the |
Thank you Anto for claryfing! Thank you Beth for all the details I agree, the other command would be more useful and appropriate to the use case! Is there a chance that I/we could help with that piece of work by opening a PR or it needs to go through the internal team? |
For us it is not just "what version(s) are in this environment" but "what provider version(s) have unverified pacts in this env". I am using results from |
Pre issue-raising checklist
I have already
Software versions
Expected behaviour
When checking if a Consumer with a specified version can be deployed in an environment for a specific Provider
And the pact is not verified yet
Then the JSON output includes the version of the Provider
Actual behaviour
When checking if a Consumer with a specified version can be deployed in an environment for a specific Provider
And the pact is not verified yet
Then the JSON output does not include the version of the Provider
Step to reproduce
I was expecting this command to return the version of the provider in prod but instead it returns null!
Actual Response.
I've only included the relevant part in the json output example!
Expected Response.
I was hoping to receive a json that contains the provider version. Example
Why this would be useful
We would like to use the ouput of this command to determine the version of the Provider in a specific environment. It's probably not the best place to look at but it feels correct to return the version of the provider deployed in that environment considering that is part of the error message.
Let me know if you need anything else, I am happy to open a Pull request if this makes sense!
The text was updated successfully, but these errors were encountered: