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

test-nightly-coverage failures #135

Closed
4 tasks
ancazamfir opened this issue Jul 8, 2020 · 5 comments · Fixed by #161
Closed
4 tasks

test-nightly-coverage failures #135

ancazamfir opened this issue Jul 8, 2020 · 5 comments · Fixed by #161
Assignees
Labels
A: bug Admin: something isn't working O: tests Objective: Test more aspect of the relayer
Milestone

Comments

@ancazamfir
Copy link
Collaborator

Summary of Bug

test-nightly-coverage failures on master:
https://github.com/informalsystems/ibc-rs/pull/133/checks?check_run_id=848143851
also:
https://github.com/informalsystems/ibc-rs/pull/132/checks?check_run_id=847236945


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@andynog
Copy link
Contributor

andynog commented Jul 8, 2020

Done some investigation on this

There are a couple of PRs in ibc-rs repo that failed because the tests could not run on Rust nightly (https://github.com/informalsystems/ibc-rs/pull/133/checks?check_run_id=848143851). Basically it tries to run on nightly cargo test --all-features --no-fail-fast and it fails with a bunch of mismatched types that looks like are a dependency path mismatch

error[E0308]: mismatched types
##[error]  --> modules/src/ics02_client/query.rs:94:13
   |
94 |             response.proof,
   |             ^^^^^^^^^^^^^^ expected struct `tendermint::merkle::proof::Proof`, found a different struct `tendermint::merkle::proof::Proof`
   |
   = note: expected enum `std::option::Option<tendermint::merkle::proof::Proof>` (struct `tendermint::merkle::proof::Proof`)
              found enum `std::option::Option<tendermint::merkle::proof::Proof>` (struct `tendermint::merkle::proof::Proof`)
   = note: perhaps two different versions of crate `tendermint` are being used?

the funny thing is that if you run against Rust stable the tests run fine. Tested on my machine too, did a cargo clean, removed Cargo.lock but same thing. So does anyone know if there’s any breaking changes on nighthly that is making the references on current tendermint-rs be treated differently between stable and nightly.

@andynog
Copy link
Contributor

andynog commented Jul 8, 2020

as per xla suggestion will run cargo tree to find if there are differences between nightly and stable

@andynog
Copy link
Contributor

andynog commented Jul 8, 2020

so, running cargo tree | grep tendermint on Rust nightly this is the output

│   ├── tendermint v0.14.1 (https://github.com/informalsystems/tendermint-rs.git?branch=master#142796b0)
│   ├── tendermint-rpc v0.14.0 (https://github.com/informalsystems/tendermint-rs.git#142796b0)
│   │   ├── tendermint v0.14.1 (https://github.com/informalsystems/tendermint-rs.git#142796b0)
├── tendermint v0.14.1 (https://github.com/informalsystems/tendermint-rs.git?branch=master#142796b0) (*)
├── tendermint-rpc v0.14.0 (https://github.com/informalsystems/tendermint-rs.git#142796b0) (*)
├── tendermint v0.14.1 (https://github.com/informalsystems/tendermint-rs.git?branch=master#142796b0) (*)

running the same command against stable the output is 'almost' the same. Notice the references to tendermint don't include the branch parameter. Also the third line in the one below has an (*) which shows when a reference has already been shown. But the one above it doesn't because I believe the branch parameter is making it think it's different (even though the package name is the same and version is the same). So not sure what is happening but it seems something around the way dependencies are checked in Rust between nightly and stable might have changed ?

│   ├── tendermint v0.14.1 (https://github.com/informalsystems/tendermint-rs.git#142796b0)
│   ├── tendermint-rpc v0.14.0 (https://github.com/informalsystems/tendermint-rs.git#142796b0)
│   │   ├── tendermint v0.14.1 (https://github.com/informalsystems/tendermint-rs.git#142796b0) (*)
├── tendermint v0.14.1 (https://github.com/informalsystems/tendermint-rs.git#142796b0) (*)
├── tendermint-rpc v0.14.0 (https://github.com/informalsystems/tendermint-rs.git#142796b0) (*)
├── tendermint v0.14.1 (https://github.com/informalsystems/tendermint-rs.git#142796b0) (*)

@andynog andynog added the A: bug Admin: something isn't working label Jul 8, 2020
@andynog
Copy link
Contributor

andynog commented Jul 8, 2020

More information. Noticed that the tendermint package gets duplicated in the Cargo.lock in nightly. And the source differs (one has master branch in the path)

[[package]]
name = "tendermint"
version = "0.14.1"
source = "git+https://github.com/informalsystems/tendermint-rs.git?branch=master#142796b0cc37319f91af55cf2703b96a0cb80230"
[[package]]
name = "tendermint"
version = "0.14.1"
source = "git+https://github.com/informalsystems/tendermint-rs.git#142796b0cc37319f91af55cf2703b96a0cb80230"

if I switch back to stable rustup default stable then and keep the Cargo.lock file I get an error

error: failed to parse lock file at: /dev/github.com/informalsystems/ibc-rs/Cargo.lock

Caused by:
  package `tendermint` is specified twice in the lockfile

So not sure why the tendermint package reference gets duplicated in nightly.

@andynog
Copy link
Contributor

andynog commented Jul 10, 2020

Just did a bit more testing on this and I think there might be something that has changed on nightly that is breaking this build. So another test I've made was test against beta rustup default beta and there are no errors. I suspect that this might be a bug in nightly for the fact that as I mentioned above that if you switch to nightly then back to stable or beta and try a cargo build it gives that message that the tendermint is specified twice in the Cargo.lock.

So my suggestion is that instead of running tests in nightly in the CI/CD we test against beta which is a channel that doesn't have big breaking changes or bugs. So we can get the merges passing the CI/CD and unblock the PRs.

@adizere adizere mentioned this issue Jul 20, 2020
6 tasks
@greg-szabo greg-szabo mentioned this issue Jul 20, 2020
6 tasks
@adizere adizere added the O: tests Objective: Test more aspect of the relayer label Jul 21, 2020
@adizere adizere added this to the v0.0.2 milestone Jul 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: bug Admin: something isn't working O: tests Objective: Test more aspect of the relayer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants