-
Notifications
You must be signed in to change notification settings - Fork 1.3k
apiserver : Ensure required parameters are not empty #5136
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
Conversation
|
@blueorangutan package |
|
@davidjumani a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
DaanHoogland
left a comment
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.
clgtm
|
Packaging result: ✔️ centos7 ✔️ centos8 ✔️ debian. SL-JID 319 |
|
@blueorangutan test |
|
@davidjumani a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian Build Failed (tid-1036) |
|
Trillian Build Failed (tid-1037) |
31c561d to
01a7c3d
Compare
01a7c3d to
84e5eba
Compare
|
@blueorangutan package |
|
@davidjumani a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔️ centos7 ✔️ centos8 ✔️ debian. SL-JID 321 |
|
@blueorangutan test |
|
@davidjumani a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-1039)
|
|
@blueorangutan package |
|
@davidjumani a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
18068ea to
821d2e3
Compare
|
@blueorangutan package |
|
@davidjumani a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔️ centos7 ✔️ centos8 ✔️ debian. SL-JID 329 |
|
@blueorangutan test matrix |
|
@davidjumani a Trillian-Jenkins matrix job (centos7 mgmt + xs71, centos7 mgmt + vmware65, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests |
|
Trillian test result (tid-1044)
|
|
Trillian test result (tid-1045)
|
|
@blueorangutan test centos7 vmware-65u2 |
|
@davidjumani a Trillian-Jenkins test job (centos7 mgmt + vmware-65u2) has been kicked to run smoke tests |
GabrielBrascher
left a comment
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 for the PR @davidjumani.
Overall code LGTM; I'm just curious about the removal of the required = true from supportedservices.
api/src/main/java/org/apache/cloudstack/api/command/admin/network/CreateNetworkOfferingCmd.java
Show resolved
Hide resolved
GabrielBrascher
left a comment
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.
Code LGTM
|
Trillian test result (tid-1115)
|
| continue; | ||
| } | ||
| if (parameterAnnotation.required()){ | ||
| validateNonEmptyString(paramObj, parameterAnnotation.name()); |
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 - my only worry is if it causes a regression as it create a new behaviour (nit)
shwstppr
left a comment
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. Tested locally with simulator,
For required empty params:
(local) 🐱 > create domain name=
🙈 Error: (HTTP 431, error code 4350) Empty or null value provided for API arg: name
For non-required empty params:
(local) 🐱 > create volume name= zoneid=1b1aecd6-4ee1-4a05-a02c-e34625387a1a diskofferingid=01c41386-2101-48eb-b68e-610d1b5252d2
{
"volume": {
"account": "admin",
"created": "2021-06-29T14:41:16+0530",
"destroyed": false,
"diskofferingdisplaytext": "Small Disk, 5 GB",
"diskofferingid": "01c41386-2101-48eb-b68e-610d1b5252d2",
"diskofferingname": "Small",
"displayvolume": true,
"domain": "ROOT",
"domainid": "1f376e9f-d8b4-11eb-bd2c-645d8651f45a",
"hypervisor": "None",
"id": "0c4a7918-d2eb-42d3-ada9-b2880402a36c",
"isextractable": true,
"jobid": "ca5a09cf-10d8-49ac-ad00-cb01bf57750c",
"jobstatus": 0,
"name": "8f16fe2e-cd2d-4705-b4fc-f138b726edbd",
"provisioningtype": "thin",
"quiescevm": false,
"size": 5368709120,
"state": "Allocated",
"storagetype": "shared",
"supportsstoragesnapshot": false,
"tags": [],
"type": "DATADISK",
"zoneid": "1b1aecd6-4ee1-4a05-a02c-e34625387a1a",
"zonename": "Sandbox-simulator"
}
}
|
rekicked the final failing travis job (5) but i think we can merge |
|
@davidjumani I understand that optional parameters passed in the API are ignored, but these are still not null. In any case, the parameter value returned based on not null check, there can be issue (for example, not null Boolean params can be interpreted as true/false - whatever default value for Boolean in java, and the default parameter value is the opposite). |
|
@sureshanaparti There are no changes to optional parameters, only parameters with required=true will now have to not be empty |
As the required parameters are validated here, before validating them through the validations annotation, this annotation |
|
@blueorangutan package |
|
@davidjumani a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
1389e79 to
eb52423
Compare
|
@blueorangutan package |
|
@davidjumani a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔️ centos7 ✔️ centos8 ✔️ debian. SL-JID 447 |
|
@blueorangutan test |
|
@davidjumani a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-1184)
|
Description
Addon to #5135
Ensures that any required parameter is not empty / null
Types of changes
Bug Severity
How Has This Been Tested?