action #87755
closedcoordination #99303: [saga][epic] Future improvements for SUSE Maintenance QA workflows with fully automated testing, approval and release
coordination #110016: [epic][teregen] teregen (maintenance test report template generator) improvements
[teregen] Replace productdefs by API call size:M
20%
Description
The problem¶
The product definitions in metadata are not updated in time when a new product shows up which results in templates not being generated properly.
Possible solution¶
As mentioned in https://gitlab.suse.de/qa-maintenance/metadata/-/issues/11 there is a possibility to use REST API from SMELT.
Step 1: Generate productdefs from the data provided by the API
Step 2: Integrate productdefs generator inside template generator
Acceptance criteria¶
- AC1: Readers of the reports generated by teregen are pointed to the according instructions for adding new products to metadata when necessary
Suggestions¶
- Read the proof of concept script from @jbaier_cz https://gitlab.suse.de/qa-maintenance/metadata/-/blob/master/product_definitions/get_products.pl and crosscheck it with https://gitlab.suse.de/qa-maintenance/metadata/-/blob/master/template_generator/productdefs.pm
- Extend https://gitlab.suse.de/qa-maintenance/teregen/-/blob/master/README.md with the manual instructions how to do it in case someone encounters the "product is not known" error message
- Extend the "product is not known" in error message in https://gitlab.suse.de/qa-maintenance/teregen/-/blob/master/app/lib/TeReGen/Model/Plugin/40_TestPlatforms.pm#L95 to point to the according README section
Further details¶
jbaier_cz created a small proof of concept with a simple script. The main issue here would be probably in the data transformation for the corner cases. I am able, quite reliably, fetch information about modules. Basically by invoking ./get_products.pl SLE-Module-Basesystem:15:SP4 I am able to get the same data structure as we have in the metadata. I can't do it for products (not sure why, maybe I am just missing something in the script, or maybe the products API is not searchable by product name) and there are corner cases like SLE-Module-Containers 15-SP4 which is named Containers SLE-15-SP4 in our metadata (for reasons unknown to me, the comment in the code suggests it could be connected to release channels not to be present in such cases, but it also could be some relic of the past and the transformation is no longer needed).
I see two possible approaches here, one is integrating that into template generator; the second would be integrating that into the metadata package (like introducing an automated pipeline for fetching and updating the product definitions in the metadata package). I would probably incline towards the second solution as that will allow to do some phase-out (and optionally still keep the possibility to do manual changes); and if that would work, we can then take it, integrate it as a module into template generator and delete all product definitions from the metadata forever.
Originally proposed acceptance criteria
- AC1: Metadata is generated from current SMELT state on the fly
- AC2: Metadata pipeline is triggered periodically or when data is missing
Out of scope¶
- Automatically check or add stuff: #90917
Updated by jbaier_cz almost 4 years ago
- Target version changed from Ready to future
Updated by jbaier_cz almost 4 years ago
- % Done changed from 0 to 20
The possibility was explored and it is feasible to do that. Small PoC available as https://gitlab.suse.de/qa-maintenance/metadata/-/merge_requests/414
Updated by deneb_alpha over 2 years ago
@okurz hello: is there something we can cooperate on for making it easier to register new products on the test report generator when they are available?
@jbaier_cz mentioned that there are some missing bits for consuming directly the info we already have on SMELT. Please, when/if this issue will be addressed in a sprint, let us know which are the requirements from your side.
Updated by okurz over 2 years ago
- Priority changed from Normal to Low
- Target version changed from future to Ready
- Parent task set to #110016
Let's see what we can do about this, what is feasible to do, etc. I would like to use one of the next opportunities when I can talk to jbaier about this to better understand what's the impact and different approaches towards fixing.
Updated by jbaier_cz over 2 years ago
okurz wrote:
I would like to use one of the next opportunities when I can talk to jbaier about this
I would leave here some notes. As I mentioned already above, I created a small proof of concept with a simple script. The main issue here would be probably in the data transformation for the corner cases. I am able, quite reliably, fetch information about modules. Basically by invoking ./get_products.pl SLE-Module-Basesystem:15:SP4
I am able to get the same data structure as we have in the metadata. I can't do it for products (not sure why, maybe I am just missing something in the script, or maybe the products API is not searchable by product name) and there are corner cases like SLE-Module-Containers 15-SP4
which is named Containers SLE-15-SP4
in our metadata (for reasons unknown to me, the comment in the code suggests it could be connected to release channels not to be present in such cases, but it also could be some relic of the past and the transformation is no longer needed).
I see two possible approaches here, one is integrating that into template generator; the second would be integrating that into the metadata package (like introducing an automated pipeline for fetching and updating the product definitions in the metadata package). I would probably incline towards the second solution as that will allow to do some phase-out (and optionally still keep the possibility to do manual changes); and if that would work, we can then take it, integrate it as a module into template generator and delete all product definitions from the metadata forever.
Either way, I am happy to discuss this in detail with you, @okurz
Updated by livdywan over 2 years ago
- Subject changed from [teregen] Replace productdefs by API call to [teregen] Replace productdefs by API call size:M
- Description updated (diff)
- Status changed from New to Workable
Updated by jbaier_cz over 2 years ago
- Status changed from Workable to In Progress
- Assignee set to jbaier_cz
Updated by jbaier_cz over 2 years ago
- Status changed from In Progress to Feedback
Added a quick how-to describing the usage of the PoC script: https://gitlab.suse.de/qa-maintenance/teregen/-/merge_requests/1. Integration of the script inside the generator itself is left to the future.
Updated by okurz over 2 years ago
looks great! Merged https://gitlab.suse.de/qa-maintenance/teregen/-/merge_requests/1
Now to fulfill AC1 can we extend an error message to point to this README instructions?
Updated by jbaier_cz over 2 years ago
- Status changed from Feedback to In Progress
That might be one option, the error itself should be rendered inside a page, so I can also add some info to the error page. I will see what would bring more benefit.
Updated by jbaier_cz over 2 years ago
- Status changed from In Progress to Feedback
I create a second MR: https://gitlab.suse.de/qa-maintenance/teregen/-/merge_requests/2 with more detailed product missing error message and also added some more hints on the "missing report log" page.
Updated by jbaier_cz over 2 years ago
- Copied to action #112268: [teregen] Integrate productdefs generator inside template generator added