Project

General

Profile

Actions

action #162647

closed

coordination #58184: [saga][epic][use case] full version control awareness within openQA

coordination #94750: [epic] Support needles from git-cloned or separate repo if casedir points to a git-repo

coordination #33745: [epic] Improve handling of external Git repositories (for needles)

Ensure the developer mode and its feature to reload newly created needles work when NEEDLES_DIR is a Git source

Added by mkittler 6 months ago. Updated 6 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Feature requests
Target version:
Start date:
2024-06-20
Due date:
% Done:

0%

Estimated time:

Description

EDIT: This ticket was resolved with the result that this use case already works (see #162647#note-3).

Motivation

I am not aware that this has ever been tested. So we should do that as it is going to be important for the overall Git support.

Acceptance criteria

  • AC1: The developer mode and its feature to reload newly created needles work when NEEDLES_DIR is a Git source. So when the test is paused due to a needle mismatch and one creates a new needle via the needle editor and then continues the test the new needle is considered.

Suggestions

  • Try out the re-needling workflow on a test that sets NEEDLES_DIR to a Git source.
  • Extend unit/integration tests of the developer mode (if it is worth the effort).
  • Change the needle download mechanism in os-autoinst and/or openQA to make it work as necessary.
Actions #1

Updated by okurz 6 months ago

  • Target version set to Ready
Actions #2

Updated by mkittler 6 months ago

  • Status changed from New to In Progress
  • Assignee set to mkittler
Actions #3

Updated by mkittler 6 months ago ยท Edited

  • Description updated (diff)
  • Status changed from In Progress to Resolved

Looks like this works just fine. I scheduled an example test requiring a new needle via script/openqa-cli schedule --host http://localhost:9526 --monitor --param-file SCENARIO_DEFINITIONS_YAML=/hdd/openqa-devel/openqa/share/tests/example/scenario-definitions.yaml DISTRI=example VERSION=0 FLAVOR=DVD ARCH=x86_64 TEST=simple_boot BUILD=test-poo-162647 _GROUP_ID=0 CASEDIR=https://github.com/Martchus/os-autoinst-distri-example.git#test-poo-162647 NEEDLES_DIR=%%CASEDIR%%/needles PAUSE_AT=boot.

In my setup this meant the effective needles directory used during the test ended up being /hdd/openqa-devel/openqa/pool/1/os-autoinst-distri-example/needles (via symlink /hdd/openqa-devel/openqa/pool/1/needles). The needle editor created the needle in /hdd/openqa-devel/openqa/share/tests/example/needles. That is of course a different directory but it still worked because when resuming the test the new needle was copied over to the needles directory used by the test. So the mechanism we already have to make things work when the worker is running on a different host also makes things work when the needle directory is just under a different location (like a Git checkout).

When I think about it, I was actually already using this in production when re-needling openQA-in-openQA tests after the Bootstrap 5 migration (because jobs like https://openqa.opensuse.org/tests/4289389#settings already specify the NEEDLES_DIR as Git source). This also covers the case when we have a distinct needles repository. (In the test mentioned in the previous paragraph I was covering the case when needles are part of the tests repo. For the underlying code this makes no difference anyway, though.)

We already have unit tests for the needle downloader (in os-autoinst) which should be sufficient as the whole mechanism is very agnostic to Git. It'll always work as long as NEEDLES_DIR is eventually resolved to a local directory before the tests starts and that's always necessary anyway.

Actions #4

Updated by okurz 6 months ago

nice!

Actions

Also available in: Atom PDF