Skip to content

Conversation

@etodanik
Copy link

@etodanik etodanik commented Nov 6, 2025

What?

A re-opening of #4989 (feel free to close this and reopen that one if preferred)

Why?

I've addressed the requested changes.

Checklist

  • I have performed a self-review of my code.
  • I have commented on my code, particularly in hard-to-understand areas.
  • I have added tests for my changes.
  • I have run linter and tests locally (make check) and all pass.

@etodanik etodanik requested a review from a team as a code owner November 6, 2025 20:41
@etodanik etodanik requested review from AgnesToulet and mstoykov and removed request for a team November 6, 2025 20:41
@etodanik
Copy link
Author

@mstoykov This one should be addressing all of your change requests

@etodanik etodanik temporarily deployed to azure-trusted-signing November 13, 2025 11:45 — with GitHub Actions Inactive
@etodanik etodanik temporarily deployed to azure-trusted-signing November 13, 2025 11:47 — with GitHub Actions Inactive
@etodanik
Copy link
Author

Will fix lint, but what's the failing test r.now? Doesn't replicate locally & doesn't look like it's directly connected to this PR's change. Am I missing something on it? @mstoykov

@mstoykov
Copy link
Contributor

THe browser tests are flaky so you shouldn't worry about that part - yes

@etodanik
Copy link
Author

etodanik commented Nov 13, 2025

@mstoykov lol, the linter issue was literally just a rogue semicolon (C fingers...).
Fixed now.

@mstoykov mstoykov added this to the v1.5.0 milestone Nov 17, 2025
@etodanik etodanik temporarily deployed to azure-trusted-signing November 17, 2025 10:05 — with GitHub Actions Inactive
@etodanik etodanik temporarily deployed to azure-trusted-signing November 17, 2025 10:08 — with GitHub Actions Inactive
@etodanik
Copy link
Author

If I'm not mistaken, the only failing tests are the flaky unrelated ones.

@etodanik etodanik force-pushed the fix/ws-support-code-reason branch from 3e70b10 to d061610 Compare November 25, 2025 17:11
@etodanik
Copy link
Author

(rebased to latest)
@mstoykov what's next? your comments were addressed. Are we good to go?

Copy link
Contributor

@mstoykov mstoykov left a comment

Choose a reason for hiding this comment

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

Sorry for the slow reply, other PRs and priorities were taking way longer than anticipated for me.

LGTM in general! I have left some comments that are not really blocking, but it will be nice to do them!

Comment on lines +811 to +813
if errList := w.callErrorListeners(err); errList != nil {
return errList
}
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe lets still have the TODO

// needs to be called on the event loop
// TODO: move to events
func (w *webSocket) newEvent(eventType string, t time.Time) *sobek.Object {
func (w *webSocket) newEvent(eventType string, t time.Time, extras ...func(*sobek.Object)) *sobek.Object {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
func (w *webSocket) newEvent(eventType string, t time.Time, extras ...func(*sobek.Object)) *sobek.Object {
func (w *webSocket) newEvent(eventType string, t time.Time, funcOptions ...func(*sobek.Object)) *sobek.Object {

let's have a better name :)

for _, listener := range w.eventListeners.all(eventType) {
// TODO the event here needs to be different and have an error (figure out it was for the close listeners)
if _, err := listener(w.newEvent(eventType, time.Now())); err != nil { // TODO fix timestamp
if _, err := listener(event); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

I can not figure out if those 2 TODOs are still relevant.

Comment on lines +155 to +156
if _, _, err := conn.ReadMessage(); err != nil {
once.Do(func() { close(closeReceived) })
Copy link
Contributor

Choose a reason for hiding this comment

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

This changesr still seem irrelevant 🤔 I have no failures without them.

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.

2 participants