action #157273
Updated by okurz 8 months ago
## Motivation
With #154783 we have proper git caching so we can run git based tests efficiently on our workers now. Now we should go the next step and migrate one "production" test distribution to use only git and not hold anything provided by admins on o3 in o3:/var/lib/openqa/share/tests for this test distribution. To try that out we can develop a spike solution.
## Acceptance criteria
* **AC1:** /var/lib/openqa/share/tests/open{qa,QA} /var/lib/openqa/share/tests/ do not exist
* **AC2:** openqa-in-openqa tests still pass consistently
* **AC3:** openqa-in-openqa test details, needle candidates and source code views still show content as expected
## Suggestions
* Change test definitions in https://github.com/os-autoinst/os-autoinst-distri-openQA/blob/master/scenario-definitions.yaml in your branch to use https://github.com/os-autoinst/os-autoinst-distri-openQA for test code (and needles)
* Check that tests can be triggered this way on a test instance
* Do not put anything in /var/lib/openqa/share/tests and ensure tests still work as well as source code view and needle candidates in test details pages
* To provide needle candidates there are multiple possibilities when and where the needle candidate data can be provided, try out one or multiple of the following:
1. *Given* a test distribution/needledir does not yet exist in a local cache (like asset downloads work or GIT_CACHE_DIR in os-autoinst and/or worker implementation), *When* tests are triggered on the side of web UI, *Then* the relevant data is git cloned, e.g. in the same steps as or similar to *_URL asset download
2. *Given* a test distribution/needledir does not yet exist in a local cache, *When* the worker uploads the general test structure, e.g. which modules will be executed, *Then* the relevant data is git cloned
3. *Given* a test distribution/needledir does not yet exist in a local cache, *When* the worker uploads individual needle check results, *Then* it also uploads as part of the JSON result files and image uploads all the necessary information to display needle candidates *And* the webUI in the receiving upload handler handles that somewhat … but does not overload when 1k workers upload in parallel or something :)
4. *Given* a test distribution/needledir does not yet exist in a local cache, *When* the worker uploads final results (or "finalizes" the job), *Then* the webUI triggers a download of test files and/or needle files to a local git cache dir as necessary
5. *Given* a test distribution/needledir does not yet exist in a local cache, *When* the first person reviews test results and selects needle candidates, *Then* the webUI triggers a download of test files and/or needle files to a local git cache dir as necessary
* If you identify any bigger feature implementation in openQA or os-autoinst itself being necessary then ensure those requirements are covered in other tickets and block on those tickets accordingly
## Out of scope
* Any bigger feature implementation in openQA or os-autoinst itself.
Back