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

[CI-2304] Spinner output configuration #191

Merged
merged 2 commits into from
Dec 6, 2023
Merged

Conversation

tothszabi
Copy link
Contributor

@tothszabi tothszabi commented Dec 6, 2023

The self hosted agent setup uncovered a path in the CLI where it was not using structured logging but instead was writing directly to the stdout. The build log grouping service was receiving such content:

[
   ...
   {
      "timestamp":"2023-12-04T16:15:17.7254-06:00",
      "type":"log",
      "producer":"bitrise_cli",
      "level":"normal",
      "message":"You can find more information about stepman on its official GitHub page: https://github.com/bitrise-io/stepman\n"
   },
   "Installing...",
   {
      "timestamp":"2023-12-04T16:15:18.233691-06:00",
      "type":"log",
      "producer":"bitrise_cli",
      "level":"normal",
      "message":"\u001b[32;1m[OK]\u001b[0m stepman (0.16.1): /Users/foreflight/.bitrise/tools/stepman\n"
   },
   ...
]

where the Installing... message is not wrapped into a json object. The root cause of it was the spinner component which was writing directly to the stdout.

After these changes the component generates correct json output:

{"timestamp":"2023-12-05T15:21:52.645225Z","type":"log","producer":"bitrise_cli","level":"normal","message":"Installing...\n"}

I have created a new initialiser which accepts an io.Writer which will be used as the destination.

@tothszabi tothszabi merged commit 494b3cc into v1 Dec 6, 2023
2 checks passed
@tothszabi tothszabi deleted the CI-2304-spinner-output branch December 6, 2023 10:36
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