Hi, maybe this is a <#CSUFRDVKN|>, but lets see. W...
# pact-broker
k
Hi, maybe this is a #CSUFRDVKN, but lets see. We are on our way to introduce Pactflow within our company and CI/CD pipelines. Essential for this to work properly is that the broker is always correct and up-to-date about which version of which application is deployed on which environment. While talking with our deployment platform team, we learned that they already have their own tool for this kind of bookkeeping. Having to maintain this information in two places is not desirable. To my understanding, the pactflow broker relies on that the "record-deployment" command is always called after deployment for every application. You have to make sure that every possible method of deployment for every application will call that command. Any kind of circumstance where this call is missed, either by some an error in the pipeline, hacky deployment, network issues, or whatever, and your broker will be out of sync. Not only are your tests and deployments at risk, you then also have to restore the correct state to the broker somehow, which likely requires manual correction. The application of our platform team is basically is a live view on their entire platform. No matter how any given application got there, what their bookkeeping software sees is always a live view of every application and version. No need to send a signal after deployment, and no chance of being out of sync. Preferably we are looking for a way to have only one source of information, and our own "platform view" application seems like the best place to hold that information. We would like to have some way for the broker to look in our own application to determine which version is deployed where. So in a more general idea my question/feature request is: "Is it possible to have different backend application for the broker to query deployment information?"
m
To answer the question directly, no, that’s not currently possible
If that other system is the source of truth, how is it updated and when it gets its updates, can you update PactFlow when it happens?
k
I am not sure how their application works, ive never seen it myself yet. I proposed we try implement some kind on onchange listener in their application that will forward the change to the broker. But before we go into that route I wanted to check if there maybe wasnt already some kind of existing solution for this
👍 1
m
fair enough
For now, that’s probably the best strategy
We have had requests for other external systems being the source of truth (e.g. Vault for secrets management), but this is the first time deployments has come up!
It would be great to know what tool you use, if you find out
I know Atlassian has ways to capture this in both Jira and elsewhere (we use it in PactFlow), but we just publish the deploy event to PactFlow and Jira
k
I will ask next week when we have a followup meeting about this
thankyou 1
y
Some thoughts on the matter from the author https://docs.pact.io/pact_broker#can-i-use-pact-without-a-pact-broker TL;DR - you get a whole lot for free with the Pact Broker, but it may not work in all cases.
If that other system is the source of truth, how is it updated and when it gets its updates, can you update PactFlow when it happens?
That nature of your system using one single view, and having aggregated sources of data in a common problem in scenarios where MI/BI is being pumped into something like a data lake and querying later. I would argue that transient network efforts should be considered in your strategy. For example, a failure to call the record deployment should result in a build failure. There should possibly be checks put in place to ensure that certain events have occured, eg once you have deployed your application, you could use webhooks to ascertain if a record deployment exists for the freshly deployed provider and if not provide some alerting. Some alternative approaches to sharing pacts https://docs.pact.io/getting_started/sharing_pacts#alternative-approaches Also seen this but haven’t taken it for a spin yet https://github.com/RaVbaker/pact-contractor
I will ask next week when we have a followup meeting about this
Interested to hear more about the setup 🙂