[release/1.7 backport] Revert "log: define G() as a function instead of a variable"#9032
Merged
estesp merged 1 commit intocontainerd:release/1.7from Aug 31, 2023
Merged
Conversation
neersighted
approved these changes
Aug 30, 2023
This reverts commit 778ac30. (slightly modified, due to changes that were merged after that). The reverted commit had two elements; - Make `G` an actual function to improve the documentation - Prevent `G` from being overwritten externally From the commit that's reverted: > The `G` variable is exported, and not expected to be overwritten > externally. Defining it as a function also documents it as a function > on https://pkg.go.dev, instead of a variable; https://pkg.go.dev/github.com/containerd/[email protected]/log#pkg-variables While it's unclear if the ability to replace the implementation was _intentional_, it's this part that some external consumers were (ab)using. We should look into that part in a follow-up, and design for this, for example by providing a utility to replace the logger, and properly document that. In the meantime, let's revert the change. Signed-off-by: Sebastiaan van Stijn <[email protected]> (cherry picked from commit 19d6c37) Signed-off-by: Sebastiaan van Stijn <[email protected]>
8ebb308 to
4d1cfbb
Compare
neersighted
added a commit
to neersighted/moby
that referenced
this pull request
Aug 30, 2023
FIXME: `replace` with containerd/containerd#9032 to work around a logging API regression in v1.7.5. Signed-off-by: Bjorn Neergaard <[email protected]>
neersighted
added a commit
to neersighted/moby
that referenced
this pull request
Aug 30, 2023
FIXME: `replace` with containerd/containerd#9032 to work around a logging API regression in v1.7.5. Signed-off-by: Bjorn Neergaard <[email protected]>
|
Skipping CI for Draft Pull Request. |
dmcgowan
approved these changes
Aug 31, 2023
estesp
approved these changes
Aug 31, 2023
neersighted
added a commit
to neersighted/moby
that referenced
this pull request
Sep 6, 2023
FIXME: `replace` with containerd/containerd#9032 to work around a logging API regression in v1.7.5. Signed-off-by: Bjorn Neergaard <[email protected]>
neersighted
added a commit
to neersighted/moby
that referenced
this pull request
Sep 7, 2023
FIXME: `replace` with containerd/containerd#9032 to work around a logging API regression in v1.7.5. Signed-off-by: Bjorn Neergaard <[email protected]>
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.
This reverts commit 778ac30.
(slightly modified, due to changes that were merged after that).
The reverted commit had two elements;
Gan actual function to improve the documentationGfrom being overwritten externallyFrom the commit that's reverted:
While it's unclear if the ability to replace the implementation was intentional, it's this part that some external consumers were (ab)using.
We should look into that part in a follow-up, and design for this, for example by providing a utility to replace the logger, and properly document that.
In the meantime, let's revert the change.
(cherry picked from commit 19d6c37)