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

Fix workspace crates tests not being run #2396

Merged
merged 4 commits into from
Feb 14, 2024

Conversation

Urgau
Copy link
Member

@Urgau Urgau commented Jan 24, 2024

Fixes #2391

@github-actions github-actions bot added the S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed label Jan 24, 2024
@Urgau Urgau force-pushed the fix-workspace-ci-tests branch 2 times, most recently from 4b26a64 to 6eb0503 Compare January 24, 2024 15:16
@Urgau Urgau changed the title Fix workspace CI tests Fix workspace crates tests not being run Jan 24, 2024
@Urgau Urgau marked this pull request as ready for review January 24, 2024 15:25
@Urgau Urgau requested a review from a team as a code owner January 24, 2024 15:25
@Urgau
Copy link
Member Author

Urgau commented Jan 24, 2024

@Nemo157 This PR fixes the tests of the metadata and font-awesome-as-a-crate crates, it build them on CI and adds them to the CI cache (so that they can be run on the other jobs).

I saw that the CI jobs were run on my fork as well so as bonus I also restricted CI to only run on the master branch (when pushing)

Copy link
Member

@syphar syphar left a comment

Choose a reason for hiding this comment

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

thank you for working on this fix!
I have one question about the branch limitation.

Apart from that I'm actually not sure about the caching feature in general any more (which I added, so that's on me). It definitely improves CI times, but also it lead to us silently not running a part of the tests. And relying on test binary naming feels volatile at the least.

we could try to just use Swatinem/rust-cache in all jobs, and not share any binaries between the jobs. What do you think?

@syphar
Copy link
Member

syphar commented Jan 28, 2024

Also mentioned in the issue is that doctests aren't run, which in my mind is another reason to drop the artifact caching we are using and accept slower CI times before we have to rely on more cargo internals to keep the cache working.

@Urgau
Copy link
Member Author

Urgau commented Jan 28, 2024

Apart from that I'm actually not sure about the caching feature in general any more (which I added, so that's on me). It definitely improves CI times, but also it lead to us silently not running a part of the tests. And relying on test binary naming feels volatile at the least

Yeah, relying on test binary names is not great. I tried using cargo --message-format but this felt overkill.

we could try to just use Swatinem/rust-cache in all jobs, and not share any binaries between the jobs. What do you think?

Yes, that would be great. I can try to do it, but won't have time to do it until a few days.
Maybe we can merge this PR in the mean time and follow-up with this bigger refactor.

@syphar
Copy link
Member

syphar commented Jan 31, 2024

Apart from that I'm actually not sure about the caching feature in general any more (which I added, so that's on me). It definitely improves CI times, but also it lead to us silently not running a part of the tests. And relying on test binary naming feels volatile at the least

Yeah, relying on test binary names is not great. I tried using cargo --message-format but this felt overkill.

we could try to just use Swatinem/rust-cache in all jobs, and not share any binaries between the jobs. What do you think?

Yes, that would be great. I can try to do it, but won't have time to do it until a few days. Maybe we can merge this PR in the mean time and follow-up with this bigger refactor.

This was broken for a long time, so having it broken for a little longer is not a big issue IMO.
So IMO we should directly do the refactor (or rather, simplification, refactor sounds so huge 😄 ).

@syphar syphar added S-waiting-on-author Status: This PR is incomplete or needs to address review comments and removed S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed labels Jan 31, 2024
@syphar
Copy link
Member

syphar commented Jan 31, 2024

last week I also started doing this (dropping the binary caching), though I didn't dig through the remaining test failures yet:

@Urgau Urgau force-pushed the fix-workspace-ci-tests branch from e13ab2c to ab2fce9 Compare February 1, 2024 20:34
@Urgau Urgau force-pushed the fix-workspace-ci-tests branch 4 times, most recently from aef5680 to 88050fa Compare February 1, 2024 21:20
@Urgau Urgau force-pushed the fix-workspace-ci-tests branch from 88050fa to 23aa737 Compare February 1, 2024 21:32
@Urgau
Copy link
Member Author

Urgau commented Feb 1, 2024

I've updated the PR to remove the custom CI binary caching. I've consolidated the "build" and "build_test" jobs into a single "test" job. I also contains some tests fixes, but I did not fixed the ignored test since none are worth it, they mainly serve as copy/paste examples.

Let me if would like anything else.

@rustbot label -S-waiting-on-author +S-waiting-on-review

@rustbot rustbot added S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed and removed S-waiting-on-author Status: This PR is incomplete or needs to address review comments labels Feb 1, 2024
@Nemo157
Copy link
Member

Nemo157 commented Feb 6, 2024

#[ignored] is really used as a way to categorize long-duration build-tests that we don't want to run locally normally, but they should be run in CI.

@Urgau
Copy link
Member Author

Urgau commented Feb 7, 2024

#[ignored] is really used as a way to categorize long-duration build-tests that we don't want to run locally normally, but they should be run in CI.

Oops, forgot this. Fixed.

Note: CI failure is I believe transient (nope: it's been happening for at least 4 days): "not enough disk space"

@Urgau
Copy link
Member Author

Urgau commented Feb 10, 2024

@Nemo157 @syphar What do you think about the latest changes? Can we move forward?

Copy link
Member

@syphar syphar left a comment

Choose a reason for hiding this comment

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

Sorry for the delay, vacation came in between.

Thank you for the contribution!

@syphar syphar merged commit ccb17c0 into rust-lang:master Feb 14, 2024
7 of 8 checks passed
@github-actions github-actions bot added S-waiting-on-deploy This PR is ready to be merged, but is waiting for an admin to have time to deploy it and removed S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed labels Feb 14, 2024
@syphar syphar removed the S-waiting-on-deploy This PR is ready to be merged, but is waiting for an admin to have time to deploy it label Feb 14, 2024
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.

Sub-crates and doc tests aren't run in CI
4 participants