Skip to content

Reorder CI, make it fail fast #2138

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

Closed
wants to merge 1 commit into from
Closed

Conversation

blyxyas
Copy link
Member

@blyxyas blyxyas commented Aug 7, 2025

The test suite takes about 1m 42 seconds to run, while cargo fmt --check takes less than a second. This PR reorders them

@Urgau
Copy link
Member

Urgau commented Aug 7, 2025

I would actually prefer if both always ran (similar to the tidy job on rust-lang/rust).

As it's otherwise quite annoying to see CI fail for formatting reason and then wait again for actual tests fail. Better I think to show both failure at once.

Maybe we can add if: '!cancelled()' to the formatting step so it's always run.

@Kobzol
Copy link
Member

Kobzol commented Aug 7, 2025

IMO it makes more sense to run the easiest to fix (and run) things last. You don't want to get a formatting failure from CI if there is also a test failure.

@Urgau
Copy link
Member

Urgau commented Aug 8, 2025

IMO it makes more sense to run the easiest to fix (and run) things last.

No opinion on the ordering of the steps. I having both errors at "the same time" is still nice IMO.

@blyxyas
Copy link
Member Author

blyxyas commented Aug 8, 2025

The idea behind contribution is that opening a PR and having an immediate CI error gives the contributor feedback quicker, gives them the opportunity to fix it right there and then, and making them more vigilant for the next commit.

Also, saving CI time.

But yeah, having both run at the same time is quite nice, and seeing the reasonable feedback, I'll change the PR.

@Kobzol
Copy link
Member

Kobzol commented Aug 8, 2025

I think that the more important thing is to take a look at which CI steps fail more often, and how they affect one another. If you have both a formatting and a test fail, you always want to fix the test first, because that will also require another reformat. Fixing a formatting fail just to push and see a test failure is a waste of time. In general, formatting is always the last thing that you want to do, so it should also run last on CI, IMO. Most people also have autoformatting in their IDE, so it rarely fails, and thus should run towards the end of the CI job.

But for triagebot specifically, I don't think it really matters, so I will stop discussing this, as it's just bikeshedding and a waste of time, IMO :) Feel free to merge if you want.

@blyxyas
Copy link
Member Author

blyxyas commented Aug 11, 2025

Closing this being that it's too controversial for a 2 line change. More trouble than worth

@blyxyas blyxyas closed this Aug 11, 2025
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.

3 participants