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

[BUG] 1.5.1 uses log.Printf #880

Closed
1 task done
jech opened this issue Dec 10, 2023 · 19 comments · Fixed by #897
Closed
1 task done

[BUG] 1.5.1 uses log.Printf #880

jech opened this issue Dec 10, 2023 · 19 comments · Fixed by #897
Labels

Comments

@jech
Copy link

jech commented Dec 10, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Commit 666c197 is a huge commit with no useful log message, and I keep finding new issues with it.

One of the issues is that it included a bunch of error handling using log.Printf. gorilla/websocket is a generally useful library, and it should not be making any assumptions about my application's logging infrastructure; using log.Printf for logging is a clear violation of this basic principle.

Please revert commit 666c197.

Expected Behavior

A low-lever library should not be doing logging on behalf of the application.

Steps To Reproduce

No response

Anything else?

No response

@AlexVulaj
Copy link
Member

Hey @jech thanks for bringing this up. Reverting the entire commit isn't likely to happen as a lot of those changes were to bring our codebase in line with new linters and such. However, could you take a look and see if this PR addresses your issue? #878

@jech
Copy link
Author

jech commented Dec 12, 2023

I understand that it's difficult to rollback the entire commit, but is is practical to submit a PR to undo actual functionality changes

I believe that the proper way to proceed would be to revert said commit, and then resubmit the useful parts with proper commit messages. If that is not done, then somebody will need to fork the package.

@FZambia
Copy link
Contributor

FZambia commented Jan 16, 2024

I am also not updating to Gorilla WebSocket v1.5.1 in https://github.com/centrifugal/centrifuge and https://github.com/centrifugal/centrifugo to not introduce unwanted noise to user's logs. Is there a plan to revert the changes made? I agree with above comments and will prefer forking the package than migrating to it in the current state.

@ReToCode
Copy link

+1 on this, we have the same concerns in Knative: knative/serving#14597.

@AlexVulaj
Copy link
Member

Hey all - one of our maintainers submitted this PR to hopefully undo the logging that was added causing all of the extra noise. Hoping to get that pushed through soon.

@jech
Copy link
Author

jech commented Mar 6, 2024

@AlexVulaj, the problem is that since 666c197 is so large and undocumented, it is impossible to review.

If you want us to trust gorilla/websocket again, you need to revert 666c197, and then resubmit the useful changes in manageable units with proper commit messages. Leaving the commit in and then playing whack-a-mole with the issues it introduced is not going to produce sofftware we can depend on.

@AlexVulaj
Copy link
Member

Didn't mean to close this issue - must've been an automated process with the merge of the above PR. I'm leaving this open for discussion until the logging issues are confirmed to be good.

@AlexVulaj
Copy link
Member

@jech While I totally understand the desire to revert that commit and move forward, our concern is that we'd lose a number of community contributions that have been made since that change. We're trying our best to fix the problems brought up in this thread without erasing any of those valuable contributions, which can be a difficult process.

I appreciate everyone's patience here as we work through this.

@jech
Copy link
Author

jech commented Apr 2, 2024

@AlexVulaj This is not a mere desire. There is simply no way to review that commit, and hence there is no way to convince ourselves that no erroneous or even malicious code has been snuck into Gorilla websocket.

It is simply not possible for us to trust this branch of Gorilla Websocket as long as this commit is not reverted and the features submitted again in byte-sized chunks with proper commit messages.

@apoorvajagtap
Copy link
Member

Hello folks, we understand your perspective & concerns with the breaking commit in history, and based on the consensus reached, we have raised this draft PR that reverts the changes introduced with commit 666c197. We’ll be bumping the go version & shall add the required GHA & relevant configurations as a separate commit (in the same PR).
Please feel free to review the PR & share your feedback.

@jech
Copy link
Author

jech commented Apr 27, 2024

The problematic commit has been in the repository for almost eight months now, and has still not been reverted. At this point, I find it very difficult to trust the new maintainer of gorilla/websocket, and am considering forking the repository from the last trustworthy version.

@AlexVulaj
Copy link
Member

Hey @jech - as you can see above @apoorvajagtap opened a PR to revert the commit about a month ago. We wanted to leave it open for a small period of time in case community members had comments or discussion around the revert. We're going to go ahead and push it through.

@davidnewhall
Copy link

At this point, I find it very difficult to trust the new maintaine

Trust went out the window shortly after the project was unarchived.

our concern is that we'd lose a number of community contributions that have been made since that change

You do not lose changes by removing broken code, that's a terrible thing to even suggest. You are, however, losing users because you refuse to address this problem in a timely manner.

Good luck to all!

@TraceCarrasco
Copy link

This is open source, feel free open up a set of PRs that bring your trust back folks. The contributors here took an archived project and added support, which is very generous of them. It’s part of the open source community to support these worries - even when mistakes were made previously.

@dprotaso
Copy link

dprotaso commented Jun 5, 2024

Is the plan to cut a release prior to closing this issue? It seems like the logging changes are in main ?

@jaitaiwan
Copy link
Member

The plan is to try to clean the repo up and then issue a new release. Unfortunately this isn't the only repo in the gorilla org that we maintain and most of the repos also require our attention.

apoorvajagtap added a commit to apoorvajagtap/gorilla-websocket that referenced this issue Jun 14, 2024
This commit reverts the changes back till gorilla@8983b96.
And inherits the README.md changes of gorilla@931041c
Relates to:
- gorilla#880 (comment)
AlexVulaj pushed a commit that referenced this issue Jun 14, 2024
This commit reverts the changes back till 8983b96.
And inherits the README.md changes of 931041c
Relates to:
- #880 (comment)
@AlexVulaj
Copy link
Member

Hey all - some of the other maintainers have merged a new PR to revert back to commit 931041c . We've also cut a new release - v1.5.3 - that has these changes.

We understand that we handled this situation poorly - it was a learning experience for us and we regret not doing this sooner. We'll be looking to put out a more formal statement on this issue, and we appreciate all of the feedback we received - both positive and negative - from the community during this. We know we have to be better here.

For now, if anyone would mind trying the new release and letting us know if the prior observed issues are resolved, it'd be a great help to making sure this revert did everything we expect.

@jech
Copy link
Author

jech commented Jun 14, 2024

Reverts to v1.5.0

$ git diff --stat v1.5.0
 .circleci/config.yml  |  6 +++---
 README.md             |  6 ------
 client.go             | 18 +++++++++++++++---
 client_server_test.go | 35 +++++++++++++++++++++++++++++++++++
 conn.go               |  8 ++++++++
 conn_test.go          | 12 +++++++++++-
 server.go             |  4 ++--
 server_test.go        |  2 +-
 util.go               | 15 +++++++++++++++
 util_test.go          | 19 +++++++++++++++++++
 10 files changed, 109 insertions(+), 16 deletions(-)

What am I missing?

@jaitaiwan
Copy link
Member

You're not missing anything, we poorly named the commit. Go with what Alex has mentioned here... its a release with reversions for all commits after 931041c.

yousong added a commit to yousong/socketio-go that referenced this issue Jun 17, 2024
For the unfortunate chaos of the current upstream project status.  Ref
gorilla/websocket#880
MarcoPolo added a commit to libp2p/go-libp2p that referenced this issue Jul 3, 2024
This change has some history. Originally there was v1.5.0, then the
project stalled and eventually the repo got archived. Some new
maintainers stepped up and released v1.5.1. That version had some
controversial changes including excessive logging (see
gorilla/websocket#880). This caused us to
downgrade this dep back to v1.5.0 (see #2762). The change was short
lived as I bumped this dep back up to v1.5.1 without remembering this
context.

Since then the maintainers of gorilla/websocket have released a new
version v1.5.3 that brings the project back to the state of when it got
archived (minus a README edit). Bumping to this version should solve our
issues with v1.5.1 without having to downgrade back down to v1.5.0.
MarcoPolo added a commit to libp2p/go-libp2p that referenced this issue Jul 4, 2024
This change has some history. Originally there was v1.5.0, then the
project stalled and eventually the repo got archived. Some new
maintainers stepped up and released v1.5.1. That version had some
controversial changes including excessive logging (see
gorilla/websocket#880). This caused us to
downgrade this dep back to v1.5.0 (see #2762). The change was short
lived as I bumped this dep back up to v1.5.1 without remembering this
context.

Since then the maintainers of gorilla/websocket have released a new
version v1.5.3 that brings the project back to the state of when it got
archived (minus a README edit). Bumping to this version should solve our
issues with v1.5.1 without having to downgrade back down to v1.5.0.
sukunrt pushed a commit to libp2p/go-libp2p that referenced this issue Jul 4, 2024
This change has some history. Originally there was v1.5.0, then the
project stalled and eventually the repo got archived. Some new
maintainers stepped up and released v1.5.1. That version had some
controversial changes including excessive logging (see
gorilla/websocket#880). This caused us to
downgrade this dep back to v1.5.0 (see #2762). The change was short
lived as I bumped this dep back up to v1.5.1 without remembering this
context.

Since then the maintainers of gorilla/websocket have released a new
version v1.5.3 that brings the project back to the state of when it got
archived (minus a README edit). Bumping to this version should solve our
issues with v1.5.1 without having to downgrade back down to v1.5.0.
MarcoPolo added a commit to libp2p/go-libp2p that referenced this issue Jul 4, 2024
* pstoremanager: fix connectedness check

* Close quic conns when wrapping conn fails

* Add a transport level test to ensure we close conns after rejecting them by the rcmgr

* PR Comments

* chore: Bump fx to v1.22.1 (#2857)

* chore: Bump gorilla/websocket to 1.5.3

This change has some history. Originally there was v1.5.0, then the
project stalled and eventually the repo got archived. Some new
maintainers stepped up and released v1.5.1. That version had some
controversial changes including excessive logging (see
gorilla/websocket#880). This caused us to
downgrade this dep back to v1.5.0 (see #2762). The change was short
lived as I bumped this dep back up to v1.5.1 without remembering this
context.

Since then the maintainers of gorilla/websocket have released a new
version v1.5.3 that brings the project back to the state of when it got
archived (minus a README edit). Bumping to this version should solve our
issues with v1.5.1 without having to downgrade back down to v1.5.0.

* peerstore: don't intern protocols  (#2860)

* peerstore: don't intern protocols

* peerstore: reduce default protocol limit to 128

* Remove unused mutex

---------

Co-authored-by: Marco Munizaga <[email protected]>

* webtransport: close underlying h3 connection (#2862)

* release v0.35.2

---------

Co-authored-by: sukun <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

9 participants