-
Notifications
You must be signed in to change notification settings - Fork 178
Conversation
This causes go-ipfs tests to fail when upgrading to a libp2p version that doesn't use go-log@v1 any more.
Thank you for submitting this PR!
Getting other community members to do a review would be great help too on complex PRs (you can ask in the chats/forums). If you are unsure about something, just leave us a comment.
We currently aim to provide initial feedback/triaging within two business days. Please keep an eye on any labelling actions, as these will indicate priorities and status of your contribution. |
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.
This PR is caused by a breaking change in go-ipfs in which log outputs from ipfs log tail
do not include data from libp2p since it's now controlled by go-logv2 instead of v1. We can re-enable this if we modify ipfs log tail
to be useful again since now the log output from ipfs daemon
is by far going to be more useful
// GetLogs is used to retrieve a parsable logger object | ||
func (s *Shell) GetLogs(ctx context.Context) (Logger, error) { | ||
resp, err := s.Request("log/tail").Send(ctx) | ||
if err != nil { | ||
return Logger{}, err | ||
} | ||
if resp.Error != nil { | ||
resp.Output.Close() | ||
return Logger{}, resp.Error | ||
} | ||
return newLogger(resp.Output), nil | ||
} |
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.
Does log tail
not produce anything anymore such that it's worth removing the command here?
e.g. is this shareness test going to fail as well https://github.com/ipfs/go-ipfs/blob/ef866a1400b3b2861e5e8b6cc9edc8633b890a0a/test/sharness/t0065-active-requests.sh#L23?
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.
If that log output was coming from go-libp2p, it would have disappeared with v0.18. If it was coming from an ipfs component that hasn't been updated to go-log@v2, we probably need to rework this sharness 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.
I'm not sure how many/which things within go-ipfs are using go-logv1 still. However, some local cursory checking of go-ipfs shows that there's at least https://github.com/ipfs/go-ipfs/blob/ef866a1400b3b2861e5e8b6cc9edc8633b890a0a/core/corehttp/logs.go#L53 which means that curl http://localhost:5001/logs
triggers {"event":"log API client connected","session":"ac177dbb-08e8-4d58-a69b-c0d3d46f6aa7","system":"core/server","time":"2022-03-01T09:36:38.577943Z"}
to show up from ipfs log tail
.
So we should probably restore the command and if we want we can restore the test as well as long as it does that HTTP call also to trigger an event.
I've also filed ipfs/kubo#8753 since go-ipfs probably wants to deal with the upgrade and fixing ipfs log tail
sooner rather than later.
This causes go-ipfs tests to fail when upgrading to a libp2p version (v0.18.0) that doesn't use go-log@v1 any more.
More context: https://protocollabs.slack.com/archives/CDWAJ81FA/p1642320872083500.