Project

General

Profile

Actions

action #108530

closed

coordination #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

Added by okurz about 2 years ago. Updated almost 2 years ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
Feature requests
Target version:
Start date:
2022-03-17
Due date:
% Done:

0%

Estimated time:

Description

Acceptance criteria

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

Related issues 3 (0 open3 closed)

Related to openQA Project - action #81899: Move code from isotovideo to a module size:MResolvedlivdywan2021-01-08

Actions
Related to openQA Project - coordination #109740: [epic] Stable os-autoinst unit tests with good coverageResolvedokurz2021-06-30

Actions
Copied to openQA Infrastructure - action #114914: Container devel/openqa/containers/isotovideo:qemu-x86 is outdatedRejectedokurz2022-03-17

Actions
Actions #1

Updated by livdywan about 2 years ago

  • Status changed from Workable to In Progress
  • Assignee set to livdywan

Let's see what I can do here

Actions #2

Updated by livdywan about 2 years ago

Here's what I have so far:

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.

Actions #3

Updated by okurz about 2 years ago

I think it looks awesome. My suggestions on the global scale:

  1. Follow https://metacpan.org/pod/Perl::Critic::Policy::NamingConventions::Capitalization, so OpenQA::Wheel::Launcher, not OpenQA::Wheel::launcher
  2. 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
Actions #4

Updated by openqa_review about 2 years ago

  • Due date set to 2022-04-12

Setting due date based on mean cycle time of SUSE QE Tools

Actions #5

Updated by kraih about 2 years ago

okurz wrote:

  1. Follow https://metacpan.org/pod/Perl::Critic::Policy::NamingConventions::Capitalization, so OpenQA::Wheel::Launcher, not OpenQA::Wheel::launcher
  2. 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.

Actions #6

Updated by kraih about 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.

Actions #7

Updated by livdywan about 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
Actions #8

Updated by livdywan about 2 years ago

Actions #9

Updated by livdywan about 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.

Actions #10

Updated by okurz about 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.

Actions #11

Updated by livdywan about 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?

Actions #12

Updated by okurz about 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).

Actions #13

Updated by okurz about 2 years ago

  • Related to action #81899: Move code from isotovideo to a module size:M added
Actions #14

Updated by livdywan almost 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.

Actions #15

Updated by openqa_review almost 2 years ago

  • Due date set to 2022-07-26

Setting due date based on mean cycle time of SUSE QE Tools

Actions #17

Updated by okurz almost 2 years ago

Actions #18

Updated by livdywan almost 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.

Actions #19

Updated by livdywan almost 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.

Actions #20

Updated by okurz almost 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.

Actions #21

Updated by okurz almost 2 years ago

  • Priority changed from Normal to High
Actions #22

Updated by livdywan almost 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)

Actions #23

Updated by livdywan almost 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".

Actions #24

Updated by livdywan almost 2 years ago

  • Copied to action #114914: Container devel/openqa/containers/isotovideo:qemu-x86 is outdated added
Actions #25

Updated by livdywan almost 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.

Actions #27

Updated by livdywan almost 2 years ago

  • Status changed from In Progress to Feedback
Actions #30

Updated by okurz almost 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

Actions #31

Updated by livdywan almost 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
Actions #32

Updated by okurz almost 2 years ago

  • Due date deleted (2022-08-12)
Actions

Also available in: Atom PDF