Skip to content

Issue/fix nasty caching side effect

Description

It appeared that the config caching mechanism was not safe for python contexts, such as: https://code.inmanta.com/inmanta-infra/labs/-/blob/d5ca535ad927af8ce14b0eddb58d58fe73b3603f/inmanta_plugins/labs/__init__.py#L236

Where the constructed dict proxy object (and its internal dict) have a shorter lifetime than the compile process. In this particular instance, the id of the dict might be reused causing cache corruption.

Reviewers list

  • reviewer 1

Developer Self Check:

Strike through any lines that are not applicable (~~line~~) then check the box

  • Changelog entry and version bump inmanta module release --dev [--major|--minor|--patch] [--changelog-message "<your_changelog_message>"]
  • Code is clear and sufficiently documented (classes, methods and function docs, document important assumptions, link to reference materials)
  • Type annotations
  • Issue is in the review column
  • Code has been pre-reviewed by developer
  • Sensitive elements have been highlighted with opened discussions
  • This change will not break anything in production
Edited by Guillaume Everarts de Velp

Merge request reports

Loading