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

Ensure cargo tarpaulin is using same Rust version as Akri #501

Closed
kate-goldenring opened this issue Aug 18, 2022 · 4 comments · Fixed by #503
Closed

Ensure cargo tarpaulin is using same Rust version as Akri #501

kate-goldenring opened this issue Aug 18, 2022 · 4 comments · Fixed by #503
Assignees
Labels
bug Something isn't working

Comments

@kate-goldenring
Copy link
Contributor

Describe the bug
Akri's code coverage checks with cargo tarpaulin are currently failing because cargo tarpaulin is using the 1.63 rust toolchain while Akri is using 1.61.

cargo tarpaulin should be inferring Rust version from the Cargo.toml. However, instead of checking each package's Cargo.toml (see the agent's) and installing and using a potentially different toolchain for each, it may just be checking the base Cargo.toml. However, since our base toml represents the larger workspace of projects, it cannot specify a version, so it appears that tarpaulin just uses latest stable in this case.

Investigation should be done as to whether the CARGO_PACKAGE_VERSION env var can be explicitly set to a specific rust version in the workflow when running tarpaulin in a container.

@adithyaj
Copy link
Collaborator

I'll take this one, I'll try to see if we can set the env var itself and worst case we can update rust and move forward for now.

@bfjelds
Copy link
Collaborator

bfjelds commented Aug 30, 2022

i wonder if you couldn't do something like this:

docker exec $(cat container_id.txt) sh -c "rustup install 1.61.0"
docker exec $(cat container_id.txt) sh -c "rustup override set 1.61.0"

@bfjelds
Copy link
Collaborator

bfjelds commented Aug 30, 2022

i wonder if you couldn't do something like this:

docker exec $(cat container_id.txt) sh -c "rustup install 1.61.0"
docker exec $(cat container_id.txt) sh -c "rustup override set 1.61.0"

seems to work. i created this PR: #503 ... when i cherry-picked the changes onto #498, the tarpaulin run succeeded: https://github.com/project-akri/akri/runs/8102394108?check_suite_focus=true

@kate-goldenring kate-goldenring linked a pull request Aug 31, 2022 that will close this issue
9 tasks
@adithyaj
Copy link
Collaborator

adithyaj commented Sep 2, 2022

Thanks Brian!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants