-
Notifications
You must be signed in to change notification settings - Fork 144
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
Allow dynamic plugin data classes & convert feature plugins #3424
Conversation
6b6e9ff
to
0f30185
Compare
0f30185
to
32740ee
Compare
32740ee
to
bd6a595
Compare
Tested locally with WIP feature plugin buildroot https://gitlab.cee.redhat.com/baseos-qe/tmt/-/merge_requests/106 and it successfully detects it (verified in output of |
bd6a595
to
b317c8a
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.
LGTM^^
Plugins' `_data_class` is no longer the source of plugins' data classes. Instead, new `get_data_class()` method is added (see [1]). `_data_class` is not gone, it serves as the default for `get_data_class()`, but plugins now can provide their own implementation. Which is exactly what `prepare/feature` and feature plugins do now, the plugin builds its data class from collected smaller data classes, one for each feature plugin. There are some loose ends, namely type annorations, but the code works, both in runtime and when rendering docs. [1] a `data_class` property would be nice, but the attribute must be a class-level attribute and those cannot be properties.
b317c8a
to
6b213af
Compare
@psss https://artifacts.osci.redhat.com/testing-farm/1f44fca6-1bba-4f99-b60e-ec6444f2a4ac/work-bootcjx6em3nm/plans/provision/bootc/execute/data/guest/default-0/tests/provision/bootc-1/output.txt looks like a "bug" in @henrywang @ckyrouac ^^ any ideas? |
Yeah, looks like that. But I just tested locally with fresh images and everything just works nice. Which is weird. |
Anyway, this is definitely no related to this change. Merging. |
This This's fedora-bootc base image issue, not bootc plugin issue. |
Plugins'
_data_class
is no longer the source of plugins' data classes. Instead, newget_data_class()
method is added (see [1])._data_class
is not gone, it serves as the default forget_data_class()
, but plugins now can provide their own implementation.Which is exactly what
prepare/feature
and feature plugins do now, the plugin builds its data class from collected smaller data classes, one for each feature plugin.There are some loose ends, namely type annorations, but the code works, both in runtime and when rendering docs.
[1] a
data_class
property would be nice, but the attribute must be a class-level attribute and those cannot be properties.Pull Request Checklist