Shopify / Shopify/shadowenv

tests fail randomly in nix

Open
#134 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
458
Forks
22
PR merge metrics
No merged PRs in 30d

Description

these tests fail randomly so hydra eventually manages to build shadowenv, but this should really pass first try

❯ nix-build -A shadowenv
error: builder for '/nix/store/a340k0chdxzmlaf996rr1mldb128ibqk-shadowenv-3.0.3.drv' failed with exit code 101;
       last 25 log lines:
       > called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }
       > note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
       >
       > ---- loader::tests::find_shadowenv_paths_using_relative_paths stdout ----
       > thread 'loader::tests::find_shadowenv_paths_using_relative_paths' panicked at src/loader.rs:104:51:
       > called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }
       >
       > ---- loader::tests::find_shadowenv_paths_success stdout ----
       > thread 'loader::tests::find_shadowenv_paths_success' panicked at src/loader.rs:104:51:
       > called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }
       >
       > ---- loader::tests::find_shadowenv_paths_nonexistant_link_target stdout ----
       > thread 'loader::tests::find_shadowenv_paths_nonexistant_link_target' panicked at src/loader.rs:104:51:
       > called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }
       >
       >
       > failures:
       >     loader::tests::find_shadowenv_paths_nonexistant_link_target
       >     loader::tests::find_shadowenv_paths_not_a_symlink
       >     loader::tests::find_shadowenv_paths_success
       >     loader::tests::find_shadowenv_paths_using_relative_paths
       >
       > test result: FAILED(B. 22 passed; 4 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.06s
       >
       > error: test failed, to rerun pass `--bin shadowenv`
       For full logs, run 'nix log /nix/store/a340k0chdxzmlaf996rr1mldb128ibqk-shadowenv-3.0.3.drv'.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running nix-build -A shadowenv and inspect src/loader.rs:104, where the reported unwrap failures occur. Focus on the four failing loader::tests::find_shadowenv_paths_* tests and determine why they intermittently encounter a missing path. Done means the tests pass reliably and the Nix build succeeds on the first try.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.