kbase / execution_engine2

KBase Execution Engine
http://www.kbase.us/services/ee2
MIT License
0 stars 7 forks source link

Protect the catalog cache internals from external mutation #401

Closed MrCreosote closed 3 years ago

MrCreosote commented 3 years ago

Description of PR purpose/changes

The catalog cache exposes the cache internals by reference when returning job requirements, which means that any modification of the returned value modifies the cache. The job requirements resolver does exactly this for CSV formatted client group info from the catalog, popping the client group from the front of the list. This means that for any given app, the first run works normally and any later runs see an empty requirements set if only the clientgroup is specified, or a corrupted requirements set if there are more key/value pairs after the client group.

This PR prevents alteration of the cache by an external client.

Jira Ticket / Github Issue

Testing Instructions

Dev Checklist:

Updating Version and Release Notes (if applicable)