-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
Playwright: browser improvements, update #298944
Conversation
EDIT: Nevermind, I messed up. Going to push a fix right after local tests pass. |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/running-playwright-tests/25655/28 |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-already-reviewed/2617/1632 |
LGTM - any reason why this isn't merged? (apart from the conflict) |
2c61f6f
to
231ccc0
Compare
@wmertens None that I am aware of. Just resolved the merge conflict which was due the recent python reformating PR. |
Just a question like that, but I see in that PR you update Should not update to 1.44.1 instead or it's okay you think ? |
Yes, this PR is 2 months old already. Could upgrade if needed, but as written in the resolved thread in #298944 (comment) I'd prefer to do so in #302759 in to keep churn to a minimum:) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please cleanup the commit history
…the latest version This should be reverted once NixOS/nixpkgs#298944 is merged.
56d6335
to
7cd443e
Compare
Hm..I hadn't seen firefox failing in local testing, only chromium. Chromium seems to work now, due to adding |
I think sandro's comment about simplifiying history was adressed. If we can keep the GPU by default while having the test pass, we can merge. It's a nice contribution, we can iterate afterwards. |
the test times out locally too (x86) |
Hm...I wonder what the issue is here. It just ran successfully for me on two different x86_64-linux nixos machines; one of them not managed by to check whether it's some obscure setting or so ;) It also succeeded on on aarch64-linux in ofborg. Going to ask ofborg to run again to see whether it's flaky? EDIT: It's either flaky or i misunderstand how the checks are run in CI; can re-produce after a rebase. @teto At this point I am guessing, but could you check whether adding Just wanted to use firefox with playwright half a year ago, wrote a test and now I am trying to get the test to pass with chromium 😅 |
@ofborg test playwright-python |
Rebasing on top of the new playwright release in master and using --disable-gpu seem to have fixed the test, @teto? The webkit minibrowser is broken inside the test, but seems to work outside of it. I excluded it from the test for now, as my priority was to get firefox working and a nixos vm test for the browsers to begin with :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks fine to me otherwise, didn't test
driver = playwright-driver; | ||
browsers = playwright-driver.browsers; | ||
} | ||
// lib.optionalAttrs stdenv.isLinux { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could make this unconditional but whatever. Fine by me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it won't hurt to be explicit about supported platforms. :)
Applied review suggestions; hope this is finally good to merge 🙏 😉 short rant about late-stage style reviews and workflows here: I really long for a future where we either have a linter (in CI and locally) for things like sha256->hash when its deemed important enough. I also believe we could have done those changes in the next PR (pure macOS browsers are planned and I am interested in browsers built from source, but let's see how long my energy lasts for this 😅 ) the innocent change from sha256 -> hash caused:
and all that for no functional difference while there's about 56k instances of |
via update.sh. This lets us support playwright with browsers other than chromium on linux. Building them from source would be one step further.
For some reason, chromium, which is still the nixpkgs version hangs inside the normal test vm, while working fine in .driverInteractive. I suspect that might have to do with the existence of a display in .driverInteractive. Neither vm does run X11 or wayland.
|
||
# See here for the Chrome options: | ||
# https://github.com/NixOS/nixpkgs/issues/136207#issuecomment-908637738 | ||
# We add --disable-gpu to be able to run in gpu-less environments such |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this comment is outdated but let's remove it in future PRs.
the test still times out hre for some reason but let's not penalize contributors for adding tests. Considering the effort here, I assume you are in for the long run :) |
🎉🙏 |
Description of changes
in order to use patched upstream browsers without IFD
TODO long term
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.