Skip to content
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

omicron-ls-apis::test_dependencies fails outside of CI #6839

Open
iliana opened this issue Oct 11, 2024 · 2 comments · May be fixed by #6840
Open

omicron-ls-apis::test_dependencies fails outside of CI #6839

iliana opened this issue Oct 11, 2024 · 2 comments · May be fixed by #6840
Labels
Test Flake Tests that work. Wait, no. Actually yes. Hang on. Something is broken.

Comments

@iliana
Copy link
Contributor

iliana commented Oct 11, 2024

@andrewjstone reported the following issue with the new test added in #6831 which I can trivially reproduce:

$ cargo nextest run -p omicron-ls-apis
info: experimental features enabled: setup-scripts
    Finished `test` profile [unoptimized + debuginfo] target(s) in 1.03s
------------
 Nextest run ID 4e62629e-50cf-41fd-98eb-f159421dac1b with nextest profile: default
    Starting 1 test across 3 binaries
     Running [ 00:00:03] [                                                                                            ] 0/1: 1 running, 0 passed, 0 skipped
        FAIL [   4.367s] omicron-ls-apis::test_dependencies test_api_dependencies

--- STDOUT:              omicron-ls-apis::test_dependencies test_api_dependencies ---

running 1 test
test test_api_dependencies ... FAILED

failures:

failures:
    test_api_dependencies

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 4.34s


--- STDERR:              omicron-ls-apis::test_dependencies test_api_dependencies ---
thread 'test_api_dependencies' panicked at dev-tools/ls-apis/tests/test_dependencies.rs:25:5:
assertion `left == right` failed: stderr:
loading metadata for workspace omicron from current workspace
loading metadata for workspace crucible from /home/iliana/.cargo/git/checkouts/crucible-f3b5bdecdc6486d6/2b88ab8/Cargo.toml
loading metadata for workspace maghemite from /home/iliana/.cargo/git/checkouts/maghemite-de41bdd6c14939ab/056283e/Cargo.toml
loading metadata for workspace propolis from /home/iliana/.cargo/git/checkouts/propolis-12517f89d3d9f483/11371b0/Cargo.toml
Error: loading metadata

Caused by:
    `cargo metadata` exited with an error:     Blocking waiting for file lock on package cache
        Updating git repository `https://github.com/oxidecomputer/dendrite`
    error: failed to get `common` as a dependency of package `ddm v0.1.0 (/home/iliana/.cargo/git/checkouts/maghemite-de41bdd6c14939ab/056283e/ddm)`

    Caused by:
      failed to load source for dependency `common`

    Caused by:
      Unable to update https://github.com/oxidecomputer/dendrite?branch=main#4cdc7d7e

    Caused by:
      failed to fetch into: /home/iliana/.cargo/git/db/dendrite-627b239a911c6241

    Caused by:
      failed to authenticate when downloading repository

      * attempted to find username/password via git's `credential.helper` support, but failed

      if the git CLI succeeds then `net.git-fetch-with-cli` may help here
      https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli

    Caused by:
      failed to acquire username/password from local configuration


  left: 1
 right: 0
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

   Canceling due to test failure
------------
     Summary [   4.369s] 1 test run: 0 passed, 1 failed, 0 skipped
        FAIL [   4.367s] omicron-ls-apis::test_dependencies test_api_dependencies
error: test run failed

This test works okay if you have your system configured in a particular way (either a GitHub token configured or a way to rewrite the HTTPS URL to an SSH one). This is a new requirement to run tests locally that I'd like to avoid having.

@iliana iliana added the Test Flake Tests that work. Wait, no. Actually yes. Hang on. Something is broken. label Oct 11, 2024
@iliana
Copy link
Contributor Author

iliana commented Oct 11, 2024

Additionally there's a test flake if the Omicron tests take more than an hour to get to cargo xtask ls-apis apis:

https://github.com/oxidecomputer/omicron/runs/31428158524
https://buildomat.eng.oxide.computer/wg/0/details/01J9YK8K5ASNHCKRDKBKD97KFT/DbLBuHhEEklJzGRMi7NxyxdZmoqz8wsZNyoMVGTIZVnvCvch/01J9YK99F56A9R34C76TTFCE0Y#S4415

Same root cause. (Well, sort of, Buildomat's API tokens expire after an hour.)

@iliana
Copy link
Contributor Author

iliana commented Oct 11, 2024

I think I have a decent workaorund for the outside-of-CI issue that I'll get a PR up for soon. The workaround I have planned for the other issue is to move the separate cargo xtask ls-apis calls to a different Buildomat job.

@iliana iliana linked a pull request Oct 12, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Test Flake Tests that work. Wait, no. Actually yes. Hang on. Something is broken.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant