[ci/multinode] Fix resource popping resulting in empty resource head nodes (#21531)

Fixes a small bug where we pop from the resources dict without making a copy, emptying the head node resources. This sometimes leads to empty head node resources.
This commit is contained in:
Kai Fricke 2022-01-11 13:20:58 -08:00 committed by GitHub
parent d2d749b6f9
commit 084bda87a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -268,6 +268,8 @@ class FakeMultiNodeProvider(NodeProvider):
raise AssertionError("Readonly node provider cannot be updated")
def create_node_with_resources(self, node_config, tags, count, resources):
resources = resources.copy()
with self.lock:
node_type = tags[TAG_RAY_USER_NODE_TYPE]
next_id = self._next_hex_node_id()