-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Specify version of yaml spec to use #3806
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
Comments
Thanks to raise this @stsewd! We chatted about this some weeks ago but we didn't opened an issue or write our thought anywhere, so this is a good start. What would be the benefits of using a |
@humitos I was thinking something like the docker-compose.yaml spec https://docs.docker.com/compose/compose-file/. If is just introducing a new option or something "not breaking" we use a minor version, but if there is a big change on the spec, we use the mayor version, so this way we don't end with a version 13 too soon p: |
Yeah, I also was thinking in something like Then, if we make breaking changes, that will be version What do you think? |
@humitos I was thinking to versioning the spec, not the implementation (so, in this case will be not bugs to fix, just modifications on the spec). I mean if the spec was something like this |
+1 to versioning the config file. I think a major version is fine for now. If we add an optional setting to a version, can't we just read it if a user defines it? I don't know if we need a specific version number in order to support that. The versioning is generally only useful if there contradictory definitions of a concept (eg. |
+1 on major version, if only to reduce the number of specs we're supporting. We will have a lot more backwards incompatible changes to support here though, so I think a lot of changes will be bumping major versions anyways. New feature additions to the spec shouldn't break anyone's config. |
I thinking of using the strategy pattern to solve this. So, this way we can have a Currently we:
We need to modify this to use the pattern (or something like that p:)
To get the @agjohnson what do you think? |
We can probably keep the build logic where it is, and just use conditional logic around the existing build code. The most important part is that we have a config object that knows what features it supports, and how to parse/validate those config values. Here's a psuedo code example: https://gist.github.com/agjohnson/70a2b5e839bc8e7fd722f8eaf63d6676 |
I agree with Anthony. I wouldn't change to much the builder logic but make decision inside it considering the Config object. Although, in the future, I'd like to have the pattern that Anthony is proposing for the Config object as a general rule and make our |
This was done in #4355, but the feature is not activated yet. |
Decision
Add version selection to schema. Schema version selection only uses major version, minor version is too granular. Current version is 1.0, work to complete spec will be under 2.0
Work required:
Original Question
I didn't find anything related to this on this repo and on the other, so I creating this issue here due readthedocs/readthedocs-build#46.
I think would be nice if we allowed to specify the version of the spec used, so this way we can introduce breaking changes to the spec without to worry about previous projects to fail.
We can use semver perhaps?
And something like this on the yaml
Use specific version
Use version with latest minor patch
The text was updated successfully, but these errors were encountered: