-
Notifications
You must be signed in to change notification settings - Fork 856
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
Improve verify_clean_boot() #5671
Conversation
Also verify that cloud-init status has a valid return code.
16209fa
to
ddc279e
Compare
Also verify that cloud-init status has a valid return code.
ddc279e
to
a844aac
Compare
a844aac
to
2eb927a
Compare
2eb927a
to
2f8a218
Compare
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.
One inline call needs to be updated along with a future suggestion, but otherwise LGTM.
@@ -70,16 +71,20 @@ def test_clean_log(self, class_client: IntegrationInstance): | |||
version_boundary = get_feature_flag_value( | |||
class_client, "DEPRECATION_INFO_BOUNDARY" | |||
) | |||
boundary_message = "Deprecated cloud-config provided:" |
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.
This feels overly cumbersome for the caller and feels slightly worse than what we had before. Ideally, we'd have some function like verify_schema_deprecations(version="22.2", messages=[...])
. That could probably be folded into verify_clean_boot()
, but it makes more sense as a separate function to me. I don't think it's a blocker for this PR, but I think there's still more work that can be done here.
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.
Agreed. This pattern repeats itself a couple of times in tests and I'd love to make testing this easier.
That could probably be folded into verify_clean_boot(), but it makes more sense as a separate function to me.
+1 - Trying to pack that functionality into verify_clean_boot()
's signature would make the signature too messy and take on more scope than I'd like it to. In cases like this it would be cleaner / simpler to verify_clean_boot(ignore_deprecations=True)
and then use a helper like you suggest.
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.
I don't think it's a blocker for this PR, but I think there's still more work that can be done here.
Agreed, this is is a rough edge that I'd love to make more ergonomic. I might try to tackle that in a follow-up PR sometime soon.
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.
LGTM!
51554c4
to
75e9ecf
Compare
Also verify that cloud-init status has a valid return code.
Additional Context
See commit messages for details.
verify_clean_boot()
cloud-init status
return codeAlso add
verify_clean_boot()
alongside eachverify_clean_log()
call.Test Steps
Merge type