Skip to content

Commit fb84ed4

Browse files
committed
kdevops_archive: handle workflows without target_linux_ref
The kdevops_archive role failed when archiving results from workflows that do not involve kernel builds. The role defaults assumed target_linux_ref would always be defined and used it unconditionally for constructing archive directory paths and metadata. Workflows like fio-tests, blktests, and selftests that focus on testing userspace tools or storage subsystems do not set target_linux_ref because they do not build or install custom kernels. The archive role would fail with an undefined variable error when attempting to access this variable. Add default values using Jinja2 filter chains so the archive role works for both kernel and non-kernel workflows. When target_linux_ref is not defined, fall back to kdevops_workflow_name to identify the test run. If neither variable is available, use the generic fallback value workflow. For kernel testing workflows the archive directory structure remains unchanged using the kernel reference like v6.15 or linux-next. For non-kernel workflows the archive directory now uses the workflow name like fio-tests or blktests. This provides clear organization of archived results while supporting the full range of kdevops workflows. The fix enables CI archival for all workflow types without requiring kernel-specific variables to be set in non-kernel testing scenarios. Generated-by: Claude AI Signed-off-by: Luis Chamberlain <[email protected]>
1 parent 603cdaa commit fb84ed4

File tree

1 file changed

+2
-2
lines changed
  • playbooks/roles/kdevops_archive/defaults

1 file changed

+2
-2
lines changed

playbooks/roles/kdevops_archive/defaults/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
kdevops_archive_data_count: 0
33
kdevops_results: "{{ topdir_path }}/archive"
4-
kdevops_results_local: "{{ kdevops_results }}/{{ target_linux_ref }}/"
4+
kdevops_results_local: "{{ kdevops_results }}/{{ target_linux_ref | default(kdevops_workflow_name | default('workflow')) }}/"
55
kdevops_results_repo_url_user: "git"
66
kdevops_results_repo_url: "{{ kdevops_results_repo_url_user}}@github.com:linux-kdevops/kdevops-results-archive.git"
77
kdevops_results_repo_url_demo: "{{ kdevops_results_repo_url_user}}@github.com:linux-kdevops/kdevops-results-archive-demo.git"
@@ -21,4 +21,4 @@ kdevops_archive_test_subject: "maple_tree: dump error message based on format"
2121
kdevops_archive_ci_subject_patchform_name: "maple_tree-dump-error-message-based-on-format"
2222
kdevops_archive_ci_test_result: "unknown"
2323
kdevops_archive_test_commit: "Elaborate here on test details."
24-
kdevops_archive_test_ref: "{{ target_linux_ref }}"
24+
kdevops_archive_test_ref: "{{ target_linux_ref | default(kdevops_workflow_name | default('workflow')) }}"

0 commit comments

Comments
 (0)