util/tracing/otlptracegrpc: remove errNoClient, and use consistent alias#6494
Open
thaJeztah wants to merge 2 commits intomoby:masterfrom
Open
util/tracing/otlptracegrpc: remove errNoClient, and use consistent alias#6494thaJeztah wants to merge 2 commits intomoby:masterfrom
thaJeztah wants to merge 2 commits intomoby:masterfrom
Conversation
This error was not exported, and didn't appear to be used as a sentinel error. It was added in 750f9af. In a later refactor (f57b3ef), it was moved to a separate file, as it appears to be intentional to use a stdlib error, instead of an error from `pkg/errors`. Moving it iniline makes it slightly more clear that it's intentionally using stdlib, but also adding a comment, just in case. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
thaJeztah
commented
Jan 27, 2026
Comment on lines
-83
to
+85
| return errNoClient | ||
| // Intentionally using a stdlib error here; see https://github.com/moby/buildkit/commit/f57b3ef89b3053048e7f46d0296d98bcef79448b | ||
| return stderrors.New("no client") |
Member
Author
There was a problem hiding this comment.
cc @tonistiigi in case it was not required to use stdlib errors for this; if so, we can drop the extra import and just use errors.New() from pkg/errors.
Member
There was a problem hiding this comment.
Yes, just leave pkg/errors to get stacktrace.
Member
Author
|
Ah, heh; that's why I had it as "draft" locally; forgot that there were quite some un-aliased imports and the linter currently enforces using an alias; Unfortunately that linter doesn't allow enforcing for specific imports, only "all" imports it knows about. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
util/tracing/otlptracegrpc: remove errNoClient
This error was not exported, and didn't appear to be used as a sentinel
error. It was added in 750f9af. In a later
refactor (f57b3ef), it was moved to a separate
file, as it appears to be intentional to use a stdlib error, instead of an
error from
pkg/errors. Moving it iniline makes it slightly more clear thatit's intentionally using stdlib, but also adding a comment, just in case.