Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove stderr empty check to avoid docker_params_changed failures when warnings appear #764

Merged
merged 4 commits into from
Aug 2, 2021

Conversation

cedws
Copy link
Contributor

@cedws cedws commented Jul 28, 2021

Relates to #689.

This is my suggested fix for the docker_params_changed Deferred function in environments where $HOME is unset. This can happen if Puppet is ran as a service. If $HOME is unset, Docker prints this to stderr:

WARNING: Error loading config file: .dockercfg: $HOME is not defined

POSIX spec defines stderr as being for errors and diagnostic information. Therefore any output to stderr does not mean there has been an error. The check as it stands is not correct, so let's check just the status code.

@cedws cedws requested a review from a team as a code owner July 28, 2021 21:28
@CLAassistant
Copy link

CLAassistant commented Jul 28, 2021

CLA assistant check
All committers have signed the CLA.

@puppet-community-rangefinder
Copy link

docker_params_changed is a function

that may have no external impact to Forge modules.

This module is declared in 6 of 578 indexed public Puppetfiles.


These results were generated with Rangefinder, a tool that helps predict the downstream impact of breaking changes to elements used in Puppet modules. You can run this on the command line to get a full report.

Exact matches are those that we can positively identify via namespace and the declaring modules' metadata. Non-namespaced items, such as Puppet 3.x functions, will always be reported as near matches only.

@adrianiurca
Copy link
Contributor

Hey @cedws, thank you for your contribution. I just modified the tests accordingly with your modifications.
For me, this PR looks good!

kind regards,
@adrianiurca

@daianamezdrea daianamezdrea changed the title Remove stderr empty check, Docker prints warnings to stderr Remove stderr empty check to avoid docker_params_changed failures when warnings appear Aug 2, 2021
@daianamezdrea daianamezdrea merged commit 4d4d653 into puppetlabs:main Aug 2, 2021
@cedws
Copy link
Contributor Author

cedws commented Aug 2, 2021

Many thanks for this.

@cedws cedws deleted the UnsetHOMEFix branch August 2, 2021 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants