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

doctor: Unbreak spin doctor for Manifest V2 #1927

Merged
merged 1 commit into from
Oct 23, 2023
Merged

Conversation

lann
Copy link
Collaborator

@lann lann commented Oct 23, 2023

This doesn't add any V2 functionality, but prevents spurious errors on valid V2 manifests.

Also simplifies Checkup::for_each_diagnosis into Checkup::next_diagnosis, which is much less finicky and not really any harder to use.

@lann lann requested a review from itowlson October 23, 2023 18:45
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For now this just captures one change to the version diagnosis plus some smoke tests, but I think I'd like to migrate all the tests in this crate to this style.

@@ -1,4 +1,4 @@
spin_manifest_version = 2
spin_manifest_version = 1
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Just the wrong type now.

show_diagnosis(&*diagnosis);
let mut checkup = spin_doctor::Checkup::new(manifest_file)?;
let mut has_problems = false;
while let Some(PatientDiagnosis { diagnosis, patient }) = checkup.next_diagnosis().await? {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Most of the changes below are just reformatting due to un-nesting here.

Copy link
Contributor

@itowlson itowlson left a comment

Choose a reason for hiding this comment

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

anything involving un-nesting is an instant approve

This doesn't add any V2 functionality, but prevents spurious errors on
valid V2 manifests.

Signed-off-by: Lann Martin <lann.martin@fermyon.com>
@lann lann enabled auto-merge October 23, 2023 20:16
@lann lann merged commit e2b4098 into fermyon:main Oct 23, 2023
9 checks passed
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