saltstack / salt

Software to automate the management and configuration of any infrastructure or application at scale. Get access to the Salt software package repository here:
https://repo.saltproject.io/
Apache License 2.0
13.98k stars 5.47k forks source link

[master] Suppress error output for missing sysrc variables on FreeBSD #66652

Open amendlik opened 1 week ago

amendlik commented 1 week ago

What does this PR do?

Suppress error output for missing sysrc variables on FreeBSD This condition is expected and handled by the code, so there is no need to write error logs when it happens.

What issues does this PR fix or reference?

N/A

Previous Behavior

If the sysrc.get module was called for a sysrc variable that did not exist, several lines of error message would be written to the log/console.

$ sudo salt-call sysrc.get name=example
[ERROR   ] Command 'sysrc' failed with return code: 1
[ERROR   ] stdout: sysrc: unknown variable 'example'
[ERROR   ] retcode: 1
[ERROR   ] Command 'sysrc' failed with return code: 1
[ERROR   ] output: sysrc: unknown variable 'example'
local:
    None

This is condition is accounted for by the code, which return the correct value of None, so there is no value in displaying the errors.

New Behavior

The error messages are suppressed.

$ sudo salt-call sysrc.get name=example
local:
    None

Merge requirements satisfied?

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

Commits signed with GPG?

Yes

amendlik commented 1 week ago

The sysrc module has been removed from the repository, along with scores of others, in dc526dc2b17660059ca19f2d486cabeba54d021a.

Was this decision published or explained somewhere? Since I rely on this module and others that have now been deleted, what are my options?

amendlik commented 3 days ago

@dwoz - Can you offer some insight on the "purge of community extensions"? It seems like a good way to alienate contributors and customers at the same time, but I'd like to understand the rationale before drawing any conclusions.