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

Add option to quiet fakemachine #478

Merged
merged 1 commit into from
Feb 1, 2024

Conversation

bergmx
Copy link
Contributor

@bergmx bergmx commented Jan 30, 2024

Hi! Thanks for the work on this useful project.

We have successfully been using debos for some time, but it always prints the whole debos invocation, which causes secrets passed into debos as variables (e.g. account passwords, private keys) to be written to our CI logs. I looked into this and found that it was because fakemachine logs the command it runs by default, though it has an option to suppress this. I saw no way of setting this option through debos, though, hence this pull request.

This pull request adds the flag "--quiet-fakemachine" because it was the least intrusive change, but on a second thought, it looks a bit odd. I think it might make more sense to use the quiet option in fakemachine by default, and let the existing debos flag "--verbose" disable it instead. What do you think? Any approach that lets us pass a variable without having it written to log is fine with us.

@obbardc
Copy link
Member

obbardc commented Jan 31, 2024

@bergmx Thanks for this, I think i'd rather disable the fakemachine invocation log message by default (e.g. SetQuiet(false)) & instead enable it with debos --verbose.

It may be nicer to disable the message by default and have --verbose and machine.SetVerbose(true|false) on the fakemachine side, but that is hindsight ;-).

@bergmx
Copy link
Contributor Author

bergmx commented Jan 31, 2024

Sounds good to me! I made new commit with that change.

doc/man/debos.1 Outdated Show resolved Hide resolved
cmd/debos/debos.go Show resolved Hide resolved
@bergmx bergmx force-pushed the add-option-to-quiet-fakemachine branch from afb8cd4 to c7b54c6 Compare January 31, 2024 14:10
@bergmx
Copy link
Contributor Author

bergmx commented Feb 1, 2024

Hi again @obbardc ! Looks like the merge is blocked. I can't see anything I can do on my end, so maybe there's a button to press on your end? Let me know if there is something I have to do.

@obbardc obbardc self-requested a review February 1, 2024 09:41
@obbardc obbardc added this pull request to the merge queue Feb 1, 2024
@obbardc
Copy link
Member

obbardc commented Feb 1, 2024

I had to review it again manually! Should be all done now though. Thanks again for your contribution!

Merged via the queue into go-debos:main with commit f21bdfd Feb 1, 2024
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants