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

Generate v1 files from latest beta versions #120

Merged
merged 10 commits into from
Apr 2, 2021

Conversation

mauriciopoppe
Copy link
Member

@mauriciopoppe mauriciopoppe commented Mar 19, 2021

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind feature

What this PR does / why we need it:

Generates v1 API files for client/api/{disk,filesystem,smb,volume}, summary of changes:

  • I copied the beta folders to v1, regenerated the proto & _generated.go files with make clean and make generate
  • I updated the integration tests & unit tests to use the v1 dir
  • Also had to force push the v1 files from the vendor directory

/cc @jingxu97

Does this PR introduce a user-facing change?:

v1 API version bump for Disk, Volume, FileSystem and SMB API groups

@k8s-ci-robot k8s-ci-robot requested a review from jingxu97 March 19, 2021 01:35
@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/feature Categorizes issue or PR as related to a new feature. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 19, 2021
@k8s-ci-robot
Copy link
Contributor

Welcome @mauriciopoppe!

It looks like this is your first PR to kubernetes-csi/csi-proxy 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

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.

You can also check if kubernetes-csi/csi-proxy has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

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!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Mar 19, 2021
@k8s-ci-robot
Copy link
Contributor

Hi @mauriciopoppe. Thanks for your PR.

I'm waiting for a kubernetes-csi 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.

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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Mar 19, 2021
@mauriciopoppe
Copy link
Member Author

/cc @ddebroy
I followed #76

@k8s-ci-robot k8s-ci-robot requested a review from ddebroy March 19, 2021 01:44
@mauriciopoppe mauriciopoppe changed the title [WIP] Generate v1 files from latest beta versions Generate v1 files from latest beta versions Mar 19, 2021
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 19, 2021
@jingxu97
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 22, 2021
@mauriciopoppe
Copy link
Member Author

@jingxu97 @ddebroy the vendor folder has a reference to this repository i.e. to github.com/kubernetes-csi/csi-proxy, is this correct?

@ddebroy
Copy link
Contributor

ddebroy commented Mar 29, 2021

hey @jingxu97 I know you introduced the vendor directory in #82 and that included the csi-proxy code itself there as well. Do you recall why we need the csi-proxy files in vendor however?

@ddebroy
Copy link
Contributor

ddebroy commented Mar 29, 2021

sorry for the late review. @mauriciopoppe one q I had was are the renaming of the client_generated.go files for the different API groups like: https://github.com/kubernetes-csi/csi-proxy/pull/120/files#diff-9462bc31a89a73f4209384d57c5e6728708a03d7e03d4f2a80e250e2893f887c . Those should be just fresh new files for v1 (as in https://github.com/kubernetes-csi/csi-proxy/tree/master/client/groups/disk for example). Can you please double check that? Otherwise LGTM.

@mauriciopoppe
Copy link
Member Author

got it, I see the following in my editor
image
but I also see that it shows as renamed in github, I'll check it

@mauriciopoppe
Copy link
Member Author

It looks like git thinks that a vendor file was renamed to the v1 file

image

The vendor files for the usage of v1beta1 and v1beta2 are gone (I regenerated them with go mod vendor), I checked the branch for the autogenerated files and both v1beta and v1 are there, so I think we're good :)

@mauriciopoppe
Copy link
Member Author

@ddebroy I found out that client/ is a go module, there's a detailed PR about the why here #7 (to prove this I removed the go.{mod,sum} files in client/ and run go mod vendor and there were no references in vendor/ to client/) it's a nested module other directories must include and this was done through replace

It looks like the line

github.com/kubernetes-csi/csi-proxy/client => ./client

can't be removed, because the source code files are now using the v1 api some references to v1betaX were removed from modules.txt

I also looked at the issue about git thinking that a rename happened instead of a code generation, I think this is answered in https://stackoverflow.com/a/15031787/3341726 and it's how diffs are displayed, I run the following to check which files were actually renamed and there are none:

❯ git diff --name-status --no-renames master
A       client/api/disk/v1/api.pb.go
A       client/api/disk/v1/api.proto
A       client/api/filesystem/v1/api.pb.go
A       client/api/filesystem/v1/api.proto
A       client/api/smb/v1/api.pb.go
A       client/api/smb/v1/api.proto
A       client/api/volume/v1/api.pb.go
A       client/api/volume/v1/api.proto
A       client/groups/disk/v1/client_generated.go
A       client/groups/filesystem/v1/client_generated.go
A       client/groups/smb/v1/client_generated.go
A       client/groups/volume/v1/client_generated.go
M       go.mod
M       go.sum
M       integrationtests/disk_test.go
M       integrationtests/filesystem_test.go
A       client/api/disk/v1/api.pb.go
A       client/api/disk/v1/api.proto
A       client/api/filesystem/v1/api.pb.go
A       client/api/filesystem/v1/api.proto
A       client/api/smb/v1/api.pb.go
A       client/api/smb/v1/api.proto
A       client/api/volume/v1/api.pb.go
A       client/api/volume/v1/api.proto
A       client/groups/disk/v1/client_generated.go
A       client/groups/filesystem/v1/client_generated.go
A       client/groups/smb/v1/client_generated.go
A       client/groups/volume/v1/client_generated.go
M       go.mod
M       go.sum
M       integrationtests/disk_test.go
M       integrationtests/filesystem_test.go
M       integrationtests/iscsi_test.go
M       integrationtests/smb_test.go
M       integrationtests/volume_test.go
M       internal/server/disk/api_group_generated.go
A       internal/server/disk/internal/v1/conversion.go
A       internal/server/disk/internal/v1/conversion_generated.go
A       internal/server/disk/internal/v1/server_generated.go
M       internal/server/filesystem/api_group_generated.go
A       internal/server/filesystem/internal/v1/conversion.go
A       internal/server/filesystem/internal/v1/conversion_generated.go
A       internal/server/filesystem/internal/v1/server_generated.go
M       internal/server/filesystem/server_test.go
M       internal/server/smb/api_group_generated.go
A       internal/server/smb/internal/v1/conversion.go
A       internal/server/smb/internal/v1/conversion_generated.go
A       internal/server/smb/internal/v1/server_generated.go
M       internal/server/smb/server_test.go
M       internal/server/volume/api_group_generated.go
A       internal/server/volume/internal/v1/conversion.go
A       internal/server/volume/internal/v1/conversion_generated.go
A       internal/server/volume/internal/v1/server_generated.go
M       internal/server/volume/server_test.go
M       release-tools/README.md
M       release-tools/build.make
M       release-tools/cloudbuild.yaml
M       release-tools/prow.sh
D       release-tools/travis.yml
M       release-tools/verify-go-version.sh
A       vendor/github.com/kubernetes-csi/csi-proxy/client/api/disk/v1/api.pb.go
A       vendor/github.com/kubernetes-csi/csi-proxy/client/api/disk/v1/api.proto

Anyways it looks like it's just a git diff thing, not a codebase problem

@ddebroy
Copy link
Contributor

ddebroy commented Apr 2, 2021

Thanks for double checking that @mauriciopoppe
/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 2, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ddebroy, mauriciopoppe

The full list of commands accepted by this bot can be found here.

The pull request process is described here

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

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Apr 2, 2021
@k8s-ci-robot k8s-ci-robot merged commit c5e35d5 into kubernetes-csi:master Apr 2, 2021
@mauriciopoppe mauriciopoppe deleted the v1-api-bump branch April 2, 2021 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants