Hi, I am wrapping my head around the Diamond Pact ...
# general
s
Hi, I am wrapping my head around the Diamond Pact Nirvana step, in specific i am trying to set the "main" tag after my PR is merged to the main branch. But since a "merge" to the main branch creates a new commit I am having the problem, that I cannot call the broker to tag this version with "main", because the PACT version that got published to the broker is the head commit sha of the feature branch. There is technically with github actions no problem to simply add the tag to the correct version (git sha of the feature branch), but this is a bit dirty I think, as this git commit is not going to be the one that is deployed to prod, but the merge commit does. Has anyone had this problem too?
message has been deleted
What I could do of course is to run the PACT publish step again, then the version is overwritten, but I suppose this is adding a bit of instability to my cicd then, because it could fail and in this case nobody would recognize unless this failure doesn't stop the deploy pipeline. Maybe this is the solution of it? I just thought its advisable to not run the entire build + pact publish step "again". The way its currently solved in the screenshot is that the "main" tag was attached to eeda852, the PR's head commit. This diverges with the actual GIT main branch now and leads to confusion so I think it cannot stay like this.
I'd appreciate to know how others managed to work this out
b
Every build (i.e. every commit) should have passing tests (including contract tests) before deploying. There's an optimisation in the broker to pre-verify a new contract version if the content is the same as an existing contract, so you don't really have to worry about verification performance.
👍 1
You don't want to use the branch version, because there might be legitimate differences once it's merged.
👍 1