-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
[release/1.7 backport] Revert "log: define G() as a function instead of a variable" #9032
Merged
estesp
merged 1 commit into
containerd:release/1.7
from
thaJeztah:1.7_backport_revert_log_var
Aug 31, 2023
Merged
[release/1.7 backport] Revert "log: define G() as a function instead of a variable" #9032
estesp
merged 1 commit into
containerd:release/1.7
from
thaJeztah:1.7_backport_revert_log_var
Aug 31, 2023
Conversation
This file contains 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
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/containerd@v1.6.22/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 <github@gone.nl> (cherry picked from commit 19d6c37) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
thaJeztah
force-pushed
the
1.7_backport_revert_log_var
branch
from
August 30, 2023 19:47
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 <bjorn.neergaard@docker.com>
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 <bjorn.neergaard@docker.com>
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 <bjorn.neergaard@docker.com>
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 <bjorn.neergaard@docker.com>
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;
G
an actual function to improve the documentationG
from 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)