Skip to content

mir,mir_2_15: Fix builds, modernise & fix VM tests#374873

Merged
OPNA2608 merged 7 commits intoNixOS:masterfrom
OPNA2608:fix/mir-compositor-test-file-generators
Jan 21, 2025
Merged

mir,mir_2_15: Fix builds, modernise & fix VM tests#374873
OPNA2608 merged 7 commits intoNixOS:masterfrom
OPNA2608:fix/mir-compositor-test-file-generators

Conversation

@OPNA2608
Copy link
Contributor

@OPNA2608 OPNA2608 commented Jan 18, 2025

1st:

mir and mir_2_15 currently fail on master, for different reasons.

Fix these builds, to unblock Mir-based compositors (Miriway & miracle-wm) and the Lomiri DE.

2nd:

Additionally, Alacritty, when launched in the VM tests, complains about the YAML config format:

machine # [   24.987840] miriway[1098]: [0.004055543s] [WARN ] [alacritty] YAML config "/etc/xdg/alacritty/alacritty.yml" is deprecated, please migrate to TOML using `alacritty migrate`

A lib.generators.toTOML was rejected in the past, so switch to pkgs.formats.yaml. For consistency, switch the INI file generation to pkgs.formats.ini as well.

3rd:

OfBorg fails to run the VM tests. Try some things to hopefully resolve this.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added the 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS label Jan 18, 2025
@OPNA2608 OPNA2608 force-pushed the fix/mir-compositor-test-file-generators branch from 7a8d381 to f4f726d Compare January 18, 2025 19:40
@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Jan 18, 2025
@lucasew
Copy link
Contributor

lucasew commented Jan 19, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 374873

@OPNA2608
Copy link
Contributor Author

@lucasew nixpkgs-review doesn't run VM tests, so that isn't useful here. Please build nixosTests.miracle-wm and nixosTests.miriway if you want to give a meaningful review of this PR.

@lucasew
Copy link
Contributor

lucasew commented Jan 19, 2025

@lucasew nixpkgs-review doesn't run VM tests, so that isn't useful here. Please build nixosTests.miracle-wm and nixosTests.miriway if you want to give a meaningful review of this PR.

That's what I did
Screenshot_20250119-092511

@OPNA2608 OPNA2608 force-pushed the fix/mir-compositor-test-file-generators branch from 5700556 to b303af9 Compare January 19, 2025 14:48
@github-actions github-actions bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. and removed 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Jan 19, 2025
@nix-owners nix-owners bot requested a review from onny January 19, 2025 14:56
@OPNA2608 OPNA2608 changed the title tests/{miriway,miracle-wm}: Update alacritty config format, switch to pkgs.formats tests/{miriway,miracle-wm}: Update alacritty config format, switch to pkgs.formats, fix tests Jan 19, 2025
@OPNA2608 OPNA2608 mentioned this pull request Jan 19, 2025
13 tasks
@OPNA2608 OPNA2608 force-pushed the fix/mir-compositor-test-file-generators branch from b303af9 to 15e3e66 Compare January 19, 2025 15:18
@OPNA2608 OPNA2608 changed the title tests/{miriway,miracle-wm}: Update alacritty config format, switch to pkgs.formats, fix tests mir,mir_2_15: Fix builds, modernise & fix VM tests Jan 19, 2025
@OPNA2608
Copy link
Contributor Author

OPNA2608 commented Jan 19, 2025

That's what I did

Then I would've expected your nixpkgs-review results to actually state that, like it does for me. Or at least a note stating that you did run them, in case your nixpkgs-review - for whatever reason - doesn't state it.


nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 374873


x86_64-linux

✅ 2 tests built:
  • nixosTests.miracle-wm
  • nixosTests.miriway

And while this output claims that the tests built successfully, they actually both failed… In a way that looks like something broke somewhere else. 😕

[nix-shell:~/.cache/nixpkgs-review/pr-374873-2]$ ls failed_results/
nixosTests.miracle-wm-x86_64-linux  nixosTests.miriway-x86_64-linux
machine: making screenshot /nix/store/8pip6l7j10wji50id560r3d7birf3ziw-vm-test-run-miriway/miriway_launched.png
(finished: making screenshot /nix/store/8pip6l7j10wji50id560r3d7birf3ziw-vm-test-run-miriway/miriway_launched.png, in 0.05 seconds)
machine: waiting for (alice|machine) to appear on screen
cleanup
kill machine (pid 9)
qemu-system-x86_64: terminating on signal 15 from pid 6 (/nix/store/qrc496n6fsqp4p5m5h8wmw5d5jwyw5mr-python3-3.12.8/bin/python3.12)
kill vlan (pid 7)
(finished: cleanup, in 0.01 seconds)
Traceback (most recent call last):
  File "/nix/store/n127kkw8piavf8095wjc6xnr8pc0y61y-nixos-test-driver-1.1/bin/.nixos-test-driver-wrapped", line 9, in <module>
    sys.exit(main())
             ^^^^^^
  File "/nix/store/n127kkw8piavf8095wjc6xnr8pc0y61y-nixos-test-driver-1.1/lib/python3.12/site-packages/test_driver/__init__.py", line 146, in main
    driver.run_tests()
  File "/nix/store/n127kkw8piavf8095wjc6xnr8pc0y61y-nixos-test-driver-1.1/lib/python3.12/site-packages/test_driver/driver.py", line 174, in run_tests
    self.test_script()
  File "/nix/store/n127kkw8piavf8095wjc6xnr8pc0y61y-nixos-test-driver-1.1/lib/python3.12/site-packages/test_driver/driver.py", line 166, in test_script
    exec(self.tests, symbols, None)
  File "<string>", line 12, in <module>
  File "/nix/store/n127kkw8piavf8095wjc6xnr8pc0y61y-nixos-test-driver-1.1/lib/python3.12/site-packages/test_driver/machine.py", line 999, in wait_for_text
    retry(screen_matches, timeout)
  File "/nix/store/n127kkw8piavf8095wjc6xnr8pc0y61y-nixos-test-driver-1.1/lib/python3.12/site-packages/test_driver/machine.py", line 130, in retry
    if fn(False):
       ^^^^^^^^^
  File "/nix/store/n127kkw8piavf8095wjc6xnr8pc0y61y-nixos-test-driver-1.1/lib/python3.12/site-packages/test_driver/machine.py", line 988, in screen_matches
    variants = self.get_screen_text_variants()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/n127kkw8piavf8095wjc6xnr8pc0y61y-nixos-test-driver-1.1/lib/python3.12/site-packages/test_driver/machine.py", line 963, in get_screen_text_variants
    return self._get_screen_text_variants([0, 1, 2])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/n127kkw8piavf8095wjc6xnr8pc0y61y-nixos-test-driver-1.1/lib/python3.12/site-packages/test_driver/machine.py", line 949, in _get_screen_text_variants
    return _perform_ocr_on_screenshot(screenshot_path, model_ids)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/n127kkw8piavf8095wjc6xnr8pc0y61y-nixos-test-driver-1.1/lib/python3.12/site-packages/test_driver/machine.py", line 111, in _perform_ocr_on_screenshot
    raise Exception(f"TIFF conversion failed with exit code {ret.returncode}")
Exception: TIFF conversion failed with exit code 1

Edit: Issue should be fixed now (#375091), but still dumb that this is treated as a success in the review.

@OPNA2608 OPNA2608 force-pushed the fix/mir-compositor-test-file-generators branch from 15e3e66 to 65d97c7 Compare January 19, 2025 18:15
glog pkg-config file disappeared after NixOS#364543.

- mir doesn't depend on it anymore
- mir_2_15 did, and re-enabling the pkg-config file for the new glog version errored out

Upstream decided to just drop glog as a dependency, so follow suit.
@OPNA2608 OPNA2608 force-pushed the fix/mir-compositor-test-file-generators branch from 65d97c7 to 3c0a99e Compare January 20, 2025 20:41
@OPNA2608
Copy link
Contributor Author

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 374873


x86_64-linux

❌ 2 packages failed to build:
  • lomiri.lomiri
  • lomiri.lomiri-session
✅ 8 packages built:
  • lomiri.qtmir
  • lomiri.qtmir.dev
  • mir
  • mir.dev
  • mir_2_15
  • mir_2_15.dev
  • miracle-wm
  • miriway

lomiri.lomiri has dependencies that are FTBFS on master, lomiri.lomiri-session depends on lomiri.lomiri. Going ahead with merging this already, since it's blocking running reviews for most Lomiri packages.

@OPNA2608 OPNA2608 merged commit 14b04af into NixOS:master Jan 21, 2025
23 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants