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-common build failing due to progenitor #6691

Closed
andrewjstone opened this issue Sep 26, 2024 · 2 comments
Closed

omicron-common build failing due to progenitor #6691

andrewjstone opened this issue Sep 26, 2024 · 2 comments
Labels
Test Flake Tests that work. Wait, no. Actually yes. Hang on. Something is broken.

Comments

@andrewjstone
Copy link
Contributor

This test failed on a CI run on PR 6627:

https://github.com/oxidecomputer/omicron/pull/6627/checks?check_run_id=30724571747

Log showing the specific test failure:

https://buildomat.eng.oxide.computer/wg/0/details/01J8QTXEKYHDTSC2PS5YDMWH7B/Ra9quBteBhYAU4Tw0nSESE13oY66SWXrBsXWi16NR51Rr0Ln/01J8QTY5VJR24TTB74FDW587WS#S629

Excerpt from the log showing the failure:


628 | 2024-09-26T18:57:24.588Z | Checking mg-admin-client v0.1.0 (https://github.com/oxidecomputer/maghemite?rev=9e0fe45ca3862176dc31ad8cc83f605f8a7e1a42#9e0fe45c)
-- | -- | --
629 | 2024-09-26T18:57:25.419Z | error[E0277]: `?` couldn't convert the error to `progenitor::progenitor_client::Error<types::Error>`
630 | 2024-09-26T18:57:25.420Z | --> /home/build/.cargo/git/checkouts/maghemite-de41bdd6c14939ab/9e0fe45/mg-admin-client/src/lib.rs:19:1
631 | 2024-09-26T18:57:25.420Z | \|
632 | 2024-09-26T18:57:25.420Z | 19 \| );
633 | 2024-09-26T18:57:25.420Z | \| ^ the trait `From<reqwest::Error>` is not implemented for `progenitor::progenitor_client::Error<types::Error>`, which is required by `Result<ResponseValue<std::vec::Vec<BfdPeerInfo>>, progenitor::progenitor_client::Error<types::Error>>: FromResidual<Result<Infallible, reqwest::Error>>`
634 | 2024-09-26T18:57:25.420Z | \|
635 | 2024-09-26T18:57:25.420Z | = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
636 | 2024-09-26T18:57:25.420Z | = help: the following other types implement trait `From<T>`:
637 | 2024-09-26T18:57:25.420Z | <progenitor::progenitor_client::Error<E> as From<http::header::value::InvalidHeaderValue>>
638 | 2024-09-26T18:57:25.420Z | <progenitor::progenitor_client::Error<E> as From<reqwest::error::Error>>
639 | 2024-09-26T18:57:25.420Z | = note: required for `Result<ResponseValue<std::vec::Vec<BfdPeerInfo>>, progenitor::progenitor_client::Error<types::Error>>` to implement `FromResidual<Result<Infallible, reqwest::Error>>`
640 | 2024-09-26T18:57:25.420Z | = note: this error originates in the macro `progenitor::generate_api` (in Nightly builds, run with -Z macro-backtrace for more info)
641 | 2024-09-26T18:57:25.420Z |  
642 | 2024-09-26T18:57:25.451Z | error[E0308]: mismatched types
643 | 2024-09-26T18:57:25.451Z | --> /home/build/.cargo/git/checkouts/maghemite-de41bdd6c14939ab/9e0fe45/mg-admin-client/src/lib.rs:5:1
644 | 2024-09-26T18:57:25.451Z | \|
645 | 2024-09-26T18:57:25.451Z | 5  \| / progenitor::generate_api!(
646 | 2024-09-26T18:57:25.451Z | 6  \| \|     spec = "../openapi/mg-admin.json",
647 | 2024-09-26T18:57:25.451Z | 7  \| \|     inner_type = slog::Logger,
648 | 2024-09-26T18:57:25.451Z | 8  \| \|     pre_hook = (\|log: &slog::Logger, request: &reqwest::Request\| {
649 | 2024-09-26T18:57:25.452Z | ...  \|
650 | 2024-09-26T18:57:25.452Z | 18 \| \|     derives = [schemars::JsonSchema],
651 | 2024-09-26T18:57:25.452Z | 19 \| \| );
652 | 2024-09-26T18:57:25.452Z | \| \| ^
653 | 2024-09-26T18:57:25.452Z | \| \| \|
654 | 2024-09-26T18:57:25.452Z | \| \|_expected `Response`, found a different `Response`
655 | 2024-09-26T18:57:25.452Z | \|   arguments to this function are incorrect
656 | 2024-09-26T18:57:25.452Z | \|
657 | 2024-09-26T18:57:25.452Z | = note: `Response` and `Response` have similar names, but are actually distinct types
658 | 2024-09-26T18:57:25.452Z | note: `Response` is defined in crate `reqwest`
659 | 2024-09-26T18:57:25.452Z | --> /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/reqwest-0.11.27/src/async_impl/response.rs:25:1
660 | 2024-09-26T18:57:25.452Z | \|
661 | 2024-09-26T18:57:25.452Z | 25 \| pub struct Response {
662 | 2024-09-26T18:57:25.452Z | \| ^^^^^^^^^^^^^^^^^^^
663 | 2024-09-26T18:57:25.452Z | note: `Response` is defined in crate `reqwest`
664 | 2024-09-26T18:57:25.452Z | --> /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/reqwest-0.12.7/src/async_impl/response.rs:29:1
665 | 2024-09-26T18:57:25.452Z | \|
666 | 2024-09-26T18:57:25.452Z | 29 \| pub struct Response {
667 | 2024-09-26T18:57:25.452Z | \| ^^^^^^^^^^^^^^^^^^^
668 | 2024-09-26T18:57:25.452Z | = note: perhaps two different versions of crate `reqwest` are being used?
669 | 2024-09-26T18:57:25.452Z | note: associated function defined here
670 | 2024-09-26T18:57:25.452Z | --> /home/build/.cargo/git/checkouts/progenitor-639bd64206ac5e43/1a30d67/progenitor-client/src/progenitor_client.rs:66:18
671 | 2024-09-26T18:57:25.452Z | \|
672 | 2024-09-26T18:57:25.452Z | 66 \|     pub async fn from_response<E: std::fmt::Debug>(
673 | 2024-09-26T18:57:25.453Z | \|                  ^^^^^^^^^^^^^
674 | 2024-09-26T18:57:25.453Z | = note: this error originates in the macro `progenitor::generate_api` (in Nightly builds, run with -Z macro-backtrace for more info)
675 | 2024-09-26T18:57:25.453Z |  
676 | 2024-09-26T18:57:25.458Z | error[E0308]: mismatched types
677 | 2024-09-26T18:57:25.458Z | --> /home/build/.cargo/git/checkouts/maghemite-de41bdd6c14939ab/9e0fe45/mg-admin-client/src/lib.rs:5:1
678 | 2024-09-26T18:57:25.458Z | \|
679 | 2024-09-26T18:57:25.458Z | 5   \| / progenitor::generate_api!(
680 | 2024-09-26T18:57:25.458Z | 6   \| \|     spec = "../openapi/mg-admin.json",
681 | 2024-09-26T18:57:25.458Z | 7   \| \|     inner_type = slog::Logger,
682 | 2024-09-26T18:57:25.458Z | 8   \| \|     pre_hook = (\|log: &slog::Logger, request: &reqwest::Request\| {
683 | 2024-09-26T18:57:25.458Z | ...   \|
684 | 2024-09-26T18:57:25.458Z | 18  \| \|     derives = [schemars::JsonSchema],
685 | 2024-09-26T18:57:25.458Z | 19  \| \| );
686 | 2024-09-26T18:57:25.458Z | \| \| ^
687 | 2024-09-26T18:57:25.458Z | \| \| \|
688 | 2024-09-26T18:57:25.458Z | \| \|_expected `Response`, found a different `Response`
689 | 2024-09-26T18:57:25.458Z | \|   arguments to this enum variant are incorrect
690 | 2024-09-26T18:57:25.458Z | \|
691 | 2024-09-26T18:57:25.458Z | = note: `Response` and `Response` have similar names, but are actually distinct types
692 | 2024-09-26T18:57:25.458Z | note: `Response` is defined in crate `reqwest`
693 | 2024-09-26T18:57:25.458Z | --> /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/reqwest-0.11.27/src/async_impl/response.rs:25:1
694 | 2024-09-26T18:57:25.458Z | \|
695 | 2024-09-26T18:57:25.463Z | 25  \| pub struct Response {
696 | 2024-09-26T18:57:25.463Z | \| ^^^^^^^^^^^^^^^^^^^
697 | 2024-09-26T18:57:25.463Z | note: `Response` is defined in crate `reqwest`
698 | 2024-09-26T18:57:25.463Z | --> /home/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/reqwest-0.12.7/src/async_impl/response.rs:29:1
699 | 2024-09-26T18:57:25.463Z | \|
700 | 2024-09-26T18:57:25.463Z | 29  \| pub struct Response {
701 | 2024-09-26T18:57:25.463Z | \| ^^^^^^^^^^^^^^^^^^^
702 | 2024-09-26T18:57:25.463Z | = note: perhaps two different versions of crate `reqwest` are being used?
703 | 2024-09-26T18:57:25.463Z | note: tuple variant defined here
704 | 2024-09-26T18:57:25.463Z | --> /home/build/.cargo/git/checkouts/progenitor-639bd64206ac5e43/1a30d67/progenitor-client/src/progenitor_client.rs:257:5
705 | 2024-09-26T18:57:25.463Z | \|
706 | 2024-09-26T18:57:25.463Z | 257 \|     UnexpectedResponse(reqwest::Response),
707 | 2024-09-26T18:57:25.463Z | \|     ^^^^^^^^^^^^^^^^^^
708 | 2024-09-26T18:57:25.463Z | = note: this error originates in the macro `progenitor::generate_api` (in Nightly builds, run with -Z macro-backtrace for more info)
709 | 2024-09-26T18:57:25.463Z |  
710 | 2024-09-26T18:57:25.466Z | error[E0277]: `?` couldn't convert the error to `progenitor::progenitor_client::Error<types::Error>`
711 | 2024-09-26T18:57:25.466Z | --> /home/build/.cargo/git/checkouts/maghemite-de41bdd6c14939ab/9e0fe45/mg-admin-client/src/lib.rs:19:1
712 | 2024-09-26T18:57:25.466Z | \|
713 | 2024-09-26T18:57:25.466Z | 19 \| );
...
@andrewjstone andrewjstone added the Test Flake Tests that work. Wait, no. Actually yes. Hang on. Something is broken. label Sep 26, 2024
@iliana iliana pinned this issue Sep 26, 2024
@andrewjstone
Copy link
Contributor Author

For some reason the omicron-common build ignores Cargo.lock, and so can be broken by branch commits in Cargo.toml for deps.

iximeow added a commit that referenced this issue Sep 26, 2024
"fixes" #6691 by stealing
the checked-in Cargo.lock when building the standalone `omicron-common`
crate created for this job. this lets us keep the specific refs of git
dependencies that are `ref="main"` and similar, which might otherwise
resolve to different commits than the rest of the tree (and its
`omicron-common`) can actually build with.

it'd be nice to have fewer git dependencies using branch names for refs,
either by using a cratesio crate or specific commit or _something_, but
this seems to make things a bit less brittle in the mean time.
@iliana
Copy link
Contributor

iliana commented Sep 27, 2024

This was resolved by #6692.

@iliana iliana closed this as completed Sep 27, 2024
@iliana iliana unpinned this issue Oct 4, 2024
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

No branches or pull requests

2 participants