insights-core icon indicating copy to clipboard operation
insights-core copied to clipboard

fix: Serialize playbooks manually on Python 3.12+

Open m-horky opened this issue 8 months ago • 1 comments

  • Card ID: CCT-538

All Pull Requests:

Check all that apply:

  • [x] Have you followed the guidelines in our Contributing document, including the instructions about commit messages?
  • [x] Is this PR to correct an issue?
  • [ ] Is this PR an enhancement?

Complete Description of Additions/Changes:

The playbook verification relies signatures created from hashes of serialized snippets/playbooks. Python 3.12 changed the way it serializes OrderedDict objects into strings, making the verification fail, resulting in valid playbooks being rejected.

This patch mimics the old serialization logic in a tested and easy-to-debug way.

m-horky avatar Jun 12 '24 14:06 m-horky