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

Categorize container creation failure and other docker errors #760

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

Skgland
Copy link
Contributor

@Skgland Skgland commented Dec 28, 2024

See #700 (comment) for some context

Most of the changes here are due to rustwide switching from failure to anyhow and as such this swicthes crater to anyhow as well.

@Skgland Skgland force-pushed the categorize-container-creation-failure branch 2 times, most recently from 728335d to 88cc188 Compare December 28, 2024 16:21
Copy link
Member

@pietroalbini pietroalbini 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! Just a minor nit.

@@ -13,6 +13,7 @@ impl ResultName for FailureReason {
FailureReason::Unknown => "failed (unknown)".into(),
FailureReason::Timeout => "timed out".into(),
FailureReason::NetworkAccess => "network access".into(),
FailureReason::Docker => "docker".into(),
Copy link
Member

Choose a reason for hiding this comment

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

Nit: can we have a slightly better message here? This would result in "build docker" as the outcome, which is puzzling. Would be better to have "failed (docker error)" as the message here, to have "build failed (docker error)" as the outcome.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That makes sense similar to unknown is failed (unknown) rather than just unknown

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I have pushed a commit fixing this.

Skgland added a commit to Skgland/crater that referenced this pull request Dec 30, 2024
@Skgland Skgland requested a review from pietroalbini December 30, 2024 17:02
@pietroalbini pietroalbini added this pull request to the merge queue Dec 30, 2024
@pietroalbini
Copy link
Member

Thanks! ❤️

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 30, 2024
@pietroalbini
Copy link
Member

CI seems to have failed.

@Skgland
Copy link
Contributor Author

Skgland commented Dec 31, 2024

CI seems to have failed.

Yeah, I noticed the PR being auto-removed from the merge queue. I will look into why those Minicrater tests are failing.

@Skgland Skgland force-pushed the categorize-container-creation-failure branch from e224ce0 to a0f9b71 Compare December 31, 2024 14:28
@Skgland Skgland force-pushed the categorize-container-creation-failure branch from a0f9b71 to 9b2abe2 Compare December 31, 2024 14:30
@Skgland
Copy link
Contributor Author

Skgland commented Dec 31, 2024

The problem was that anyhows downcast_ref is recursive while failures wasn't.
With failure we would find the FailureReason first as its the outer most context, but with anyhow we would find CommandError first as it is the first type we check.
I have fixed this assuming we never want to override a FailureReason with a CommandError.

@Skgland Skgland requested a review from pietroalbini December 31, 2024 14:47
@Skgland
Copy link
Contributor Author

Skgland commented Dec 31, 2024

My local minicrater test run finished just now and it looks like my changes only fixes minicrater::clippy_small the other minicrater test minicrater::multi_thread_full, minicrater::single_thread_full
and minicrater::single_thread_missing_repo still fail.

@Skgland Skgland force-pushed the categorize-container-creation-failure branch from a1c5cdd to 8b03dc9 Compare January 1, 2025 19:27
@Skgland
Copy link
Contributor Author

Skgland commented Jan 1, 2025

I found the problem (another difference in behaviour between anyhow and failure) and the local minicrater run now passes.

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.

2 participants