Skip to content

Conversation

joamaki
Copy link
Contributor

@joamaki joamaki commented Jun 13, 2024

This converts code in pkg/datapath/linux to use slog instead of logrus. The last commit adds a make precheck check for logrus usage for packages that have been converted over as a safeguard to avoid reintroducing logrus.

bandwidth: Switch to slog

    Refactor to use the slog logging.

    Signed-off-by: Jussi Maki <jussi@isovalent.com>

bigtcp: Switch to slog

    Refactor to use the slog logging

    Signed-off-by: Jussi Maki <jussi@isovalent.com>

config: Switch to slog

    Refactor to use the slog logging.

    Signed-off-by: Jussi Maki <jussi@isovalent.com>

devices: Switch to slog

    Refactor the DeviceManager to use slog logging.

    Signed-off-by: Jussi Maki <jussi@isovalent.com>

linux: Switch linuxNodeHandler to use slog

    Refactor the linuxNodeHandler to use the slog logging.

    Signed-off-by: Jussi Maki <jussi@isovalent.com>

sysctl: Switch to slog

    Refactor to use the slog logging.

    Signed-off-by: Jussi Maki <jussi@isovalent.com>

ipsec: Switch to slog

    Refactor the ipsec code to use slog logging.

    Signed-off-by: Jussi Maki <jussi@isovalent.com>

scripts: Add linter for logrus usage

    To catch reintroduction of logrus after a package has been converted over to
    slog, add a whitelist-based linter for finding imports of logrus from 
    already converted packages.

    Signed-off-by: Jussi Maki <jussi@isovalent.com>

@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Jun 13, 2024
@joamaki joamaki added the release-note/misc This PR makes changes that have no direct user impact. label Jun 13, 2024
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Jun 13, 2024
@joamaki
Copy link
Contributor Author

joamaki commented Jun 13, 2024

/test

@joamaki joamaki marked this pull request as ready for review June 13, 2024 16:20
@joamaki joamaki requested review from a team as code owners June 13, 2024 16:20
@joamaki joamaki enabled auto-merge June 14, 2024 14:31
Copy link
Contributor

@gentoo-root gentoo-root left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall. A few questions and minor suggestions.

joamaki added 8 commits June 17, 2024 10:07
Refactor to use the slog logging.

Signed-off-by: Jussi Maki <jussi@isovalent.com>
Refactor to use the slog logging

Signed-off-by: Jussi Maki <jussi@isovalent.com>
Refactor to use the slog logging.

Signed-off-by: Jussi Maki <jussi@isovalent.com>
Refactor the DeviceManager to use slog logging.

Signed-off-by: Jussi Maki <jussi@isovalent.com>
Refactor the linuxNodeHandler to use the slog logging.

Signed-off-by: Jussi Maki <jussi@isovalent.com>
Refactor to use the slog logging.

Signed-off-by: Jussi Maki <jussi@isovalent.com>
Refactor the ipsec code to use slog logging.

Signed-off-by: Jussi Maki <jussi@isovalent.com>
To catch reintroduction of logrus after a package has been converted over
to slog, add a whitelist-based linter for finding imports of logrus from
already converted packages.

Signed-off-by: Jussi Maki <jussi@isovalent.com>
@joamaki joamaki force-pushed the pr/joamaki/slog-datapath-linux branch from 0d16ec8 to 48a4670 Compare June 17, 2024 08:12
@joamaki
Copy link
Contributor Author

joamaki commented Jun 17, 2024

/test

@joamaki joamaki added this pull request to the merge queue Jun 17, 2024
Merged via the queue into cilium:main with commit 7511f74 Jun 17, 2024
@joamaki joamaki deleted the pr/joamaki/slog-datapath-linux branch June 17, 2024 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants