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

Send arrays to ConvertTo-Json in the internal disk implementation #154

Merged
merged 1 commit into from
Jun 17, 2021

Conversation

mauriciopoppe
Copy link
Member

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 bug

What this PR does / why we need it:

Context #153, we're using ConvertTo-Json @(...) instead of pipes

Which issue(s) this PR fixes:

Fixes #153

Does this PR introduce a user-facing change?:

NONE

/hold
/cc @jingxu97 @ddebroy

We should merge #152 first

@k8s-ci-robot k8s-ci-robot requested review from ddebroy and jingxu97 June 15, 2021 21:23
@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jun 15, 2021
@mauriciopoppe mauriciopoppe changed the title Rename /internal to pkg, nested /internal/server/<group>/internal to impl Send arrays to ConvertTo-Json in the internal disk implementation Jun 15, 2021
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jun 16, 2021
@mauriciopoppe
Copy link
Member Author

I've also checked the other places in volume that were using | ConvertTo-Json and they don't use array, they use maps so I think we're ok

/unhold

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 16, 2021
@@ -93,8 +93,8 @@ func (DiskAPI) ListDiskLocations() (map[uint32]shared.DiskLocation, error) {

m := make(map[uint32]shared.DiskLocation)
for _, v := range getDisk {
str := v["location"].(string)
num := v["number"].(float64)
str := v["Location"].(string)
Copy link
Contributor

Choose a reason for hiding this comment

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

why change location --> Location?

Copy link
Member Author

Choose a reason for hiding this comment

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

this change is actually not needed and I can revert it back, it's because I also changed this line above:

cmd := fmt.Sprintf("ConvertTo-Json @(Get-Disk | select Number, Location)")

Copy link
Member Author

Choose a reason for hiding this comment

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

I think I can skip making this change, I already run the integration tests on #155 and they're passing with the v1 API too

@jingxu97
Copy link
Contributor

/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 Jun 17, 2021
@jingxu97
Copy link
Contributor

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jingxu97, 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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 17, 2021
@k8s-ci-robot k8s-ci-robot merged commit 5478544 into kubernetes-csi:master Jun 17, 2021
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/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
3 participants