Repeating logs building due to progress spinner

Hello everyone!

I have the strangest issue. At our company we build our Gatsby project (Gatsby build) using a docker container and running it on Buildkite. Everything was completely fine until we decided to upgrade our version of Gatsby, this is when we started seeing HUGE logs (like 60+MBs) whereas before we had like 11KB. On closer inspection is seemed that Gatsby’s build process indicator (a little spinner that moves in place to indicate progress) was spitting out all of the logs on every tick, like when transitioning from ⠙ to ⠹

This spinner was there on the previous version and hadn’t changed.

We built the docker container locally but this didn’t seem to happen. Has anyone seen/dealt with a problem similar to this?

1 Like

Worthwhile investigating:

We’re having this exact same issue. It might be easier to get Gatsby to make the spinner optional, but ideally Buildkite would address it as it doesn’t appear to happen in other CICD tooling

Hello @norsk!

Thanks for the message - welcome to the Buildkite community forum!

Two options exist for addressing this: if you’re using a Docker Container to build your Gatsby project - passing in the CI environment variable (defaulting true with each build) to the container through either propagate_environment or by specifying it with env (Docker Compose plugin) would change the default logger to yurnalist rather than ink (each icon change will refresh the screen and result in logs as you’ve seen).

Alternatively, the other way would be to set the GATSBY_LOGGER environment variable to yurnalist - with will then initialise the logger of said name.

Hope that helps :slightly_smiling_face:

1 Like

Thanks @james.s !
Setting the GATSBY_LOGGER env var took care of it

No worries @norsk!

Happy to assist :slightly_smiling_face: