Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

remove the log/tail command #263

Merged
merged 1 commit into from
Mar 1, 2022
Merged

remove the log/tail command #263

merged 1 commit into from
Mar 1, 2022

Conversation

marten-seemann
Copy link
Member

@marten-seemann marten-seemann commented Feb 21, 2022

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.

This causes go-ipfs tests to fail when upgrading to a libp2p version that
doesn't use go-log@v1 any more.
@welcome
Copy link

welcome bot commented Feb 21, 2022

Thank you for submitting this PR!
A maintainer will be here shortly to review it.
We are super grateful, but we are also overloaded! Help us by making sure that:

  • The context for this PR is clear, with relevant discussion, decisions
    and stakeholders linked/mentioned.

  • Your contribution itself is clear (code comments, self-review for the
    rest) and in its best form. Follow the code contribution
    guidelines

    if they apply.

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.
Next steps:

  • A maintainer will triage and assign priority to this PR, commenting on
    any missing things and potentially assigning a reviewer for high
    priority items.

  • The PR gets reviews, discussed and approvals as needed.

  • The PR is merged by maintainers when it has been approved and comments addressed.

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.
We are very grateful for your contribution!

Copy link
Contributor

@aschmahmann aschmahmann left a 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

@marten-seemann marten-seemann merged commit 120ee60 into master Mar 1, 2022
Comment on lines -26 to -37
// 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
}
Copy link
Contributor

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?

Copy link
Member Author

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.

Copy link
Contributor

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.

@lidel lidel deleted the remove-logtail branch April 1, 2022 16:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants