openservicebrokerapi / servicebroker

Open Service Broker API Specification
https://openservicebrokerapi.org/
Apache License 2.0
1.19k stars 436 forks source link

Support 3 digit semantic versioning #713

Closed sklevenz closed 4 years ago

sklevenz commented 4 years ago

What is the problem? A description of what the problem is.

The spec says:

X-Broker-API-Version: 2.14 The version numbers are in the format MAJOR.MINOR using semantic versioning.

Actually semantic versioning [1] says:

"A normal version number MUST take the form X.Y.Z where X, Y, and Z are non-negative integers, and MUST NOT contain leading zeroes. "

Therefore semver libraries. e.g. [2], do not accept dotted-two formatted versions and require dotted-tri format instead.

[1] https://semver.org/ [2] https://github.com/coreos/go-semver/blob/e214231b295a8ea9479f11b70b35d5acf3556d9b/semver/semver.go#L77

Who does this affect? Does this affect service broker authors, platform authors or developers?

Developers who implement brokers.

Do you have any proposed solutions? A description of any potential solutions.

Use a 3 digit version, e.g. 2.14.0

Additional context Add any other context or screenshots can go here.

Samze commented 4 years ago

Thanks for raising this @sklevenz

I agree that the it would be better if the specification used the proper MAJOR.MINOR.PATCH of semver, however I think changing this could potentially break existing Service Brokers. I can imagine some brokers have code written to split the version string in a certain way that may not be compatible with the improved format.

On the call today we also discussed that we don't really have much use today for making patch version changes, so even if we went ahead and implemented this it is unlikely it would provide much benefit.

Aside from being able to use semver libraries, do you see other benefits to adopting patch?

sklevenz commented 4 years ago

@Samze Thanks to follow up on this.

I understand your point of view and see that changing the specification is not that easy. If someone uses a Semver library, it's just a small stumbling block. Perhaps it is sufficient to give a little hint in the specification.

You are also welcome to close this problem. The solution is very simple. If it's not a semver, just don't use a semver library ;-)

Samze commented 4 years ago

@sklevenz happy to accept a PR if you want to add some clarifying text! Will close this for now.