-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
qr-backup: init at 1.1.4 #392426
base: master
Are you sure you want to change the base?
qr-backup: init at 1.1.4 #392426
Conversation
@za3k Any idea what might cause every other test to fail consistently? Output[...] correct-restore --instructions both 4s backup-regression --instructions cover 1s command: /nix/store/riyz1x9z6mxdrkf3qxdbg3x9gha271k3-qr-backup-1.1.4/bin/qr-backup --skip-checks - --backup-date 2022-09-22 --instructions cover result: 792e4a1704c3d36edc8ce2b96d9e17003a2b23feafb612a5ebd1c68ebbf61a1f != 4757a096d77b5c1cc0774f69577d1365d35d3113115901bbddf63d61411c3ed9 correct-restore --instructions cover 4s backup-regression --instructions none 1s command: /nix/store/riyz1x9z6mxdrkf3qxdbg3x9gha271k3-qr-backup-1.1.4/bin/qr-backup --skip-checks - --backup-date 2022-09-22 --instructions none result: c952c9fb7fc3fd4876ab9dc4e67848867e94fcb3ebe57942039b4d2bf00fb8bc != 361e065a0addbe02a11385a8bb9510940e6d09cae6f0482223ca2f08013a1d00 correct-restore --instructions none 3s backup-regression --note (1) 1s command: /nix/store/riyz1x9z6mxdrkf3qxdbg3x9gha271k3-qr-backup-1.1.4/bin/qr-backup --skip-checks - --backup-date 2022-09-22 --note A result: fed91611f9dac0d50faa33b0fec76d517f876a0618a08a2b9e58bf04e3a7345c != 49191147dbbe7d9a411567b54f74f86b235f387c8c4a28fe68dbcb86dc310fca correct-restore --note (1) 3s backup-regression --note (2) 1s command: /nix/store/riyz1x9z6mxdrkf3qxdbg3x9gha271k3-qr-backup-1.1.4/bin/qr-backup --skip-checks - --backup-date 2022-09-22 --note A --note B result: 80d1bc7418493dced58e19523698ad8d98a18f48b3bbbdea3618c1de35c02f36 != 1dee193b34d777aa2a20097e3e800f2b4206d73e908168a338baa8011f9b23d6 correct-restore --note (2) 3s backup-regression --num-copies 1s command: /nix/store/riyz1x9z6mxdrkf3qxdbg3x9gha271k3-qr-backup-1.1.4/bin/qr-backup --skip-checks - --backup-date 2022-09-22 --num-copies 3 result: 64918cb781e99364bbb2c8b510bb0649137f41468d093517d6ceb1cb987674a6 != ba5f2936cfe981ffb5fa074f0893f084747527b00b313f0d86a29260b4f02f07 correct-restore --num-copies 3s backup-regression --page 1s command: /nix/store/riyz1x9z6mxdrkf3qxdbg3x9gha271k3-qr-backup-1.1.4/bin/qr-backup --skip-checks - --backup-date 2022-09-22 --page 100 200 result: b351bac4ac779fa1f29acd0e7f2ba1ab5c34732ff55ef16e2dded67f635b3fa5 != 551cfb9c092bd3c837f0cbf7fb14c7321dfcf5f0d7cb9d12a79e363004be4ce4 correct-restore --page 1s backup-regression --qr-version 1s command: /nix/store/riyz1x9z6mxdrkf3qxdbg3x9gha271k3-qr-backup-1.1.4/bin/qr-backup --skip-checks - --backup-date 2022-09-22 --qr-version 15 result: 2c779ae1d17f86e8eca3a588c752fcfdc015b158656e2229df15e2401090cb7d != eebf76bd76f62d6d0f097417ae8fd95cb10963c5dc71e68d88740420899a3325 correct-restore --qr-version 3s backup-regression --scale 1s command: /nix/store/riyz1x9z6mxdrkf3qxdbg3x9gha271k3-qr-backup-1.1.4/bin/qr-backup --skip-checks - --backup-date 2022-09-22 --scale 10 result: ffb1de2af1d6029f1406725639d473ac0b9bd6fb25dd543bf477d22573aeadf7 != 7c402f001634271bdd04e58b7ebd5bbb71b3d249bc378efa4f5f57bb6d26d8de correct-restore --scale 3s backup-regression --no-shuffle 1s command: /nix/store/riyz1x9z6mxdrkf3qxdbg3x9gha271k3-qr-backup-1.1.4/bin/qr-backup --skip-checks - --backup-date 2022-09-22 --no-shuffle result: 8bdb1e5613fadb295233bea746acdc81cf01dab489eb738ecf1c75cabe8836db != 8ce2b34dc9a57a3fb521bd59ba1f0ec1a7d51f8b67c54fc7ad21eec87454fe0f correct-restore --no-shuffle 3s backup-regression 1K zeros 1s command: /nix/store/riyz1x9z6mxdrkf3qxdbg3x9gha271k3-qr-backup-1.1.4/bin/qr-backup --skip-checks - --backup-date 2022-09-22 result: ff17a9733e63fb225df81965d8baa62c3412636a20809baa677c105bb24addc1 != c952b0a40d1fa655b367b274672e0a9b1d56fc034fc690230a0ad842bc4eef53 correct-restore 1K zeros 3s backup-regression 10K zeros 1s command: /nix/store/riyz1x9z6mxdrkf3qxdbg3x9gha271k3-qr-backup-1.1.4/bin/qr-backup --skip-checks - --backup-date 2022-09-22 result: 720cdb63154857fdd39a6b008c88f6ff329ef42dd9eea026bcf95769e4581432 != 1889f9ad99d9d7df224e3e65283d14602a62b14253bb1adff3c99ae38bc9734b correct-restore 10K zeros 3s backup-regression 100K zeros 1s command: /nix/store/riyz1x9z6mxdrkf3qxdbg3x9gha271k3-qr-backup-1.1.4/bin/qr-backup --skip-checks - --backup-date 2022-09-22 result: 475a13f5f0b2cf4f7ab9b2bbabbd0f8d2a93802da26d191237594117e2da1dbb != 1ddfe806cd82e74c5d5f025aae2ce9f38577c9d9d2347337a75fe274e9477e2b [...] |
Seems like it’s all but one regression test and a couple non-regression tests.
Time to manually inspect how the regression test is failing :/ |
Well, one of the QR codes is obviously different. |
To be honest, I've never quite understood the idea that tests should run on every machine that installs something, rather than only for developers or as a troubleshooting step. I have added a qr-backup issue to have a version of tests that is expected to pass more reliably, for packagers who feel it is necessary to to do this. There is a guide I wrote newly as of yesterday which I believe should be printing in the output of the tests, explaining how to debug exactly this problem. If it's not, I'm confused why not. Can you paste the output of the first two sets of tests (100b zeros, default options)? The error is that yes, the contents of the two QR codes are slightly different. This is fixed in master already (in za3k/qr-backup@8d40ed3) If you would like to work around the issue in v1.1.4 (the next release will include this fix), you can switch qr-backup's shebang line to run with Python 3.10 or later -- the problem is that different Python versions give (slightly) different gzip output. Edit: Alternatively, don't run the tests. They take something like 5 minutes to run, so I'd rather not subject everyone who installs the software to that. |
Running tests on install is fairly uncommon in NixOS, but running tests after building from source is preferred. I don’t believe the tests would run when a typical user installs the package, assuming they haven’t configured their system to build everything from source. It would be trivial to not run the tests, but it makes it a lot easier to approve package updates for Nixpkgs if there was testing in CI on the Nicole’s side as well.
That guide did print; I cut it for brevity; it is very useful and I followed it until realizing the regression tests are far too fragile for Nixpkgs—however, once I stopped focusing on getting it working, I realized they’re not actually useful or necessary here. The regression tests are only useful upstream; they say very little about the correctness of the Nix package. The two failing |
This is what was included in my previous log posted here; are you referring to something different?
|
You can ignore that. I was just trying to figure out why debug instructions weren't being printed (they were). I have added a |
Ah, that would be less janky than my current solution. With the hacky patch, I’m still getting a couple errors on the encrypt tests. I’m not sure why the conversion is failing yet.
|
No problem :) Little point pushing a release just for a feature in tests |
ghostscript is needed by 'convert' and 'zbarimg' to read PDFs. The failing line is not printing the exact command it's running (will fix) but the commands the test actually runs are:
You'll want to replace the bare |
pkgs/by-name/qr/qr-backup/disable-fragile-regression-tests.patch
Outdated
Show resolved
Hide resolved
Hmm, if it’s purely a transitive dependency, it shouldn’t need to be listed in the It seems like
Update: found it; turns out |
Those both work flawlessly when run manually— Nope. |
bash-5.2# /nix/store/z04pv5kb84a3ppb86gx6nq5ighjl76fh-qr-backup-1.1.4/bin/qr-backup --skip-checks <<<'test' --backup-date 2022-09-22 --encrypt PASSWORD
CRITICAL: [gpg stdout] b''
CRITICAL: [gpg stderr] b"gpg: Fatal: can't create directory '/homeless-shelter/.gnupg': No such file or directory\n"
CRITICAL: [gpg exit] 2
bash-5.2# sigh. That’ll do it.
Annnnnd, through the magic of
|
Yeah, but it's a transitive optional dependency, which is non-optional for qr-backup, so it should be listed.
|
Already listed :) |
Fixed now |
In qr-backup, someone kindly donated https://github.com/za3k/qr-backup/blob/master/installers/flake.nix and the lock. Can those be safely deleted now? |
Thank you kindly for all your hard work on this! |
I recommend dropping it once this PR is merged—this PR is unaffected by that, and I don’t know of any reason to keep maintaining the flake upstream. |
This adds qr-backup, a utility to create paper backups of files using QR codes.
Homepage: https://github.com/za3k/qr-backup
License:
CC0-1.0
Currently blocked by upstream issues:ResolvedCloses: gh-343799 ("Package request: qr-backup")
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.