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

Fix Volume provisioning service instance parameter validation #103

Merged
merged 2 commits into from
Jul 27, 2020

Conversation

kumarashit
Copy link
Collaborator

What type of PR is this?

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

/kind new feature
kind bug fix
/kind cleanup
/kind revert change
/kind design
/kind documentation
/kind enhancement

What this PR does / why we need it:
This make the request parameter keys in accordance with the swagger.
a) Change the Key case
b) If the parameter is defined in action yaml to be required false, it sends the parameter as 'null'. This invalidates the default parameter value of the function and the SODA API fails for validation. So passing the default values explicitly

Some errors in API log:
E0706 12:58:42.250396 2799048 validation.go:64] invalid request: Request body has an error: doesn't match the schema: Property 'name' is missing
E0706 12:58:42.256562 2799048 context.go:155] code: 400, reason: Request body has an error: doesn't match the schema: Property 'name' is missing

I0706 23:04:09.462377 2892953 accesslog.go:26] ^[[32m[D] 172.23.0.6:37156 -- POST /v1beta/94b280022d0c4401bcf3b0ea85870519/block/volumes^[[0m
E0706 23:04:09.462515 2892953 validation.go:69] invalid request: Request body has an error: doesn't match the schema: Error at "/availabilityZone":Value is not nullable {"ProfileId": "868a7d24-74ac-41b4-8ef3-9e974f19a03d", "profileId": "868a7d24-74ac-41b4-8ef3-9e974f19a03d", "availabilityZone": null, "name": "test001", "size": 1}
E0706 23:04:09.462951 2892953 context.go:155] code: 400, reason: Request body has an error: doesn't match the schema: Error at "/availabilityZone":Value is not nullable

Which issue(s) this PR fixes:

Fixes #102

Test Report Added?:

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

Test Report:

Volume provisioning in SODA Dashboard
image
Volume provisioning in Stackstorm
image

Bucket migration in SODA Dashboard:
image

Bucket MIgration in Stackstorm:
image

Special notes for your reviewer:

Copy link
Contributor

@joseph-v joseph-v left a comment

Choose a reason for hiding this comment

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

LGTM

@wisererik
Copy link
Collaborator

LGTM

Copy link
Contributor

@skdwriting skdwriting left a comment

Choose a reason for hiding this comment

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

LGTM

@skdwriting skdwriting merged commit de1583c into sodafoundation:master Jul 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot execute volume provisioning service
4 participants