-
Notifications
You must be signed in to change notification settings - Fork 650
Skip running a job if the crate/version deleted #11500
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
base: main
Are you sure you want to change the base?
Skip running a job if the crate/version deleted #11500
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice work! could you try to write a few regression tests for this too? idk if that is viable for the RenderAndUploadReadme
job, but for the other two I think this should be possible.
)) | ||
| Err(diesel::result::Error::NotFound) => { | ||
warn!( | ||
"Skipping rendering README for vesion {}: no version found", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Skipping rendering README for vesion {}: no version found", | |
"Skipping rendering README for version {}: no version found", |
.., | ||
)) = res | ||
{ | ||
warn!("Skipping update default version for crate for {crate_id}: no crate found",); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warn!("Skipping update default version for crate for {crate_id}: no crate found",); | |
warn!("Skipping update default version for crate for {crate_id}: no crate found"); |
let publish_details = PublishDetails::for_version(version_id, &mut conn).await?; | ||
let Some(publish_details) = PublishDetails::for_version(version_id, &mut conn).await? | ||
else { | ||
warn!("Skipping publish notifications for {version_id}: no version found",); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warn!("Skipping publish notifications for {version_id}: no version found",); | |
warn!("Skipping publish notifications for {version_id}: no version found"); |
Fixes #11348.
After diffing in I found only 3 jobs that can fail because of deleted data. The rest should be fine.