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
[n/a] Added the Jira Ticket to the title of the PR e.g. (DATAUP-69 Adds a PR template)
Testing Instructions
Details for how to test the PR:
[x] Tests pass in Github Actions and locally
[x] Changes available by spinning up a local test suite
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)