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

RFC: API versioning #19

Merged
merged 2 commits into from
Aug 15, 2019
Merged

Conversation

ameyer-pivotal
Copy link
Contributor

@ameyer-pivotal ameyer-pivotal commented Aug 5, 2019

@ameyer-pivotal ameyer-pivotal changed the title Initial RFC for API versioning RFC: API versioning Aug 5, 2019
0000-api-versions.md Outdated Show resolved Hide resolved
Signed-off-by: Andrew Meyer <ameyer@pivotal.io>
0000-api-versions.md Outdated Show resolved Hide resolved
@ameyer-pivotal ameyer-pivotal force-pushed the api-versions branch 3 times, most recently from 1a5a2a1 to 83e6870 Compare August 8, 2019 20:15
- Decided format/meaning
- Decided which APIs to begin with (including initial version)

Signed-off-by: Andrew Meyer <ameyer@pivotal.io>
Copy link
Member

@ekcasey ekcasey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this idea and think we should get it in sooner rather than later to help us gracefully navigate upcoming breaking changes.

ekcasey added a commit that referenced this pull request Aug 13, 2019
Signed-off-by: Emily Casey <ecasey@pivotal.io>
@ekcasey
Copy link
Member

ekcasey commented Aug 13, 2019

I updated the lifecycle descriptor RFC to match the <major>.<minor> api version format that we decided upon for this RFC.

#20

ekcasey added a commit that referenced this pull request Aug 13, 2019
Signed-off-by: Emily Casey <ecasey@pivotal.io>
[unresolved-questions]: #unresolved-questions

- Where in the spec should we document current API versions?
- What about files that are not spec'd, but rather are related to the `pack` implementation (e.g. `builder.toml`)?
Copy link
Member

@hone hone Aug 13, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably version them, but that'd be specific to pack. Does anything depend on pack specific files beyond pack itself?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing reads builder.toml other than pack. I would say we could add a schema version for these files if we wish later, but it isn't necessary yet.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I think that makes sense. In general, leaning on the side of more documentation for things is probably better.

# Unresolved Questions
[unresolved-questions]: #unresolved-questions

- Where in the spec should we document current API versions?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense to just put it at the top of the respective *.md files?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's interesting about this question is that the next API version we would support doesn't match the spec exactly at any commit. Example: we could put API version 2.0 at the top of the buildpack.md but that would seem to imply support for store.toml which isn't yet implemented. We could describe what 2.0 entails at the top of the spec and say 2.1 will add store.toml?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we just need to version the spec in a branch (or tag) that's just accurate for that version. It's why @jkutner and I were talking about just 1 version of the API. It'd make that logistically easier.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regardless of how we version the spec, there are two contracts that need separate versions. Otherwise, if we make a breaking change for platform maintainers that doesn't affect buildpacks, we would be forced to push a new major version on buildpack authors for no reason.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sclevine i wouldn't say it's for no reason; it's so only one version has to be managed. given how infrequently we will have breaking changes (especially after finalizing the spec) I suspect it won't be that big of a burden. That said, I'm fine if we decide on separate versions.


There would be two pieces to this:

1. A reference to the current versions of all APIs placed in the spec. Currently, we would version the Buildpack API (buildpack-to-lifecycle contract) and the Platform API (lifecycle-to-platform contract).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense that there's a distribution version? If we're going to break it down does a version per markdown file make sense?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could see that making sense eventually. Do we want to wait until/if we have a breaking change in the distribution spec?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be mentioned as we expect to do this in the future. However, with the no value implies 1.0, no one would be required to do anything about it today.

@hone
Copy link
Member

hone commented Aug 13, 2019

I think there are some open questions that are still interesting, but overall the ideas in this RFC are great.

@hone
Copy link
Member

hone commented Aug 13, 2019

An open question from me is, what warrants a version in the spec?

@jromero jromero mentioned this pull request Aug 13, 2019
@jkutner
Copy link
Member

jkutner commented Aug 14, 2019

Going on my comment /~https://github.com/buildpack/rfcs/pull/20/files#r313872165 -- people may have to bump both platform buildpack api versions even if they don't change the contents of those files in order to use a particular lifecycle version (unless we support version ranges).

ekcasey added a commit that referenced this pull request Aug 14, 2019
Signed-off-by: Emily Casey <ecasey@pivotal.io>
@hone
Copy link
Member

hone commented Aug 15, 2019

Looks like sem ver gets us limited (but maybe enough) version range support.

@ameyer-pivotal
Copy link
Contributor Author

@hone Good point on the implied range. I'll update the RFC to lay that out too.


There would be two pieces to this:

1. A reference to the current versions of all APIs placed in the spec. Currently, we would version the Buildpack API (buildpack-to-lifecycle contract) and the Platform API (lifecycle-to-platform contract).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be mentioned as we expect to do this in the future. However, with the no value implies 1.0, no one would be required to do anything about it today.

@ekcasey ekcasey merged commit 0ec5a8a into buildpacks:master Aug 15, 2019
nebhale added a commit that referenced this pull request Jan 9, 2020
[resolves #32]

Signed-off-by: Ben Hale <bhale@pivotal.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants