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

Update cargo-llvm-cov and use rust 1.60.0 for coverage #898

Merged
merged 4 commits into from
May 26, 2022

Conversation

taiki-e
Copy link
Contributor

@taiki-e taiki-e commented May 6, 2022

This should be enough to address #316 (comment).

@taiki-e taiki-e force-pushed the cargo-llvm-cov branch 3 times, most recently from 86700a4 to 39399ef Compare May 6, 2022 19:39
@@ -77,18 +77,16 @@ jobs:
- name: Toolchain setup
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2022-01-14
toolchain: nightly-2022-05-06
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I originally tried to use 1.60.0 here, but ibcontainer enables the unstable feature when coverage is enabled, so I reverted to nightly.

https://github.com/containers/youki/blob/1591680993aa9c63cbc223e111af7c130aa319fe/crates/libcontainer/src/lib.rs#L1

Copy link
Contributor Author

@taiki-e taiki-e May 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After more looking into it, I found that the actual use of no_coverage is only here, and it is no-op (because applied to use statement).

https://github.com/containers/youki/blob/e0843af2032f9e4d8aeefd87f8022feb5394e943/crates/libcontainer/src/syscall/linux.rs#L2-L3

So I believe we can safely remove the use of the unstable feature.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the use of the unstable feature and changed to use rust 1.60.0: a7e800f

@taiki-e taiki-e force-pushed the cargo-llvm-cov branch 2 times, most recently from 5c9d5e6 to a7e800f Compare May 6, 2022 20:14
@taiki-e taiki-e changed the title Update cargo-llvm-cov Update cargo-llvm-cov and use rust 1.60.0 for coverage May 6, 2022
@YJDoc2
Copy link
Collaborator

YJDoc2 commented May 7, 2022

Hey @taiki-e Thanks for your contribution!
This seems fine, but due to the changes in the file structure, and the coverage CI action not getting updated accordingly from us, this does not upload the coverage report to the codecov.

Can I ask you to remove this line in .github/workflows/main.yml?

...
- name: Run Test Coverage for youki
        run: |
          cd ./crates # Please remove this line, as now we need to run this from project root instead of crates/
...

Thanks :)

@YJDoc2
Copy link
Collaborator

YJDoc2 commented May 7, 2022

Unrelated Note (Self) :

Also, test_guid_mapping was running for more than 15 mins, so it was cancelled in Rust 1.59, although ran fine in Rust 1.60. Might be just flaking issue, but needs a look at it.

@taiki-e
Copy link
Contributor Author

taiki-e commented May 8, 2022

@YJDoc2 Thanks for the review! I applied your suggestion.

Signed-off-by: Taiki Endo <te316e89@gmail.com>
Signed-off-by: Taiki Endo <te316e89@gmail.com>
Signed-off-by: Taiki Endo <te316e89@gmail.com>
Signed-off-by: Taiki Endo <te316e89@gmail.com>
@YJDoc2
Copy link
Collaborator

YJDoc2 commented May 24, 2022

Hey, sincere apologies for delay 😓

This looks good to me from CI perspective, @utam0k @Furisto can you once verify that removing the cfg_attr is fine? All tests are passing, so at least it does not create any known bugs.

Again, apologies for the delay 😓

Copy link
Member

@utam0k utam0k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thank you @taiki-e

@Furisto Furisto merged commit f6ef575 into youki-dev:main May 26, 2022
@taiki-e taiki-e deleted the cargo-llvm-cov branch May 27, 2022 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants