Skip to content
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

Update documentation #205

Open
solarmosaic-kflorence opened this issue Jan 9, 2021 · 4 comments
Open

Update documentation #205

solarmosaic-kflorence opened this issue Jan 9, 2021 · 4 comments

Comments

@solarmosaic-kflorence
Copy link
Contributor

solarmosaic-kflorence commented Jan 9, 2021

It seems like the documentation at http://io.itv.com/scala-pact/ is pretty out of date in terms of the latest published versions of this project. At the very least, misleading information should be cleaned up or removed.

In particular I'm wondering about this snippet on http://io.itv.com/scala-pact/basics/sbt-commands.html:

By default, Scala-Pact does not allow you to publish pact files from SNAPSHOT versions of your project (but takes into account the pactContractVersion if set). This is because it can confuse pact brokers understanding of the latest contract.

Is this still accurate and will it cause problems even when tagging the consumer/provider with the branch when building off of CI? I ask because during CI we don't actually know what the next version of our application might be, it gets determined when the code is merged by providing a hint in the merge commit message (like "bump patch" or "bump minor"). So in our CI the best we can do is either set the contract version to a SNAPSHOT of what we think the next version would be (for example, if the current version is 1.0.0 we may do 1.0.1-SNAPSHOT+commit_sha), or we can just ignore the version entirely and do something like SNAPSHOT+commit_sha or even just commit_sha). Because I don't understand the details of this advice I'm not sure which of these options is best or which may cause problems.

@jbwheatley
Copy link
Contributor

Hi! Yes, the docs do need updating. As to your particular concern, scala-pact does default to not allowing publishing versions with SNAPSHOT in them. I am not sure whether this still messes with the versioning in the broker though.
The default behaviour can be turned off with the sbt setting allowSnapshotPublish := true

@jbwheatley
Copy link
Contributor

Looking at the pact-broker docs I think the logic around snapshot versions in scala-pact is no longer applicable https://docs.pact.io/getting_started/versioning_in_the_pact_broker. Pacts in the broker are organised by creation date, not by using the pacticipant version - which I assume used to be the case.

@jbwheatley
Copy link
Contributor

#206

@solarmosaic-kflorence
Copy link
Contributor Author

@jbwheatley great, that makes sense to me as well. Thanks for clarifying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants