-
Notifications
You must be signed in to change notification settings - Fork 193
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
chore: Refactoring utilities to a separate folder to avoid duplication #977
chore: Refactoring utilities to a separate folder to avoid duplication #977
Conversation
Hi @landreasyan. 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 Once the patch is verified, the new status will be reflected by the 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. |
Adding refactoring changes to v2 files. Refactoring remaining v2 files. Updating formatting.
2a12f3b
to
76da6fe
Compare
"regexp" | ||
) | ||
|
||
const ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should move these to their own constants
package to consistently access them through that alias rather than both constants
and azureutils
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was also thinking of making constants separate package but left it as this for now. If there are no objections for having them as separate package, I would love to make that change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no objections - I believe it would be a good thing to do. @andyzhangx What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use consts
instead of constants
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have refactored constants into a separate pkg.
/ok-to-test |
"regexp" | ||
) | ||
|
||
const ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use consts
instead of constants
?
cc38df9
to
961207e
Compare
Refactoring constants into a separate package. Refactoring constants into a separate package.
961207e
to
3efbcba
Compare
/retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
there is ut failure:
|
/lgtm |
/retest |
The job Verifying gofmt
diff -u ./pkg/azuredisk/fake_azuredisk_v2.go.orig ./pkg/azuredisk/fake_azuredisk_v2.go
--- ./pkg/azuredisk/fake_azuredisk_v2.go.orig 2021-08-25 20:43:08.391083629 +0000
+++ ./pkg/azuredisk/fake_azuredisk_v2.go 2021-08-25 20:43:08.391083629 +0000
@@ -1,3 +1,4 @@
+//go:build azurediskv2
// +build azurediskv2
... It looks like Go is changing the format of the build tags from There is a proposed transition here: https://go.googlesource.com/proposal/+/master/design/draft-gobuild.md#transition. Basically, we need to duplicate the old build tags in the new format, e.g. // +build azurediskv2
//go:build azurediskv2 |
Now Verifying boilerplate
Header in /home/prow/go/src/sigs.k8s.io/azuredisk-csi-driver/hack/../pkg/azuredisk/fake_azuredisk_v2.go does not match reference, diff:
--- reference
+++ /home/prow/go/src/sigs.k8s.io/azuredisk-csi-driver/hack/../pkg/azuredisk/fake_azuredisk_v2.go
@@ -1,3 +1,4 @@
+//go:build azurediskv2
/*
Copyright YEAR The Kubernetes Authors.
@@ -13,4 +14,3 @@
See the License for the specific language governing permissions and
limitations under the License.
*/
-
... The |
/lgtm |
/retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andyzhangx, landreasyan 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 |
What type of PR is this?
This PR refactors the utilities functions into a separate directory to facilitate the development of the v2 driver that has dependency on these functions outside of azuredisk package. Refactoring utilities functions into a separate directory avoids duplication of these functions in the v2 driver.
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Requirements:
Special notes for your reviewer:
Release note: