RosiKyu commented on code in PR #13444:
URL: https://github.com/apache/cloudstack/pull/13444#discussion_r3459606784
##########
server/src/main/java/com/cloud/api/query/dao/HostJoinDaoImpl.java:
##########
@@ -334,7 +379,11 @@ public HostResponse newMinimalHostResponse(HostJoinVO
host) {
@Override
public HostResponse newHostResponse(HostJoinVO host, EnumSet<HostDetails>
details) {
HostResponse hostResponse = new HostResponse();
- setNewHostResponseBase(host, details, hostResponse);
+ if (details.contains(HostDetails.core)) {
+ setNewCoreHostResponse(host, hostResponse);
+ } else {
+ setNewHostResponseBase(host, details, hostResponse);
+ }
Review Comment:
Confirmed in testing. Any request that mixes `core` with another value
(`core,stats` ; `core,capacity` ; `core,events`; `core,all`; `core,min`)
returns the lightweight core set and silently drops the other requested fields.
So if it fails quietly - the caller gets fewer fields than they asked for, with
no error.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]