Project

General

Profile

action #156697

Updated by tinita 9 months ago

## Motivation 

 Variables ending up in vars.json can come from job settings (database), worker settings and `set_var()` calls. 
 Sometimes it's hard to trace where a variable was set. 
 It would at least be nice to see if a variable was in vars.json at the beginning, or if it was set during the test. 


 ## Suggestions 
 * Since `%bmwqemu::vars` is a tied hash, we can actually trace every change and find out the call stack 
 * Log every call to `set_var()` with `diag()` (possibly depending on a job setting `DEBUG_VARS` 
 * Save and upload the original `vars.json`seperately 
 * Add the trace and timestamp for every `set_var()` call to the object and output that at the end via `diag` or upload it 
 * Proof of Concept: https://github.com/os-autoinst/os-autoinst/pull/2468

Back