Project

General

Profile

action #87755

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

Added by jbaier_cz over 1 year ago. Updated 17 days ago.

Status:
Resolved
Priority:
Low
Assignee:
Target version:
Start date:
2021-01-14
Due date:
% Done:

20%

Estimated time:

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

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

Related issues

Copied to QA - action #112268: [teregen] Integrate productdefs generator inside template generatorNew

History

#1 Updated by jbaier_cz over 1 year ago

  • Target version changed from Ready to future

#2 Updated by jbaier_cz over 1 year 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

#3 Updated by jbaier_cz about 1 year ago

  • Project changed from SUSE QA to QA

#4 Updated by jbaier_cz 11 months ago

  • Assignee deleted (jbaier_cz)

#5 Updated by deneb_alpha 2 months 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.

#6 Updated by okurz 2 months ago

  • Priority changed from Normal to Low
  • Target version changed from future to Ready
  • Parent task set to #110016

deneb_alpha

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.

#7 Updated by jbaier_cz 2 months 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

#8 Updated by cdywan about 2 months 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

#9 Updated by jbaier_cz about 2 months ago

  • Description updated (diff)

#10 Updated by jbaier_cz about 1 month ago

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

#11 Updated by jbaier_cz about 1 month 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.

#12 Updated by okurz 28 days 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?

#13 Updated by jbaier_cz 28 days 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.

#14 Updated by jbaier_cz 28 days 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.

#15 Updated by jbaier_cz 17 days ago

  • Status changed from Feedback to Resolved

#16 Updated by jbaier_cz 17 days ago

  • Copied to action #112268: [teregen] Integrate productdefs generator inside template generator added

Also available in: Atom PDF