Rename ObjectProtocolAndBucketInfo to BucketInfo #438
Welcome @rajaneeshgit! <br><br>It looks like this is your first PR to <a href='https://github.com/kubernetes-sigs/container-object-storage-interface'>kubernetes-sigs/container-object-storage-interface</a> 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval. <br><br>You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation. <br><br>You can also check if kubernetes-sigs/container-object-storage-interface has its own contribution guidelines. <br><br>You may want to refer to our testing guide if you run into trouble with your tests not passing. <br><br>If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs! <br><br>Thank you, and welcome to Kubernetes. :smiley:
Hi @rajaneeshgit. Thanks for your PR.
I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.
Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
I understand the commands that are listed here.
<details>
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
</details>
<span aria-hidden="true">✅</span> Deploy Preview for container-object-storage-interface ready!
| Name | Link |
|:-:|------------------------|
|<span aria-hidden="true">🔨</span> Latest commit | 42e15d4b4622e215bacf0b98160ddf9820aab6bb |
|<span aria-hidden="true">🔍</span> Latest deploy log | https://app.netlify.com/projects/container-object-storage-interface/deploys/6aedd5a5f69fd53f034e35f8 |
|<span aria-hidden="true">😎</span> Deploy Preview | https://deploy-preview-438--container-object-storage-interface.netlify.app |
|<span aria-hidden="true">📱</span> Preview on mobile | <details><summary> Toggle QR Code... </summary><br /><br />!QR Code<br /><br />_Use your smartphone camera to open QR code link._</details> |
---
<!-- container-object-storage-interface Preview -->
_To edit notification comments on pull requests, go to your Netlify project configuration._
This change is not defined in the KEP, but it is fairly minor (being a rename), and I think it improves the API's readability. That said, we now have a shared type name between both request and response that is likely to create confusion.
Let's keep it but with some modifications:
AccessedBucket to AccessGrantedBucketAccessRequestedBucketThis should be a good naming scheme for clarity while also not having ridiculously long type names.
With https://github.com/kubernetes-sigs/container-object-storage-interface/pull/438/changes#r4486212758, let's change this to AccessRequestedBucket
Some of the renames here are beyond the scope I intended (and beyond what is officially in the KEP), but I think what you have here is a clear usability improvement for driver developers. A benefit you bring to the project as a newcomer instead of having years of historical knowledge and assumptions.
The only concern I have is that we now have AccessedBucket as a type twice, once for request and once for response. The generated code does have them separated, but I think this could still result in accidental misreadings that could be a point of friction for driver/COSI devs.
It should be easy to add one more rename into the mix to make things consistent and clear while also avoiding confusion. Thanks again for taking the time to work on this
Done.
Done.
The sample driver changes are on the branch rajaneeshgit:rename-bucketinfo. I will open that PR next.
Sample Driver PR: https://github.com/kubernetes-sigs/cosi-driver-sample/pull/174
/ok-to-test
/approve
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: <a href="https://github.com/kubernetes-sigs/container-object-storage-interface/pull/438#issuecomment-6987259461" title="Approved">BlaineEXE</a>, <a href="https://github.com/kubernetes-sigs/container-object-storage-interface/pull/438#" title="Author self-approved">rajaneeshgit</a>
The full list of commands accepted by this bot can be found here.
The pull request process is described here
<details >
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
</details>
<!-- META={"approvers":[]} -->
BlaineEXE
rajaneeshgit
Summary
------
Renames the gRPC message
ObjectProtocolAndBucketInfotoBucketInfo, as asked in #393. That name was already used by the nestedDriverGrantBucketAccessResponse.BucketInfo, so the nested message becomesAccessedBucket, matching the nestedAccessedBucketmessages in the Grant and Revoke requests.I also renamed the respective field name as
bucket_infothat holds aBucketInfo.The sample driver changes are on the branch
rajaneeshgit:rename-bucketinfo. I will open that PR next.BREAKING CHANGE for third-party drivers.
Validation
------
make kubeapi-lintmake test-e2e(kind + MinIO + cosi-driver-sample): Chainsaw suite passesFixes #393