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: Correct dependencies and build checks #484

Merged
merged 9 commits into from
Nov 14, 2022
Merged

fix: Correct dependencies and build checks #484

merged 9 commits into from
Nov 14, 2022

Conversation

flub
Copy link
Contributor

@flub flub commented Nov 10, 2022

Fixes some CI commands to check all code by enabling all features and
checking more parts of the code.

As a result fixes the dependencies of the uds-gateway feature and
switches it from the deprecated tempdir to tempfile.

Makes the version spec of tempfile consistent between all the
workspace crates.

Fixes a clippy warning about cloning a bool, which is Copy.

Finally a few extra changes in ci.yml which the linter was complaining
about.

Fixes some CI commands to check all code by enabling all features and
checking more parts of the code.

As a result fixes the dependencies of the uds-gateway feature and
switches it from the deprecated tempdir to tempfile.

Makes the version spec of tempfile consistent between all the
workspace crates.

Fixes a clippy warning about cloning a bool, which is Copy.

Finally a few extra changes in ci.yml which the linter was complaining
about.
@flub flub requested a review from Arqu November 10, 2022 12:26
with:
command: test
args: --all -j 4
args: -j 4 --workspace --all-features --examples --benches --bins
Copy link
Contributor Author

Choose a reason for hiding this comment

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

is -j 4 really needed though? I think cargo automatically figures out the number of cpu's and uses that. Or is the intention to use more parallelism then there are CPUs?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Heh, welcome to the world of CI runners :) If you want to help things along it might make sense to drop down to -j 2 for a moment.

The reasoning is that most of these (esp. GHA runners) OOM very easily if you hit the tests/builds hard. Hence manually limiting to 4 and now potentially even lower for windows builds.

This should all go away once we move to our infra.

@Arqu
Copy link
Collaborator

Arqu commented Nov 10, 2022

Very sad CI 😭

@flub
Copy link
Contributor Author

flub commented Nov 10, 2022

Very sad CI sob

Much more sad than I was expecting!

@flub
Copy link
Contributor Author

flub commented Nov 10, 2022

need to double-check the tempdir change. i believe the previous one might have been a named temporary directory and the current one might not be

@Arqu
Copy link
Collaborator

Arqu commented Nov 11, 2022

More sad CI since rebase :/

@flub
Copy link
Contributor Author

flub commented Nov 11, 2022

More sad CI since rebase :/

another victim of not testing with --all-features in CI. is a bug in a previous PR

@flub
Copy link
Contributor Author

flub commented Nov 11, 2022

need to double-check the tempdir change. i believe the previous one might have been a named temporary directory and the current one might not be

had another look and i think they are the same so this is good.

@flub
Copy link
Contributor Author

flub commented Nov 11, 2022

@Arqu PTAL, I believe this is should now all work and is complete.

@@ -135,7 +137,7 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: check
args: --all --bins --tests --examples
args: --workspace --all-features --bins --tests --examples --benches
Copy link
Contributor

Choose a reason for hiding this comment

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

why having --all-features is good to test against, we also need to have tests (or at least build checks) for each individual feature, to make sure they work by themselves and with no features enabled at all

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, that's true. I was trying to take small steps.

Given how difficult it was to get this to be happy in CI I'd prefer to do that as a followup since it already fixes some things on main and would stop regressions to that instead of having to keep playing catchup with main while working on this - as already happened.

Copy link
Contributor

Choose a reason for hiding this comment

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

this was not meant to add more work to this pr, just a reminder for all of us that it needs more work 😅

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Collaborator

@Arqu Arqu left a comment

Choose a reason for hiding this comment

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

🚀

@flub flub merged commit 7e9cdc3 into main Nov 14, 2022
@b5 b5 deleted the flub/lost-tempdir branch November 14, 2022 13:44
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.

4 participants