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

Support for acadia profile #205

Merged
merged 10 commits into from
Dec 3, 2024

Conversation

sameshai
Copy link
Contributor

@sameshai sameshai commented Dec 2, 2024

No description provided.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Dec 2, 2024
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Dec 2, 2024
@coveralls
Copy link

coveralls commented Dec 2, 2024

Coverage Status

coverage: 79.805% (-0.1%) from 79.935%
when pulling 8fbbd26 on sameshai:acadia-support
into 2f19d90 on kubernetes-sigs:master.

@sameshai sameshai self-assigned this Dec 2, 2024
@sameshai
Copy link
Contributor Author

sameshai commented Dec 2, 2024

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Dec 2, 2024
Copy link
Contributor

@arahamad arahamad left a comment

Choose a reason for hiding this comment

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

please check my comments as well and test it

@@ -65,7 +69,8 @@ func getRequestedCapacity(capRange *csi.CapacityRange) (int64, error) {

// Limit is more than Required, but larger than Minimum. So we just set capcity to Minimum
// Too small, default
if capBytes < utils.MinimumVolumeSizeInBytes {
// If profile is SDP profile then no need to check for minimum size as the RoundUpBytes will giving minimum value as 1 GiB
if profileName != SDPProfile && capBytes < utils.MinimumVolumeSizeInBytes {
Copy link
Contributor

Choose a reason for hiding this comment

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

pl reverse the condition

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

expectedValue int64
expectedError error
}{
{
testCaseName: "Check minimum size supported by volume provider in case of nil passed as input for sdp profile",
Copy link
Contributor

Choose a reason for hiding this comment

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

please add negative tests as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added few cases covering nil but we cannot pass negative value to this parameter. IDeally this will come from the k8s parsing form PVC.It is not allowed

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 2, 2024
Signed-off-by: Sameer Shaikh <sameer.shaikh@ibm.com>
Signed-off-by: Sameer Shaikh <sameer.shaikh@ibm.com>
Signed-off-by: Sameer Shaikh <sameer.shaikh@ibm.com>
Signed-off-by: Sameer Shaikh <sameer.shaikh@ibm.com>
Signed-off-by: Sameer Shaikh <sameer.shaikh@ibm.com>
Signed-off-by: Sameer Shaikh <sameer.shaikh@ibm.com>
Signed-off-by: Sameer Shaikh <sameer.shaikh@ibm.com>
Signed-off-by: Sameer Shaikh <sameer.shaikh@ibm.com>
Copy link
Contributor

@arahamad arahamad left a comment

Choose a reason for hiding this comment

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

can you verify changes and update the result

@k8s-ci-robot k8s-ci-robot removed the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 2, 2024
Signed-off-by: Sameer Shaikh <sameer.shaikh@ibm.com>
Copy link
Contributor

@arahamad arahamad left a comment

Choose a reason for hiding this comment

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

can you check my comments

for key, value := range req.GetParameters() {
switch key {
case Profile:
if utils.ListContainsSubstr(SupportedProfile, value) {
profileName = value
Copy link
Contributor

Choose a reason for hiding this comment

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

why we can't use volume.VPCVolume.Profile.Name instead of creating new variable?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@arahamad I had initially used that only but wanted to avoid multiple nil checks. I have now put generic nil check to avoid this. Thanks for the comments.

Signed-off-by: Sameer Shaikh <sameer.shaikh@ibm.com>
Copy link
Contributor

@arahamad arahamad left a comment

Choose a reason for hiding this comment

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

/lgtm

please verify also

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: arahamad, sameshai

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 Dec 3, 2024
@k8s-ci-robot k8s-ci-robot merged commit 5163d43 into kubernetes-sigs:master Dec 3, 2024
6 checks passed
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. 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. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants