saltstack / salt

Software to automate the management and configuration of any infrastructure or application at scale. Install Salt from the Salt package repositories here:
https://docs.saltproject.io/salt/install-guide/en/latest/
Apache License 2.0
14.2k stars 5.48k forks source link

[3006.x] The profile outputter does not crash with incorrectly formatted data #66770

Closed Akm0d closed 3 months ago

Akm0d commented 3 months ago

What does this PR do?

This PR fixes issues in the profile outputter, improving its handling of incorrectly formatted state returns and non-state returns. These changes ensure the outputter provides consistent and properly formatted output across a wider range of inputs.

What issues does this PR fix or reference?

Fixes #65104

Previous Behavior

The profile outputter would fail with a TypeError when processing:

New Behavior

The profile outputter now handles a broader range of input data types without crashing, providing a consistent, formatted table output. This includes:

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

Yes

max-arnold commented 2 months ago

This outputter was removed as part of the great module purge PR. Does this fix mean it is going to stay in core (due to merge forward), or it is better to convert it to extension?

dmurphy18 commented 2 months ago

@max-arnold This is just fixing the 3006.x and 3007.x branches (merge forward), great module purge stands and the fix will have to go into an extension, if the file was part of the great purge.