Skip to content
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

Update containerd log dependency #1898

Merged
merged 1 commit into from Sep 29, 2023

Conversation

dmcgowan
Copy link
Contributor

Moving the log package to a separate repository is part of our containerd 2.0 effort to break circular dependencies where we can. Importing the log package in the internal log seems unnecessary since it only uses a const. If copying that const is still not ideal, it can be updated to use new package as well (removed based on "A little copying is better than a little dependency.")

Uses the new log package for the shim and tests.

@dmcgowan dmcgowan requested a review from a team as a code owner September 13, 2023 00:54
Copy link
Member

@kevpar kevpar left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks Derek

@dmcgowan
Copy link
Contributor Author

What needs to be done to get the workflows started here?

@@ -14,7 +14,7 @@ import (

"github.com/Microsoft/go-winio"
task "github.com/containerd/containerd/api/runtime/task/v2"
"github.com/containerd/containerd/log"
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason why we use containerd/log here instead of internal/log? (I think this is more of a question for @kevpar)

Copy link
Member

Choose a reason for hiding this comment

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

That's fair. @dmcgowan would you mind removing this import altogether, and changing the log.RFC3339NanoFixed in this file to hcslog.TimeFormat?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated. The test package is still using github.com/containerd/log, it seems isolated but maybe it could just use logrus directly in the future.

Copy link
Member

Choose a reason for hiding this comment

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

Agreed, we can try to move that in the future

Signed-off-by: Derek McGowan <derek@mcg.dev>
@dmcgowan dmcgowan force-pushed the update-containerd-log-dependency branch from eaedc56 to 8b69b76 Compare September 29, 2023 04:32
@dmcgowan
Copy link
Contributor Author

Can I get the workflows restarted here?

@kevpar
Copy link
Member

kevpar commented Sep 29, 2023

CI re-run looks good.

@kevpar kevpar merged commit a4b4545 into microsoft:main Sep 29, 2023
16 checks passed
akhilerm added a commit to akhilerm/containerd that referenced this pull request Jan 26, 2024
The log package was kept because hcsshim had a dependency. This was
removed in microsoft/hcsshim#1898. So, its not
required to maintain the containerd/containerd/log package anymore.

Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
juliusl pushed a commit to juliusl/containerd that referenced this pull request Jan 26, 2024
The log package was kept because hcsshim had a dependency. This was
removed in microsoft/hcsshim#1898. So, its not
required to maintain the containerd/containerd/log package anymore.

Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants