Skip to content

Drop GetSupportedVersions in favor of versioned proto package #204

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

Merged
merged 1 commit into from
Feb 23, 2018

Conversation

jieyu
Copy link
Member

@jieyu jieyu commented Feb 23, 2018

As per the CSI discussion today regarding versioning:

based on and supersedes #202

This patch also removes the `GetSupportedVersions` and per request
Version field because of the newly introduced version in the package
name.
@jieyu
Copy link
Member Author

jieyu commented Feb 23, 2018

@saad-ali @julian-hj @cpuguy83 PTAL

I squashed and rebased. Squash is because there are too many conflicts. cc @jdef

Copy link
Contributor

@julian-hj julian-hj left a comment

Choose a reason for hiding this comment

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

LGTM

@saad-ali
Copy link
Member

LGTM

Copy link
Contributor

@cpuguy83 cpuguy83 left a comment

Choose a reason for hiding this comment

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

LGTM

@jieyu jieyu merged commit 31c1670 into container-storage-interface:master Feb 23, 2018
@akutz
Copy link
Contributor

akutz commented Feb 25, 2018

Wow, this seems drastic and potentially harmful.

Why remove this RPC that is in fact quite useful? API changes cannot be completely dictated by the potential language bindings. While I agree that changes to support bindings are good, removing a feature because a specific binding may not utilize is in fact removing that utility for all languages that can make use of it.

A CSI endpoint could be in any language and so could a client. A client, for example, that supports multiple API versions. How is a client now able to query the endpoint about what versions are supported? That is completely gone? This is not a good change. Even post 1.0 there will be breaking changes going forward, and now there is simply no way to know what an endpoint supports.

While it's a good idea to version the proto package, the ability to query what versions are supported was fundamental. I'm gone for one meeting and this happens? sigh :)

Also, I've mentioned this several times to no avail, but I'll try again. Why was the following omitted?

option go_package = "csi";
option java_package="csi";
option csharp_namespace="csi";

This is frustrating. I recommended this change in #195 and it was ignored. It was recommended and ignored offline as well. Recommendations deserve at least an acknowledgement, even if they are ultimately declined.

@akutz
Copy link
Contributor

akutz commented Feb 25, 2018

Hi @jieyu,

Also, please simplify the packaging path from lib/go/csi/v0 to lib/go/v0. The csi component is vestigial and should be removed.

@akutz
Copy link
Contributor

akutz commented Feb 25, 2018

Hi @jieyu,

I am really concerned that you neglected to separate the CSI proto/packaging changes and the RPC/Version message changes into multiple commits. I would see the latter completely reverted as it serves no discernible purpose as far as I can tell. However it also requires reverting the changes of value in this PR. I think everyone in this project could do well to start paying more attention to good Git practice. There have been a few PRs lately where commits should be separate.

@cpuguy83
Copy link
Contributor

@akutz we removed it with the intention of working towards version negotiation. We didn't feel the existing rpc was good enough and wanted to lump the breaking change into 0.2 and add something else (or potentially even the same thing, who knows) as an additive/non-breaking change before 1.0.

@akutz
Copy link
Contributor

akutz commented Feb 25, 2018

Hi @cpuguy83,

version negotiation

Ah. That aspect of your discussion is not represented clearly in the PR description. Thank you very much. That makes sense.

@akutz
Copy link
Contributor

akutz commented Feb 25, 2018

Hi @cpuguy83 / @jieyu / @saad-ali,

I just want to add that all other reductive changes to strip the spec down should be managed ASAP. The fact is that these changes have broad, downstream impact. Entire types are removed, rendering libraries and programs unable to even compile until refactoring occurs.

@akutz
Copy link
Contributor

akutz commented Feb 25, 2018

Hi @jieyu / @saad-ali,

Hmm, know what would make lives easier? Reintroduce the Version message. At least then middleware, helper funcs, etc. that rely on csi.Version don’t immediately break.

@akutz
Copy link
Contributor

akutz commented Feb 25, 2018

Hi @cpuguy83,

One quick update on your comment regarding version negotiation. Last year I recommended moving the version negotiation to the gRPC metadata:

Hi @jsafrane and @jieyu,

The gRPC folks expect that your code should always be backwards compatible. Besides, gRPC itself can largely handle additive changes. A message with a single field will parse data that has two fields by ignoring the second field.

To @jsafrane's point about breaking changes, perhaps we should consider relocating the version field into the gRPC message metadata, which can then be parsed out via a gRPC interceptor.

That way the message is approved or rejected before it is ever routed to the correct (or rather intended) handler.

Please see the GoCSI client for an example on injecting a message with metadata and the server that extracts said data.

This change would allow multiple versions of the API to still handle version negotiation. There is a reason that this method is quite common in HTTP-based APIs. Headers are not bound to the API model and are useful for handling contract negotiation.

cc @saad-ali

@jdef
Copy link
Member

jdef commented Feb 25, 2018 via email

@akutz
Copy link
Contributor

akutz commented Feb 26, 2018

Hi @jdef,

If you did then I missed it. It’s likely you did, and I just overlooked your response. Thank you, and while I agree with the reasoning, if you add the suggested options then people consuming the proto in its raw form won’t have to modify it to get the equivalent package name. However, I see your viewpoint as well.

@akutz
Copy link
Contributor

akutz commented Feb 26, 2018

Let’s rememeber that the proto isn’t bound to the rules/results of this repo or what it hosts, but rather that the proto should assume anyone may wish to consume it and generate language bindings for any language.

@jdef
Copy link
Member

jdef commented Feb 26, 2018 via email

@jdef
Copy link
Member

jdef commented Feb 26, 2018 via email

@akutz
Copy link
Contributor

akutz commented Feb 26, 2018

I'm aware of each. i figured it was just the final path component like Go since Java's notation is filesystem based as well as .NET's.

@jdef
Copy link
Member

jdef commented Feb 26, 2018

I'm also a bit sad that the commit stream was squashed for this. Let's try to do better going forward.

@akutz
Copy link
Contributor

akutz commented Feb 26, 2018

Hi @jdef,

So I'm blaming lack of sleep, because I have six years of experience with .NET (C#) and five-ish with Java, and I apparently completely forgot both required the full namespace path at the top of their respective source files.

I even double checked my own sources to verify. I thought both were completely file-system based like Go, with each source reflecting the name of the contextual namespace component. FWIW, both are like that with respect to project directory structure. Not that it matters. I'm just saying that must have been what I was considering given my recent tenure with Go.

Damn.

(take a step away from the laptop Andrew)

Thanks for doing the due diligence on this I neglected to do.

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.

Consider adding vMAJOR version (e.g. csi.v1.) to either the API bindings or package names
6 participants