Skip to content

Log error from WithError if found#1853

Merged
jedevc merged 1 commit intodocker:masterfrom
jedevc:logrus-show-error
May 30, 2023
Merged

Log error from WithError if found#1853
jedevc merged 1 commit intodocker:masterfrom
jedevc:logrus-show-error

Conversation

@jedevc
Copy link
Copy Markdown
Collaborator

@jedevc jedevc commented May 30, 2023

⬆️ Follow-up to #924.

Should help to provide more details for moby/buildkit#3027.

Previously, we would discard the error field provided, which provides valuable contextual information. This patch will include the error field if it is provided. A quick glance through our usage of WithError indicates that the errors shown should look mostly reasonable (e.g. we won't display duplicated info).

We still don't want to just print out all the available spans, since that will include the spanID and traceID from BuildKit, but this singular field is a well-known key, so we should include it whenever present.

@jedevc jedevc requested a review from crazy-max May 30, 2023 09:04
@jedevc jedevc merged commit 5e2f8bd into docker:master May 30, 2023
@jedevc jedevc deleted the logrus-show-error branch May 30, 2023 09:29
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