jashkenas / backbone

Give your JS App some Backbone with Models, Views, Collections, and Events
http://backbonejs.org
MIT License
28.1k stars 5.39k forks source link

Fix test workflow, bis #4252

Closed jgonggrijp closed 2 years ago

jgonggrijp commented 2 years ago

This is a continuation of @ogonkov's work at #4251, which I'm personally pushing directly to the main repo in order to rule out any effects from permissions. I also wanted to try a couple of things. If I end up merging this branch, #4251 will automatically be recognized as merged as well.

jgonggrijp commented 2 years ago

@ogonkov @paulfalgout I got the Sauce Labs tests to run, mostly reliably, with the exception of Firefox 11. See the details of the above (failed) workflow run.

If you agree with the logic changes you see here, we can merge this. However, we need to make a decision about the lowest Firefox version.

The tests do pass in Firefox 11, as you can see on Sauce Labs: https://app.eu-central-1.saucelabs.com/tests/08d1010d4bea46dda25b29f2a6a9a698. However, something is going wrong in the connection with Karma. I tried this on a couple of OS versions and I had a single attempt on Windows 10 where the connection suddenly worked (run 53). So far, I haven't been able to reproduce this, but this is the reason why the karma.conf-sauce.js currently lists Firefox 11 with Windows 10.

I also tried Firefox 18, 25 and 32, but they all behaved similarly flaky, although versions 18 and 32 eventually succeeded on second attempts. See run 55.

I see three possible courses of action:

Please let me know what you think!

ogonkov commented 2 years ago

Can you run sause labs config with config.LOG_DEBUG? May be we get more info about what exactly the problem is

jgonggrijp commented 2 years ago

That was a good suggestion. The visible difference between FF11 and the other browsers was that FF11 was creating additional socket connections and then immediately closing them again. I tried increasing Karma's browserDisconnectTimeout, but that only seems to lead to accumulation of even more sockets.

Haven't been able to find a solution for "Response has empty body" or "Request failed with status 204" yet. Still searching the web.

ogonkov commented 2 years ago

Some requests (which one?) has been responded with empty body, that was unexpected for client. There also warn about old client. May be it is something related to old client, used by plugin?

jgonggrijp commented 2 years ago

Yes, good suggestion. I was just considering to upgrade the devDependencies in case that's playing a role. Will do that now.

jgonggrijp commented 2 years ago

@ogonkov Upgrading the dependencies doesn't seem to have improved matters much, except that there is more debug log output. I'm tired now, so I'll resume this chore at a later date.

If you have any ideas in the meanwhile, please feel free to submit a PR to the patch-1 branch on my fork. I'll merge it as soon as I see it and push it to the main fork, so it will run in here with full permissions.

jgonggrijp commented 2 years ago

@ogonkov I'm just going to remove Firefox 11 for now, so at least we have something to work with. I will create a new issue ticket to document the open challenge.

jgonggrijp commented 2 years ago

I'm stuck again because Sauce Labs hasn't converted my trial account to Open Sauce yet and my trial has run out of testing minutes. To be continued.

jgonggrijp commented 2 years ago

Update: I haven't heard back from Sauce Labs since January 17. I just made a third attempt at reestablishing contact, using a different email address.

jgonggrijp commented 2 years ago

Update again: they finally enabled Open Sauce, so we can run browser tests again. I will resume the debugging labour soon.

jgonggrijp commented 2 years ago

Open Sauce doesn't seem to be really enabled. To be continued...

ogonkov commented 2 years ago

May be we can mark sause labs tests as non blocking for workflow and merge it in master, to fix units in PRs?

jgonggrijp commented 2 years ago

Yes that makes sense. Good idea. How do you do that?

jgonggrijp commented 2 years ago

@ogonkov Turns out Open Sauce was enabled on the US cluster while my account is on the EU cluster. This has now been fixed. I decided to just disable IE 9, IE 10, Chrome 26 and Chrome 40 for the time being (#4253), as the selection of browsers that remains seems still better than nothing. If you agree with the current state of the code, we can merge this (I already rebased for cleanup).

jgonggrijp commented 2 years ago

High five!