Skip to content

Prepare for NamedTestAttribute and TestData unused models removal by eliminating use cases

Those two models were no longer creatable since LAVA 2020.09. See commit 9f4c6df5 which removed the call to parse_job_description. That function called the function map_metadata which in turn was removed in commit 0f292afd.

To verify that no new TestData object were created use the following SQL command.

SELECT MAX(submit_time)
FROM lava_results_app_testdata
  JOIN lava_scheduler_app_testjob
  ON lava_results_app_testdata.testjob_id = lava_scheduler_app_testjob.id;

This commit removes all uses of NamedTestAttribute and TestData but does not remove the actual models in order to support zero-downtime upgrades. Next version should remove those models and add a migration.

The get_metadata_dict method of TestJob model was removed because it only provided data from those models and was no longer useful for newer jobs.

APIs and URLs removed because they no longer provided any useful information:

  • The get_testjob_metadata XMLRPC API call
  • results/<job>/metadata URL
  • TestJob creation notification no longer has "metadata" field
  • api/v0.2/jobs/<job>/metadata/ REST API call

This commit does not produce any database migrations. This means that NamedTestAttribute will still be displayed on the "Add new condition" page. To not allow any more metadata conditions raise an exception.

Edited by Igor Ponomarev

Merge request reports