Skip to content

fix(client): Switch websocket library#1423

Merged
TwiN merged 5 commits intoTwiN:masterfrom
joy4eg:master
Dec 18, 2025
Merged

fix(client): Switch websocket library#1423
TwiN merged 5 commits intoTwiN:masterfrom
joy4eg:master

Conversation

@joy4eg
Copy link
Contributor

@joy4eg joy4eg commented Dec 8, 2025

Copilot AI review requested due to automatic review settings December 8, 2025 09:39
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR switches the WebSocket implementation from golang.org/x/net/websocket to github.com/gorilla/websocket (v1.5.3) and adds t.Parallel() to client tests for improved test performance. The new library provides better API design and enables compression by default.

  • Replaced golang.org/x/net/websocket with github.com/gorilla/websocket for WebSocket probes
  • Refactored QueryWebSocket to use gorilla's context-based dialer with compression enabled
  • Added t.Parallel() to multiple test functions to enable concurrent test execution

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
go.mod Added gorilla/websocket v1.5.3 dependency and moved golang.org/x/net to indirect dependencies
go.sum Updated checksums for new and modified dependencies
client/client.go Refactored QueryWebSocket to use gorilla/websocket with context-based timeout handling, compression support, and improved message type validation
client/client_test.go Added t.Parallel() to test functions and removed an extraneous blank line

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@joy4eg joy4eg changed the title Switch websocket library cleanup(client): Switch websocket library Dec 8, 2025
@joy4eg joy4eg changed the title cleanup(client): Switch websocket library fix(client): Switch websocket library Dec 8, 2025
@TwiN
Copy link
Owner

TwiN commented Dec 16, 2025

I understand the changes you've made, but I don't understand the why. What made you look into changing the websocket library? Did you have any issues with the prior implementation?

@joy4eg
Copy link
Contributor Author

joy4eg commented Dec 17, 2025

We have our internal WS service that we monitor. The issue with it is that it requires WebSocket compression/deflate support in the handshake to connect to it.

@TwiN
Copy link
Owner

TwiN commented Dec 17, 2025

Makes sense

@TwiN TwiN added the area/client Related to client label Dec 18, 2025
@TwiN TwiN merged commit 15a8055 into TwiN:master Dec 18, 2025
2 checks passed
@TwiN
Copy link
Owner

TwiN commented Dec 18, 2025

Thank you for the contribution!

alexlebens pushed a commit to alexlebens/infrastructure that referenced this pull request Jan 4, 2026
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [ghcr.io/twin/gatus](https://github.com/TwiN/gatus) | minor | `v5.33.1` → `v5.34.0` |

---

### Release Notes

<details>
<summary>TwiN/gatus (ghcr.io/twin/gatus)</summary>

### [`v5.34.0`](https://github.com/TwiN/gatus/releases/tag/v5.34.0)

[Compare Source](TwiN/gatus@v5.33.1...v5.34.0)

Hello users of Gatus.

I'm not a fan of mixing my personal life with open source, but I do believe in transparency, and those of you actually reading release notes are most definitely deserving of that transparency *(does anybody actually read this? if you're reading this, can you react to this release note with the least used release note emoji, "😄"? For all I know, it's always the same 10 people reading this. Or don't, really, ~~2025~~ 2026's internet has enough forced engagement as it is)*.

Some of you may have noticed that in the past 6-8 weeks, reviews and merges have slowed down. This is because a few months ago, I became a father, and unlike a computing process, I can't send my child to sleep with a single command, nor can I use a debugger to find out what the problem is.

I had heard that *"babies slept 16 hours a day"* before I had my own, but never could I have imagined this meant they had 16 separate 1 hour nap.

I have also returned to work, because unfortunately, Gatus is just a side project for me and isn't my full time job, and while I have sufficient strength in me to handle both a full time job and being a father, I'm having a hard time maintaining my open source projects as well. I'm getting better every day, but I suspect it'll take a few months until things get back to normal.

Anyways, I wish you all a wonderful 2026. Things are tough right now, but just remember you're not alone. Try to not focus on everything wrong with the world, the list is long enough to keep you unhappy.

Never take life too seriously. Nobody gets out alive anyways.

Happy new year,
TwiN

***

#### What's Changed

- feat(alerting): ClickUp alerting provider by [@&#8203;TheBinaryGuy](https://github.com/TheBinaryGuy) in [#&#8203;1462](TwiN/gatus#1462)
- fix(client): Switch websocket library by [@&#8203;joy4eg](https://github.com/joy4eg) in [#&#8203;1423](TwiN/gatus#1423)
- fix(ui): Inconsistent time values in UI by [@&#8203;PythonGermany](https://github.com/PythonGermany) in [#&#8203;1452](TwiN/gatus#1452)
- chore(ui): Remove unnecessary eslint rule disables by [@&#8203;PythonGermany](https://github.com/PythonGermany) in [#&#8203;1422](TwiN/gatus#1422)
- ui: Disable hover effect if no link is set by [@&#8203;PythonGermany](https://github.com/PythonGermany) in [#&#8203;1419](TwiN/gatus#1419)
- ci: Add workflow to regenerate static assets by [@&#8203;PythonGermany](https://github.com/PythonGermany) in [#&#8203;1457](TwiN/gatus#1457)
- ci: Add platform input for custom action workflow by [@&#8203;PythonGermany](https://github.com/PythonGermany) in [#&#8203;1437](TwiN/gatus#1437)
- docs(alerting): Remove warning for Splunk alerting provider by [@&#8203;luketainton](https://github.com/luketainton) in [#&#8203;1475](TwiN/gatus#1475)
- docs: Separate web and ui config into sections by [@&#8203;PythonGermany](https://github.com/PythonGermany) in [#&#8203;1439](TwiN/gatus#1439)
- docs: Add missing alert provider group override options by [@&#8203;PythonGermany](https://github.com/PythonGermany) in [#&#8203;1467](TwiN/gatus#1467)
- docs: Update Telegram User ID to Chat ID in README by [@&#8203;gshpychka](https://github.com/gshpychka) in [#&#8203;1434](TwiN/gatus#1434)
- docs: Update config section and add env var faq by [@&#8203;PythonGermany](https://github.com/PythonGermany) in [#&#8203;1450](TwiN/gatus#1450)

#### New Contributors

- [@&#8203;gshpychka](https://github.com/gshpychka) made their first contribution in [#&#8203;1434](TwiN/gatus#1434)
- [@&#8203;TheBinaryGuy](https://github.com/TheBinaryGuy) made their first contribution in [#&#8203;1462](TwiN/gatus#1462)
- [@&#8203;luketainton](https://github.com/luketainton) made their first contribution in [#&#8203;1475](TwiN/gatus#1475)

**Full Changelog**: <TwiN/gatus@v5.33.1...v5.34.0>

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi42OS4yIiwidXBkYXRlZEluVmVyIjoiNDIuNjkuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiaW1hZ2UiXX0=-->

Reviewed-on: https://gitea.alexlebens.dev/alexlebens/infrastructure/pulls/3036
Co-authored-by: Renovate Bot <renovate-bot@alexlebens.net>
Co-committed-by: Renovate Bot <renovate-bot@alexlebens.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/client Related to client

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants