Uploaded image for project: 'Insights Experiences'
  1. Insights Experiences
  2. HMS-9351

Policy with no changes returns empty JSON tailoring file

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Undefined Undefined
    • None
    • None
    • Image Builder
    • None
    • Image Builder 10
    • 1
    • None

      The /policies/{policy_id}/tailorings/{tailoring_id}/tailoring_file.json endpoint returns empty body with a status code 204 if no customizations were done to the policy. We instead expect empty, but still valid JSON string. This causes our image builds to fail during autotailoring in osbuild:

      ...
      File \\\"/usr/lib64/python3.12/json/decoder.py\\\", line 356, in raw_decode\
          raise JSONDecodeError(\\\"Expecting value\\\", s, err.value) from None\
      json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
      .... 

      (Foot note: This behaviour is different if we request TOML tailoring file, in that format we actually get full tailoring file even if no customizations were done to the policy)

       

              rhn-support-tkosciel Tom Koscielniak
              rhn-support-tkosciel Tom Koscielniak
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: