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
fix: azuredisk parameter lowercase translation issue #107429
fix: azuredisk parameter lowercase translation issue #107429
Conversation
/retest |
/assign @msau42 |
azureDiskCachingMode: "cachingmode", | ||
azureDiskFSType: fsType, | ||
azureDiskKind: "managed", | ||
"cachingmode": "ReadOnly", |
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.
Can you add a test case using the camelcase field names? It looks like the older version of the driver accepted camelcased fields: https://github.com/kubernetes-sigs/azuredisk-csi-driver/blob/release-1.0/pkg/azuredisk/controllerserver.go#L907
Also, on a related note, it looks like the latest version of the driver no longer accepts camelcase fields. That appears to be a backwards incompatible change that you probably want to fix. https://github.com/kubernetes-sigs/azuredisk-csi-driver/blob/master/pkg/azureutils/azure_disk_utils.go#L126:6
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.
@msau42 thanks for review. in line 369, there are camelcase test cases:
VolumeAttributes: map[string]string{
"cachingMode": "None",
"fsType": fsType,
azureDiskKind: "managed",
},
And csi driver still supports camel case, it's now using strings.EqualFold(k, consts.CachingModeField)
(just another way):
https://github.com/kubernetes-sigs/azuredisk-csi-driver/blob/master/pkg/azureutils/azure_disk_utils.go#L133
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.
thanks!
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andyzhangx, msau42 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 |
…107429-upstream-release-1.23 Automated cherry pick of #107429: fix: azuredisk parameter lowercase translation issue
…107429-upstream-release-1.22 Automated cherry pick of #107429: fix: azuredisk parameter lowercase translation issue
What type of PR is this?
/kind bug
/priority important-soon
/sig cloud-provider
/area provider/azure
/triage accepted
What this PR does / why we need it:
fix: azuredisk parameter lowercase translation issue
parameter
cachingmode: None
(cachingMode
does) is not recognized in csi migration, this PR fixes the issue.Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: