Hey hey :wave: . I have a question about ‘dev’ env...
# general
a
Hey hey 👋 . I have a question about ‘dev’ environments when pacticipants are deployed to it by N feature branches. We have a setup where each branch is deployed in to a shared ‘dev’ environment but it itself is physically separate than any other ‘instances’ of that consumer/provider already in that environment. So Provider A on
feature/123
and Provider A on
feature/234
will have different versions but they’ll represent two distinct instances. This leads me to think about using
record-release
so the other versions are not marked as undeployed (as
record-deployment
will do for you). Our upper environments all have 1 instance of each pacticipant so a normal
record-deployment
workflow will suffice. Is using
record-release
the best for this setup over
record-deployment
with the
--application-instance
to a ‘dev’ environment like this? If you know of anywhere in the docs or working examples you could share that would be amazing ❤️ .
Adding to this. These pacticipants in the ‘dev’ environment are not long lived. When the feature branch is merged to main or deleted, the pacticipant is removed from the environment. This has led me to think about the pros/cons of can-i-deploy and record-deployment/alternative to this environment. Is it better to simplify the pact broker usage for this ‘dev’ environment and change it to verify in the build/PR pipeline to run can-i-deploy to the next higher environment, e.g. staging/qa?
t
personally, in that scenario I would just not use can-i-deploy - it's ok to deploy broken stuff to dev
a
That’s what I’ve started to make changes towards. Deploying to the env but not can-i-deploy/record-deploy but doing a can-i-deploy post ‘deploy to dev’ on the next environment along (QA)
t
or, I would do can-i-deploy only on the master deployment (assuming that your dev deploys don't clobber each other)
🙌 1
I guess my question is - why are you deploying feature branches at all? My guess is that the answer is something like "well, the devs sometimes want to manually test something they're working on" - and in that case, having deployments gated by contract tests would be very annoying.
(I'm not a fan of the "I want to deploy this to test it during development" style, but I haven't found a way to communicate this to people who want to do that)
❤️ 1
And, to your actual question - yes, I think record release is ideal. It's for situations where you might have multiple versions of something all live in the same environment (eg, mobile clients or public library clients)
a
Yeah the reasons for the deployment per feature branch is exactly that, for manual/exploratory testing. As we migrate to having the CI/CD contract testing set up in our pipelines the reliance on such deployed consumers/providers should start to reduce. Thanks for your thoughts @Timothy Jones
🙌 1