-
Notifications
You must be signed in to change notification settings - Fork 3.4k
use atomic.Pointer instead of bare LoadPointer #23971
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
Conversation
cc33f04
to
abe783b
Compare
/test |
abe783b
to
2802fee
Compare
gateway-api-conformance-test fails due to #23999. |
/test |
Jenkins failures are due to #24045 |
/test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 💯
ci-multicluster failed due to #23371 |
/test-ci-verifier |
ci-multicluster hit cilium/cilium-cli#1260 from what I can tell. |
@jrajahalme can you take a look please? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the clean-up :-)
There are a couple of uses of LoadPointer in the code base, which lead to a proliferation of unsafe.Pointer. Since Go 1.19 we can use atomic.Pointer instead to get a type safe wrapper. Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
/test Job 'Cilium-PR-K8s-1.16-kernel-4.19' failed: Click to show.Test Name
Failure Output
If it is a flake and a GitHub issue doesn't already exist to track it, comment |
Seems like test-1.16-4.19 had wget killed due to a signal: https://jenkins.cilium.io/job/Cilium-PR-K8s-1.16-kernel-4.19/365/testReport/junit/Suite-k8s-1/16/K8sUpdates_Tests_upgrade_and_downgrade_from_a_Cilium_stable_image_to_master/ |
/test-1.16-4.19 |
[ upstream commit 00ab252 ] [ Backporter's notes: ignoring changes from cilium#26327 and cilium#23971 ] The DefaultLogger variable in the logging module serves as a parent logger which all other loggers can be derived from. It is initialized using the InitializeDefaultLogger function and then adjusted on startup based on user configuration. Users should not call InitializeDefaultLogger to create a parent logger for their logger, since the logger returned by InitializeDefaultLogger will always use the hardcoded defaults. For example, the logger returned will always be of level INFO, even if a user has enabled debug logging. To make this clear, this commit renames InitializeDefaultLogger to initializeDefaultLogger to signal that it should not be used outside of the logging module. Fixes: cilium#29215 Signed-off-by: Ryan Drew <ryan.drew@isovalent.com> Signed-off-by: Anton Ippolitov <anton.ippolitov@datadoghq.com>
[ upstream commit 00ab252 ] [ Backporter's notes: ignoring changes from cilium#26327 and cilium#23971 ] The DefaultLogger variable in the logging module serves as a parent logger which all other loggers can be derived from. It is initialized using the InitializeDefaultLogger function and then adjusted on startup based on user configuration. Users should not call InitializeDefaultLogger to create a parent logger for their logger, since the logger returned by InitializeDefaultLogger will always use the hardcoded defaults. For example, the logger returned will always be of level INFO, even if a user has enabled debug logging. To make this clear, this commit renames InitializeDefaultLogger to initializeDefaultLogger to signal that it should not be used outside of the logging module. Fixes: cilium#29215 Signed-off-by: Ryan Drew <ryan.drew@isovalent.com> Signed-off-by: Anton Ippolitov <anton.ippolitov@datadoghq.com>
[ upstream commit 00ab252 ] [ Backporter's notes: ignoring changes from cilium#26327 and cilium#23971 ] The DefaultLogger variable in the logging module serves as a parent logger which all other loggers can be derived from. It is initialized using the InitializeDefaultLogger function and then adjusted on startup based on user configuration. Users should not call InitializeDefaultLogger to create a parent logger for their logger, since the logger returned by InitializeDefaultLogger will always use the hardcoded defaults. For example, the logger returned will always be of level INFO, even if a user has enabled debug logging. To make this clear, this commit renames InitializeDefaultLogger to initializeDefaultLogger to signal that it should not be used outside of the logging module. Fixes: cilium#29215 Signed-off-by: Ryan Drew <ryan.drew@isovalent.com> Signed-off-by: Anton Ippolitov <anton.ippolitov@datadoghq.com>
[ upstream commit 00ab252 ] [ Backporter's notes: ignoring changes from #26327 and #23971 ] The DefaultLogger variable in the logging module serves as a parent logger which all other loggers can be derived from. It is initialized using the InitializeDefaultLogger function and then adjusted on startup based on user configuration. Users should not call InitializeDefaultLogger to create a parent logger for their logger, since the logger returned by InitializeDefaultLogger will always use the hardcoded defaults. For example, the logger returned will always be of level INFO, even if a user has enabled debug logging. To make this clear, this commit renames InitializeDefaultLogger to initializeDefaultLogger to signal that it should not be used outside of the logging module. Fixes: #29215 Signed-off-by: Ryan Drew <ryan.drew@isovalent.com> Signed-off-by: Anton Ippolitov <anton.ippolitov@datadoghq.com>
[ upstream commit 00ab252 ] [ Backporter's notes: ignoring changes from cilium#26327 and cilium#23971 ] The DefaultLogger variable in the logging module serves as a parent logger which all other loggers can be derived from. It is initialized using the InitializeDefaultLogger function and then adjusted on startup based on user configuration. Users should not call InitializeDefaultLogger to create a parent logger for their logger, since the logger returned by InitializeDefaultLogger will always use the hardcoded defaults. For example, the logger returned will always be of level INFO, even if a user has enabled debug logging. To make this clear, this commit renames InitializeDefaultLogger to initializeDefaultLogger to signal that it should not be used outside of the logging module. Fixes: cilium#29215 Signed-off-by: Ryan Drew <ryan.drew@isovalent.com> Signed-off-by: Anton Ippolitov <anton.ippolitov@datadoghq.com>
[ upstream commit 00ab252 ] [ Backporter's notes: ignoring changes from #26327 and #23971 ] The DefaultLogger variable in the logging module serves as a parent logger which all other loggers can be derived from. It is initialized using the InitializeDefaultLogger function and then adjusted on startup based on user configuration. Users should not call InitializeDefaultLogger to create a parent logger for their logger, since the logger returned by InitializeDefaultLogger will always use the hardcoded defaults. For example, the logger returned will always be of level INFO, even if a user has enabled debug logging. To make this clear, this commit renames InitializeDefaultLogger to initializeDefaultLogger to signal that it should not be used outside of the logging module. Fixes: #29215 Signed-off-by: Ryan Drew <ryan.drew@isovalent.com> Signed-off-by: Anton Ippolitov <anton.ippolitov@datadoghq.com> Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
There are a couple of uses of LoadPointer in the code base, which lead to a proliferation of unsafe.Pointer. Since Go 1.19 we can use atomic.Pointer instead to get a type safe wrapper.