[scheduling] Job created with "jobs post" not expand specified MACHINE variable
|Target version:||Current Sprint|
I am creating job with "jobs post" and specifying this set of variables :
Created jobs don't get all variables which assigned to MACHINE='aarch64' in openQA settings.
#2 Updated by coolo over 2 years ago
both the expansion and the MACHINE is a feature of the job templates - which is only used by isos post. clone job also posts jobs with MACHINE because the other instance has it - and I don't think the MACHINE on your instance should have any relevance for clone_job.
So I would go with _MACHINE, _TEST_SUITE and _PRODUCT - along with _GROUP
- Status changed from Resolved to In Progress
The implementation needs to be revised, see https://github.com/os-autoinst/openQA/pull/2073.
Likely it makes most sense to cherry-pick your first commit https://github.com/os-autoinst/openQA/pull/2057/commits/9091529a8d0e8c6b62ff38a503f1a7502a2ec62c and improve it as needed:
- The code for the settings expansion should be correct. That is the most important point and it can be verified with the testcases you created today. As @kraih mentioned it makes also sense to add tests with variables used in production.
- It should be in its own module because the utils have already grown too big. But I still wouldn't use object orientation here. It is simply an overkill in my opinion. Without object orientation the module can still hide the internal helper.
- Prevent unnecessary copies. (The previous implementation attempt created an unnecessary copy in the constructor.)