action #108530
closedcoordination #154777: [saga][epic] Shareable os-autoinst and test distribution plugins
coordination #108527: [epic] os-autoinst wheels for scalable code reuse of helper functions and segmented test distributions
os-autoinst wheels: x11_start_program from os-autoinst-distri-openQA dynamically loaded from another git repo size:M
Description
Acceptance criteria¶
- AC1: x11_start_program does not exist anymore in https://github.com/os-autoinst/os-autoinst-distri-openQA/blob/master/lib/susedistribution.pm
- AC2: The equivalent functionality is loaded from another git repository on github
Suggestions¶
- Create a local folder having perl modules, e.g. x11_start_program from https://github.com/os-autoinst/os-autoinst-distri-openQA/blob/master/lib/susedistribution.pm#L8 without the actual needle and leave it to the test distribution to provide it.
- Start with a local git repository, e.g. file://…
- Afterwards provide in github repo
- Provide the example as part of os-autoinst-distri-openQA, e.g. if a YAML file plugins.yaml exists next to a main.pm load all plugins from there
- Provide the os-autoinst code to git clone and load the above plugins.yaml (similar to how OpenQA/Isotovideo/Utils.pm loads main.pm)
- Use from test code like we already use stuff from "lib", e.g. with prefix "OpenQA:Plugin:…"
Out of scope¶
- Needles
- Additional helper tool
Updated by livdywan over 2 years ago
- Status changed from Workable to In Progress
- Assignee set to livdywan
Let's see what I can do here
Updated by livdywan over 2 years ago
Here's what I have so far:
- os-autoinst-wheel-launcher is a wheel. I don't currently have the priviledges to add this to os-autoinst in case we want that.
- os-autoinst/os-autoinst#2004 teaches isotovideo to grab wheels if they're being used.
- os-autoinst/os-autoinst-distri-openQA#82 makes use of the new wheel
I adjusted the code to not refer to x11 since there's no x11 involved and also to use %args the way we usually do in test functions.
Note that both "plugins" and "wheels" are being used. Feel free to let it sink in and make a case for one or the other.
Updated by okurz over 2 years ago
I think it looks awesome. My suggestions on the global scale:
- Follow https://metacpan.org/pod/Perl::Critic::Policy::NamingConventions::Capitalization, so OpenQA::Wheel::Launcher, not OpenQA::Wheel::launcher
- It's crucial that we provide self-tests for wheels. So how aobut a simple Test::Most test case in https://github.com/kalikiana/os-autoinst-wheel-launcher which mocks everything outside the repo
Updated by openqa_review over 2 years ago
- Due date set to 2022-04-12
Setting due date based on mean cycle time of SUSE QE Tools
Updated by kraih over 2 years ago
okurz wrote:
- Follow https://metacpan.org/pod/Perl::Critic::Policy::NamingConventions::Capitalization, so OpenQA::Wheel::Launcher, not OpenQA::Wheel::launcher
- It's crucial that we provide self-tests for wheels. So how aobut a simple Test::Most test case in https://github.com/kalikiana/os-autoinst-wheel-launcher which mocks everything outside the repo
+1 for both. And then run the tests in a GitHub Action.
Updated by kraih over 2 years ago
The our @EXPORT = qw(start_gui_program);
in the wheel repo is a bad idea though, it should be our @EXPORT_OK = qw(start_gui_program);
. Because if all wheels are using default exports it will be very very hard to keep track of which function comes from which wheel.
Updated by livdywan over 2 years ago
Points discussed in the unblock:
- Add v: v0.1 to the
wheels.yaml
(we want this to be a string to avoid running into funny behavior once we get to e.g. v0.10) - Stick to the term wheels because both modules and plugins already have other meanings in openQA
- May want needles and metadata in wheels in the future but those don't need to be specified now
Updated by livdywan over 2 years ago
- Apparmor needs to expose podman: https://github.com/os-autoinst/openQA/pull/4606 (Error documented as part of #109235)
Updated by livdywan over 2 years ago
- Due date changed from 2022-04-12 to 2022-04-15
Also, I approached myself with the scrum master hat on wondering if the ticket should be resolved now. Apparently I didn't realize the overlap with my trainings going on this week. So I suggest I aim to wrap this up this week, and find out by tomorrow if I need any help.
Updated by okurz over 2 years ago
- Due date changed from 2022-04-15 to 2022-04-26
If there would be more people available right now I would ask for someone else to help you. Let's look into this after the Easter Break. If done after that, good, if not we can reconsider priorities and doing a mob session.
Updated by livdywan over 2 years ago
okurz wrote:
If there would be more people available right now I would ask for someone else to help you. Let's look into this after the Easter Break. If done after that, good, if not we can reconsider priorities and doing a mob session.
Turns out the mocking is proving to be challenging. After several attemps I moved the relevant unit tests into another PR. Maybe it's worth looking at #81899 in this context?
Updated by okurz over 2 years ago
- Due date deleted (
2022-04-26) - Status changed from In Progress to Blocked
Hi, I agree. So let's pick up #81899 first (effectively I already started with that).
Updated by okurz over 2 years ago
- Related to action #81899: Move code from isotovideo to a module size:M added
Updated by livdywan over 2 years ago
- Status changed from Blocked to In Progress
We re-considered whether this has to block on refactoring and decided to instead keep the new wheel-related code out of the isotovideo
script and use fake git repos created on the fly if mocking can't be used.
Updated by openqa_review about 2 years ago
- Due date set to 2022-07-26
Setting due date based on mean cycle time of SUSE QE Tools
Updated by okurz about 2 years ago
https://github.com/os-autoinst/os-autoinst/pull/2004 merged. You can now continue with https://github.com/kalikiana/os-autoinst-wheel-launcher and https://github.com/os-autoinst/os-autoinst-distri-openQA/pull/82 I guess?
Updated by okurz about 2 years ago
- Related to coordination #109740: [epic] Stable os-autoinst unit tests with good coverage added
Updated by livdywan about 2 years ago
okurz wrote:
https://github.com/os-autoinst/os-autoinst/pull/2004 merged. You can now continue with https://github.com/kalikiana/os-autoinst-wheel-launcher and https://github.com/os-autoinst/os-autoinst-distri-openQA/pull/82 I guess?
Next one up is picking up wheel "lib" folders and "tests" folders. I found a way to cover it without having to run tests by relying on the fact that Perl executes the wheel code via use
even when evaluating just the test schedule. This is also why I'm including support for picking up tests now because it turns out it's easier to unit test both.
I also need to find out how to create a wheel repo in https://github.com/orgs/os-autoinst so we don't need to rely on a personal repo of mine for that. Probably need to find someone with sufficient permissions.
Updated by livdywan about 2 years ago
- Due date changed from 2022-07-26 to 2022-07-29
Facing some issues with codecov. Tina offered to have a look to help decide how we can best deal with it.
In the meanwhile I also tried to complete the self-tests for the wheel, but for now I can't continue with that since they will only be done once there's a working container image with the above code in it.
Updated by okurz about 2 years ago
- Due date changed from 2022-07-29 to 2022-08-12
As discussed in weekly we raise priority to make sure we not drag this on too long.
Updated by livdywan about 2 years ago
cdywan wrote:
Next one up is picking up wheel "lib" folders and "tests" folders.
The branch was merged. I'm now checking that a new container is built since the self-tests use devel/openqa/containers/isotovideo:qemu-x86
. Also seeing if it's easy enough to publish that as a re-usable action to avoid having to copy this in the future (but that's not required and won't block this ticket)
Updated by livdywan about 2 years ago
cdywan wrote:
cdywan wrote:
Next one up is picking up wheel "lib" folders and "tests" folders.
The branch was merged. I'm now checking that a new container is built since the self-tests use
devel/openqa/containers/isotovideo:qemu-x86
. Also seeing if it's easy enough to publish that as a re-usable action to avoid having to copy this in the future (but that's not required and won't block this ticket)
Brief update, it didn't seem like the container was updated and I confirmed it wasn't with the latest build still being from 14-Jul-2022 14:48. I couldn't find a way to re-trigger so I toggled x86-64 which seems to work, or at least OBS said it's "recomputing".
Updated by livdywan about 2 years ago
- Copied to action #114914: Container devel/openqa/containers/isotovideo:qemu-x86 is outdated added
Updated by livdywan about 2 years ago
cdywan wrote:
[...] Also seeing if it's easy enough to publish that as a re-usable action to avoid having to copy this in the future (but that's not required and won't block this ticket)
https://github.com/kalikiana/isotovideo-action
After a bit of reading I found a way to leverage native docker support so the most simple case becomes - uses: actions/isotovideo-action@main
.
Updated by livdywan about 2 years ago
Verification run: https://openqa.opensuse.org/tests/2494129
Updated by livdywan about 2 years ago
- Status changed from In Progress to Feedback
Updated by okurz about 2 years ago
https://github.com/os-autoinst/os-autoinst-distri-openQA/pull/82 merged. I see AC2 as covered, AC1 still open, see https://github.com/os-autoinst/os-autoinst-distri-openQA/blob/master/lib/susedistribution.pm
Updated by livdywan about 2 years ago
okurz wrote:
https://github.com/os-autoinst/os-autoinst-distri-openQA/pull/82 merged. I see AC2 as covered, AC1 still open, see https://github.com/os-autoinst/os-autoinst-distri-openQA/blob/master/lib/susedistribution.pm
https://github.com/os-autoinst/os-autoinst-distri-openQA/pull/96
Updated by okurz about 2 years ago
merged. Please put a comment into the parent epic about what you think is the conclusion of this ticket and next steps and then resolve
Updated by livdywan about 2 years ago
- Subject changed from os-autoinst plugins: x11_start_program from os-autoinst-distri-openQA dynamically loaded from another git repo size:M to os-autoinst wheels: x11_start_program from os-autoinst-distri-openQA dynamically loaded from another git repo size:M
- Status changed from Feedback to Resolved