build-image icon indicating copy to clipboard operation
build-image copied to clipboard

minor: tighten up logging

Open nolessafool opened this issue 7 years ago • 6 comments

There are a few loglines in the output of every build we could safely skip IMNSHO. Not saying don't run the commands, just outputting them doesn't serve a purpose I can understand (vs say showing what $PATH is or something ;))

8:29:08 PM: unset GOOS;
8:29:08 PM: unset GOARCH;
8:29:08 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.10.linux.amd64';
8:29:08 PM: export PATH="/opt/buildhome/.gimme/versions/go1.10.linux.amd64/bin:${PATH}";
8:29:08 PM: go version >&2;
8:29:08 PM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.10.linux.amd64.env';

nolessafool avatar Nov 15 '18 04:11 nolessafool

These log lines are coming from the script from travis CI we use to install go, see here. Might not be worth trying to remove those logs, if it's low priority?

aarushik93 avatar Apr 08 '20 12:04 aarushik93

@aarushik93 So are we supposed to be piping those commands into a bash environment? I'm wondering if instead of removing them in that Travis CI file there's a way to not print them when piped?

mheffner avatar Apr 08 '20 14:04 mheffner

thinking out loud: we could also fork that travis script, change it, and use our own copy, non?

nolessafool avatar Apr 08 '20 20:04 nolessafool

@fool that's absolutely an option, but I think if there's any way we can avoid having to maintain a fork that's ideal. If everyone else (ie Travis) is simply echoing those commands to their output then maybe we need our own version, it seems odd that those shell commands are showing up in output though. I'd be curious if there was a way we were invoking it that were different than expected use.

mheffner avatar Apr 08 '20 21:04 mheffner

As far as I can see we're not actually piping these commands. Making commands not print out is just: set +x, as far as I know. But some of the commands aren't working when I pipe them as well. eg. go version >&2 Since to pipe and execute it should be in quotes

aarushik93 avatar Apr 09 '20 12:04 aarushik93

Also, maybe someone can provide me some background on the use of the script from travis as opposed to just installing go ourselves in the container? Maybe that's a possibility too - I believe that would also remove other unnecessary logs?

aarushik93 avatar Apr 09 '20 12:04 aarushik93