- qa
Workflow qa
task_data:prefix(string, optional): prefix this string to the item names provided in the internal collectionreference_prefix(string, optional unlessenable_regression_trackingis set): prefix for the item names provided in the internal collection in the corresponding workflow run for reference testssource_artifact(Single lookup, required): the debian:source-package or debian:upload artifact representing the source package to testbinary_artifacts(Multiple lookup, required): the debian:binary-package, debian:binary-packages, or debian:upload artifacts representing the binary packages to testpackage_build_logs(Multiple lookup, optional): the debian:package-build-log artifacts representing the build logs. Required ifenable_blhcis Trueqa_suite(Single lookup, optional unlessenable_regression_tracking,update_qa_results, orenable_debdiffis True): the debian:suite collection that reference tests are being run against to detect regressions or the collection to search for debdiff original packagesreference_qa_results(Single lookup, optional unlessenable_regression_trackingorupdate_qa_resultsis True): the debian:qa-results collection that contains the reference results of QA tasks to use to detect regressionsenable_regression_tracking(boolean, defaults to False): configure the workflow to detect and display regressions in QA resultsupdate_qa_results(boolean, defaults to False): when set to True, the workflow runs QA tasks and updates the collection passed inreference_qa_resultswith the results.vendor(string, required): the distribution vendor on which to run testscodename(string, required): the distribution codename on which to run testsextra_repositories(optional): see PackageBuildarchitectures(list of strings, optional): if set, only run on any of these architecture namesarchitectures_allowlist(list of strings, optional, either concrete architecture names orall): if set, only run on any of these architecture names; whilearchitecturesis intended to be supplied by users or passed down from a higher-level workflow, this field is intended to be provided via Task configurationarchitectures_denylist(list of strings, optional, either concrete architecture names orall): if set, do not run on any of these architecture names; this field is intended to be provided via Task configurationarch_all_host_architecture(string, defaults toamd64): concrete architecture on which to run tasks forArchitecture: allpackagesqa_suite(Single lookup, required ifenable_reverse_dependencies_autopkgtestis True): the debian:suite collection to search for reverse-dependencies; once we have a good way to look up the primary suite for a vendor and codename, this could default to doing soenable_check_installability(boolean, defaults to True): whether to include installability-checking taskscheck_installability_suite(Single lookup, required ifenable_check_installabilityis True): the debian:suite collection to check installability against; once we have a good way to look up the primary suite for a vendor and codename, this could default to doing soenable_autopkgtest(boolean, defaults to True): whether to include autopkgtest tasksautopkgtest_backend(string, optional): see Autopkgtestenable_reverse_dependencies_autopkgtest(boolean, defaults to False): whether to include autopkgtest tasks for reverse-dependenciesenable_lintian(boolean, defaults to True): whether to include lintian taskslintian_backend(string, optional): see Lintianlintian_fail_on_severity(string, optional): see Lintianenable_piuparts(boolean, defaults to True): whether to include piuparts taskspiuparts_backend(string, optional): see Piupartspiuparts_environment(string, optional): the environment to run piuparts inenable_debdiff(boolean, defaults to False): whether to include debdiff tasks for source and binary packages. Compares the supplied source package and the binary packages against the packages available in the distribution identified byqa_suite.enable_blhc(boolean, defaults to False): whether to includeblhctasks for the build logsfail_on(string, optional): indicate the conditions to trigger a failure of the whole workflow. Allowed values arefailure,regression,never. Withfailure, the workflow is marked as failed if one of the QA task fails. Withregression, the workflow fails only if one of the QA result is a regression compared to the former result. Withnever, the workflow always succeeds. The default value isregressionifenable_regression_trackingis True, otherwise it isfailure.
The workflow computes dynamic metadata as:
subject: package name of
source_artifact
Any of the lookups in source_artifact or binary_artifacts may result
in , and in that case the workflow
adds corresponding dependencies. Binary promises must include an
architecture field in their data.
The effective set of architectures is {architectures} (defaulting to all
architectures supported by this Debusine instance and the
{vendor}:{codename} suite, plus all), intersecting
{architectures_allowlist} if set, and subtracting
{architectures_denylist} if set.
The workflow creates sub-workflows and tasks as follows, with substitutions based on its own task data:
if
enable_check_installabilityis set, a single CheckInstallability, with task data:suite:{check_installability_suite}binary_artifacts: the subset of the lookup in this workflow’sbinary_artifactsfor each available architecture
if
enable_autopkgtestis set, an autopkgtest sub-workflow, with task data:source_artifact:{source_artifact}binary_artifacts: the subset of the lookup in this workflow’sbinary_artifactsfor each ofalland the concrete architecture in question that existvendor:{vendor}codename:{codename}backend:{autopkgtest_backend}architectures: the effective set of architecturesarch_all_host_architecture:{arch_all_host_architecture}
if
enable_reverse_dependencies_autopkgtestis set, a reverse_dependencies_autopkgtest sub-workflow, with task data:source_artifact:{source_artifact}binary_artifacts: the subset of the lookup in this workflow’sbinary_artifactsfor each ofalland the concrete architecture in question that existqa_suite:{qa_suite}vendor:{vendor}codename:{codename}backend:{autopkgtest_backend}architectures: the effective set of architecturesarch_all_host_architecture:{arch_all_host_architecture}
if
enable_lintianis set, a lintian sub-workflow, with task data:source_artifact:{source_artifact}binary_artifacts: the subset of the lookup in this workflow’sbinary_artifactsfor each ofalland the concrete architecture in question that existvendor:{vendor}codename:{codename}backend:{lintian_backend}architectures: the effective set of architecturesarch_all_host_architecture:{arch_all_host_architecture}fail_on_severity:{lintian_fail_on_severity}
if
enable_piupartsis set, a piuparts sub-workflow, with task data:binary_artifacts: the subset of the lookup in this workflow’sbinary_artifactsfor each ofalland the concrete architecture in question that existvendor:{vendor}codename:{codename}backend:{piuparts_backend}architectures: the effective set of architecturesarch_all_host_architecture:{arch_all_host_architecture}
Todo
Not implemented: enable_check_installability and
check_installability_suite.
Behavior with update_qa_results set to True
When update_qa_results is set to True, the goal of the workflow
is modified: its only purpose is to provide reference results to
be stored in a debian:qa-results collection. Task failures are
never fatal for the parent workflow or for dependent tasks.
During orchestration, the workflow compares the data available in the
debian:qa-results collection together with information about
the submitted source_artifact and binary_artifacts.
When a missing or outdated QA result is detected, it schedules the appropriate QA task, and it creates a corresponding promise in the internal collection (the name of the promise is the prefix followed by the expected name of the collection entry). The QA task has the following event reactions:
on_assignment: an action to skip the work request if the latest relevant item in the debian:qa-results collection has changed since the work request has created; this avoids wasting resources if multiple parallel workflows trigger an update of the same QA resultson_success: an action to add the result to the debian:qa-results collectionon_failure: same ason_success
Note that when enable_reverse_dependencies_autopkgtest is set to True,
it must also update the autopkgtest results of the reverse dependencies
and thus compute the same list of packages as the
reverse_dependencies_autopkgtest workflow (using the same
qa_suite collection).
Behavior with enable_regression_tracking set to True
When enable_regression_tracking is set to True, the orchestrator
of the qa workflow schedules workflow callbacks that will perform the regression analysis. In order
to wait for the availability of the QA result(s), those callbacks have
dependencies against:
the promises associated to the QA result(s) that are required from the additional
qaworkflow building reference resultsthe promises associated to the QA result(s) that are required from the sub-workflows
The workflow_data field for those workflow callbacks have:
visibleset to False so that they do not show up in the workflow hierarchy (new feature to implement)stepset toregression-analysis
As part of the callback, the analysis is performed and the result
of the analysis is stored in the output_data field of the workflow.
Note
We use simple workflow callbacks instead of full-fledged worker tasks or server tasks because we assume that regression analysis can be completed just by comparing the artifact metadata and/or the collection item. Workflow callbacks are already dealt through celery tasks so they are relatively cheap. Note however that the large number of callbacks requires use of careful locking to serialize the operations between concurrent runs trying to update the same workflow.
Handling of fail_on
With fail_on: never or fail_on: regression, all the sub-workflows
are run with workflow_data.allow_failure: true.
With fail_on: regression, a final orchestrator callback is scheduled:
it depends on all the
regression-analysiscallbacksworkflow_data.visibleis set to Trueworkflow_data.stepisfinal-regression-analysisworkflow_data.display_nameisRegression analysis
The callback reviews the data in output_data.regression_analysis
and sets its own result to FAILURE in case of regression, or SUCCESS
otherwise.