Re: Review Request 71735: Added 'nodiscard' attribute to some member functions of Resources.

2019-11-07 Thread Mesos Reviewbot

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71735/#review218570
---



Bad patch!

Reviews applied: [71734, 71735]

Failed command: ['bash', '-c', "set -o pipefail; export OS='ubuntu:14.04' 
BUILDTOOL='autotools' COMPILER='gcc' CONFIGURATION='--verbose 
--disable-libtool-wrappers --disable-parallel-test-execution' 
ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker-build.sh 2>&1 | tee 
build_71735"]

Error:
..
chical.cpp:1625] Framework d2c0f3d0-d637-4928-a83d-e6f1f803763a- filtered 
agent d2c0f3d0-d637-4928-a83d-e6f1f803763a-S0 for 5secs
I1107 17:15:32.903017 18799 master.cpp:12589] Sending operation '' (uuid: 
f6b41846-a77b-4008-8c14-c5311bc1bf09) to agent 
d2c0f3d0-d637-4928-a83d-e6f1f803763a-S0 at slave(1247)@172.17.0.4:39947 
(791d85515a04)
I1107 17:15:32.903573 18804 slave.cpp:4352] Ignoring new checkpointed resources 
and operations identical to the current version
I1107 17:15:32.906338 18802 provider.cpp:498] Received APPLY_OPERATION event
I1107 17:15:32.906379 18802 provider.cpp:1351] Received RESERVE operation '' 
(uuid: f6b41846-a77b-4008-8c14-c5311bc1bf09)
I1107 17:15:32.920514 18799 status_update_manager_process.hpp:152] Received 
operation status update OPERATION_FINISHED (Status UUID: 
7cd79696-a316-4286-a4e6-f45fc42c62bf) for operation UUID 
f6b41846-a77b-4008-8c14-c5311bc1bf09 on agent 
d2c0f3d0-d637-4928-a83d-e6f1f803763a-S0
I1107 17:15:32.920583 18799 status_update_manager_process.hpp:414] Creating 
operation status update stream f6b41846-a77b-4008-8c14-c5311bc1bf09 
checkpoint=true
I1107 17:15:32.920883 18799 status_update_manager_process.hpp:929] 
Checkpointing UPDATE for operation status update OPERATION_FINISHED (Status 
UUID: 7cd79696-a316-4286-a4e6-f45fc42c62bf) for operation UUID 
f6b41846-a77b-4008-8c14-c5311bc1bf09 on agent 
d2c0f3d0-d637-4928-a83d-e6f1f803763a-S0
I1107 17:15:32.937435 18799 status_update_manager_process.hpp:528] Forwarding 
operation status update OPERATION_FINISHED (Status UUID: 
7cd79696-a316-4286-a4e6-f45fc42c62bf) for operation UUID 
f6b41846-a77b-4008-8c14-c5311bc1bf09 on agent 
d2c0f3d0-d637-4928-a83d-e6f1f803763a-S0
I1107 17:15:32.938262 18803 http_connection.hpp:131] Sending 
UPDATE_OPERATION_STATUS call to 
http://172.17.0.4:39947/slave(1247)/api/v1/resource_provider
I1107 17:15:32.939275 18793 process.cpp:3671] Handling HTTP event for process 
'slave(1247)' with path: '/slave(1247)/api/v1/resource_provider'
I1107 17:15:32.942592 18792 hierarchical.cpp:1853] Performed allocation for 1 
agents in 1.249097ms
I1107 17:15:32.943356 18794 master.cpp:10427] Sending offers [ 
d2c0f3d0-d637-4928-a83d-e6f1f803763a-O3 ] to framework 
d2c0f3d0-d637-4928-a83d-e6f1f803763a- (default) at 
scheduler-d84d8700-40bf-481e-afbe-e5ec4fce662d@172.17.0.4:39947
I1107 17:15:32.943956 18807 sched.cpp:934] Scheduler::resourceOffers took 
66154ns
I1107 17:15:32.946669 18798 process.cpp:3671] Handling HTTP event for process 
'master' with path: '/master/api/v1'
I1107 17:15:32.948333 18795 http.cpp:1115] HTTP POST for /master/api/v1 from 
172.17.0.4:48928
I1107 17:15:32.948576 18795 http.cpp:263] Processing call CREATE_VOLUMES
I1107 17:15:32.949432 18795 master.cpp:3938] Authorizing principal 
'test-principal' to create volumes 
'[{"disk":{"persistence":{"id":"09e86a6c-aee9-4868-8f78-bc38b51e91bf","principal":"test-principal"},"source":{"id":"/tmp/CSIVersion_StorageLocalResourceProviderTest_OperatorOperationsWithResourceProviderResources_v1_xFSogm/2GB-2d79ba2f-8efc-4ebc-89d1-d942fde9fb29","mount":{"root":"./csi/org.apache.mesos.csi.test/local/mounts"},"profile":"test","type":"MOUNT","vendor":"org.apache.mesos.csi.test.local"},"volume":{"container_path":"volume","mode":"RW"}},"name":"disk","provider_id":{"value":"cee03e8d-a980-4744-b7e9-9d40c2b2df65"},"reservations":[{"role":"storage","type":"DYNAMIC"},{"principal":"test-principal","role":"storage/default-role","type":"DYNAMIC"}],"scalar":{"value":2048.0},"type":"SCALAR"}]'
I1107 17:15:32.950933 18807 sched.cpp:960] Rescinded offer 
d2c0f3d0-d637-4928-a83d-e6f1f803763a-O3
I1107 17:15:32.951045 18807 sched.cpp:971] Scheduler::offerRescinded took 
56333ns
I1107 17:15:32.951463 18796 hierarchical.cpp:1576] Recovered ports(allocated: 
storage/default-role):[31000-32000]; disk(allocated: 
storage/default-role)(reservations: 
[(DYNAMIC,storage),(DYNAMIC,storage/default-role,test-principal)])[MOUNT(org.apache.mesos.csi.test.local,/tmp/CSIVersion_StorageLocalResourceProviderTest_OperatorOperationsWithResourceProviderResources_v1_xFSogm/2GB-2d79ba2f-8efc-4ebc-89d1-d942fde9fb29,test)]:2048;
 cpus(allocated: storage/default-role):2; mem(allocated: 
storage/default-role):1024; disk(allocated: storage/default-role):1024 (total: 
cpus:2; mem:1024; disk:1024; ports:[31000-32000]; disk(reservations: 
[(DYNAMIC,storage),(DYNAMIC,storage/default-role,test-principal)])[MOUNT

Re: Review Request 71735: Added 'nodiscard' attribute to some member functions of Resources.

2019-11-07 Thread Benno Evers

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71735/
---

(Updated Nov. 7, 2019, 2:37 p.m.)


Review request for mesos, Benjamin Bannier and Greg Mann.


Changes
---

Reformatted line breaks.


Summary (updated)
-

Added 'nodiscard' attribute to some member functions of Resources.


Repository: mesos


Description
---

Added the `[[nodiscard]]` attribute to `Resources::pushReservation()`
and `Resources::popReservation()`, in order to prevent mistakes by
authors incorrectly assuming that these functions would modify the
resources objects in place.


Diffs (updated)
-

  include/mesos/resources.hpp b8aef28e08f85c87bb78f25a64b0d7318f2727cc 


Diff: https://reviews.apache.org/r/71735/diff/2/

Changes: https://reviews.apache.org/r/71735/diff/1-2/


Testing
---


Thanks,

Benno Evers