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
Allow version number validation to be completely disabled #329
Comments
This would be super useful for Pact adoption at the company that I work at. Our dev environment uses Git SHAs of our microservices as the versions, and then we use Git Tags with GitOps to manage our deployments to staging/preprod/prod. We don't really use semantic versioning at all. As Git tags have a 1 to 1 relationship with SHAs, this would allow us to match up what's in all of our environments with the SHAs in the broker. Currently it still seems the broker uses the semver Gem, and there are no in-built alternatives. |
You can do it already - people have been publishing versions with git shas for years. It's what's recommended by the docs now. You just need to have |
PS. Perhaps you are on a very old version of the Pact Broker? We're up to 2.50.1 now. |
Thanks @bethesque for clarifying! I checked with our dev ops team on our version - we're on a very, very old version... |
Do upgrade! There are many performance improvements, functionality improvements, and also there was a vulnerability in the earlier webhooks implementations that you should upgrade to fix. There have been no backwards-incompatible changes introduced, so it should just be matter of installing the new version code, and everything should auto-update. There is an outstanding issue in the ordering when updating from really old versions that I'm trying to get someone to help me reproduce. For some people, it doesn't seem to switch over automatically (and it should). You can find details here: #330 |
Perhaps it's worth stressing in the docs that the full Git hash should be used, as opposed to the short hash - a short hash with no numbers happens regularly. For example, today 😁:
|
You guys are just... hitting all of the errors today. You don't happen to be testers do you? |
Nope, just devs in need of a beer. 😄 |
Wow - during the discussion we had before this ticket was raised, someone calculated that it would take a millionty publications to create a sha with no numbers. Guess you were the milliontyth. I'll see if I can get on to this. |
Since we recommend using git SHAs instead of semantic versions now, and versions are ordered by date, there is no reason to validate the contents of a version number at all any more, apart from the fact that it must not be empty and should not contain any new lines.
Backwards compatibility should be maintained for existing users.
The text was updated successfully, but these errors were encountered: