drone-yaml icon indicating copy to clipboard operation
drone-yaml copied to clipboard

proposal: version number to config file

Open zetaab opened this issue 6 years ago • 7 comments

Hi

It seems that drone 1.0 will get newer configuration specification. However, for me it seems that we could improve that configuration spec little bit. We could add version number there like it is in kubernetes.

So instead of using:

kind: pipeline
name: default

we could have

kind: pipeline
name: default
version: v1

after that if we need modify config spec, we can handle breaking changes easily. We can implement multiple ways of parse that specification. That is how it works in kubernetes

zetaab avatar Dec 04 '18 11:12 zetaab

It depends on how we define it... We could also say that v1 is the default value and changes require the version attribute.

tboerger avatar Dec 04 '18 13:12 tboerger

That is true. However now there was different syntax before 1.0. For newbies its difficult to understand which one they should use because you cannot say that easily if you have not used drone before.

zetaab avatar Dec 04 '18 13:12 zetaab

That could happen before 1.0.0, but with 1.0.0 there is a promise to avoid breaking changes. Breaking changes MUST result in a new schema versioning now.

tboerger avatar Dec 04 '18 15:12 tboerger

Well then its enough :) So if there is breaking changes after 1.0 I hope that version is added to schema

zetaab avatar Dec 04 '18 15:12 zetaab

we actually support a version attribute for all resources: https://github.com/drone/drone-yaml/blob/master/yaml/pipeline.go#L6

bradrydzewski avatar Dec 04 '18 17:12 bradrydzewski

But so far it's not required because there are no other versions :)

tboerger avatar Dec 04 '18 19:12 tboerger

yea, I think we are past the point where we can make it required (with cloud.drone.io already launched, etc), but we can definitely make it recommended going forward.

bradrydzewski avatar Dec 04 '18 19:12 bradrydzewski