Elliott Jacobsen-Watts
09/23/2024, 4:02 PMmain line of code from which we derive feature/* and bug/* branches. To work on stories, we use feature/ branches and commit them back. The feature/ branches are only committed back to main once the feature is complete.
đźšš Environments: While in development, the debug versions of the mobile apps can communicate with any environment - prod, prod-europe, prod-asia, staging, dev, localhost.
🔢 Question about versioning:
• Since we have a number of engineers, it's conceivable that multiple engineers working on the same parts of the app could alter (thus version) a pact. Does it make sense for us to continue using the SHA for each version, rather than tying it to a version of the app itself (e.g.: 1.0.3-<sha>)?
🛝 Questions about environments + deployment/release recording:
• We understand the concept mentioned in the documentation about having multiple versions in production, possibly forever. Google Play and the App Store control the availability of the apps. To us it makes sense to record-release when we release a new app to the app stores. Is this best practice? Deployments are a little more nuanced. As mentioned above, we have a number of branches going at any given time, so we're not as sure when to record-deployment. Any advice here is appreciated.
• Since our mobile apps can point to any environment while in development, it seems like a given version is deployed simultaneously to each environment, in contrast to a service which makes its way sequentially through local -> dev -> staging -> prod. In that case, would it make sense to essentially record a new deployment with every push to a branch?Matt (pactflow.io / pact-js / pact-go)
record-release is the usual practice for mobile applications pushing to the app store, yes
◦ I think you’ll really need to test that for yourself. I can see why you’d do it, but in theory I worry that it could place too much constraint on your provider as it needs to satisfy n versions of your mobile applications in that environment. But if you did, yes, a deployment would be the way to do it (rather than a release)Elliott Jacobsen-Watts
09/24/2024, 9:28 PMmainline. The result (hopefully) is that providers only need to verify against only a limited number of deployments in the non-prod environments and the releases that are still supported in prod.Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Elliott Jacobsen-Watts
10/01/2024, 5:32 PMrecord-deployment in our non-prod environments if our providers are using best practices to ask for the latest version of a pact?
We understand that record-release is useful for when we deploy to production environments so providers can test against all the released versions.Matt (pactflow.io / pact-js / pact-go)
@Matt (pactflow.io / pact-js / pact-go), to follow up: Does mobile need to useWhat do you mean by “latest version” of a pact here? Latest could be latest altogether or latest for a branch. Usually we discourage “latest” because it’s not clearin our non-prod environments if our providers are using best practices to ask for the latest version of a pact?record-deployment
Matt (pactflow.io / pact-js / pact-go)
Elliott Jacobsen-Watts
10/04/2024, 3:39 PMWhat do you mean by “latest version” of a pact here?I'm using latest in the same way the broker docs describe it: ""latest pact" for an integration is available at the URL
/pacts/provider/{provider}/consumer/{consumer}/latest, and refers to pact for the most recently created pacticipant version."
Usually we discourage “latest” because it’s not clearGood to know. As mobile consumers, I am less familiar with the provider side of the equation. If Pact discourages use of "latest", does the provider specify a consumer version and keep changing it?
I think it’s good practice in general to record a deployment though, as it clarifies the state of the systemHeard. Our current setup has us recording a deployment from
mainline whenever we merge feature, bug, or story branch back into it. In this way, mainline serves as our non-prod environment(s).