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

Discard output from the command that starts dnsdock #155

Open
febbraro opened this issue Mar 3, 2018 · 1 comment
Open

Discard output from the command that starts dnsdock #155

febbraro opened this issue Mar 3, 2018 · 1 comment

Comments

@febbraro
Copy link
Member

febbraro commented Mar 3, 2018

When spinning and the dnsdock image has not been pulled, the output will be populated with results from pulling and starting up the dnsdock container on clean machines.

HELP WANTED
This issue is a great opportunity to learn Golang, the contribution workflow of rig, and incidentally improve rig!

Example

screenshot 2018-03-03 08 51 07

Goal

Only show this output in verbose mode, where the lack of a spinner will also make it look much cleaner.

Notes

  • rig start sets up dns support with operations from the rig dns command, check out ./commands/dns.go
  • All the executed commands in dns.go appear to use our util.StreamCommand() method from ./util/shell_exec.go. This command is supposed to hide the output from execution unless verbose mode is in use. Is that behavior broken?
  • If not, why do we see the interrupting output? Could docker run be using stderr to output this content? If so, we can have these commands redirect stderr to stdout (e.g., 2>&1) but how do we correctly surface error content if the command fails?

Testing

  • Use docker-compose run --rm compile to confirm your code compiles.
  • Use docker-compose run --rm lint to apply the full suite of static analysis tools. If there is a failure, you aren't done yet!
  • You can use the binary resulting from the compilation step (located in ./build/darwin/rig) to test that rig dns still works.
  • Reproduce this result by removing the dnsdock image, forcing it to be re-pulled when you next run rig dns. It may be tricky to use Outrigger without dns running, the heavy-handed workaround is to spin up a separate docker-machine, as the docker images are stored per VM.
@grayside
Copy link
Contributor

grayside commented Mar 7, 2018

Updated description to facilitate this as a contributor onboarding task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants