Skip to content

v1.18.0 produces invalid YAML on long linesΒ #380

@LukasPrediger

Description

@LukasPrediger

Describe the bug

Take the version number with a grain of salt, we only noticed this due to the new feature of reporting labels and annotations

When producing a yaml report with KRR that contains very long lines (seems to be pretty exactly 81 columns), krr adds a line break, which often breaks the yaml format.

Example:
rewe-digital.com/scm-image-commit: <commit-hash> produces a line that's longer than 80 lines. This is being output to the yaml files as

rewe-digital.com/scm-image-commit: 
 <commit-hash>

Which is invalid yaml, so it breaks programs trying to parse the file

To Reproduce

  1. create some kubernetes resource where label + value is longer than 80 columns
  2. analyze this resource with krr and configure yaml output
  3. check the produced yaml file

Workaround
For now simply downgrading to 1.17.0 fixes the issue since the labels and annotations are not being written to the output report

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions