Skip to content

Commit 5691082

Browse files
committed
Add debug option to package update workflow
Previously, we would print a bunch of debug output every time we ran the version query playbook. That ouput is super slow, so this change hides it behind an input, so it's still an option but not the default. Added a general release_train_debug variable, so the pattern can be repeated in the future.
1 parent 8d6e4fc commit 5691082

4 files changed

Lines changed: 21 additions & 3 deletions

File tree

‎.github/workflows/package-update-kayobe.yml‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ on:
1212
required: false
1313
description: Branch of StackHPC Kayobe configuration to use
1414
default: stackhpc/2026.1
15+
debug:
16+
description: "Enable debug logging"
17+
type: boolean
18+
default: false
1519

1620
env:
1721
ANSIBLE_FORCE_COLOR: true
@@ -44,7 +48,8 @@ jobs:
4448
ansible/test-kayobe-repo-version-generate.yml \
4549
-e deb_package_repo_filter="'$FILTER'" \
4650
-e rpm_package_repo_filter="'$FILTER'" \
47-
-e kayobe_config_repo_path=./stackhpc-kayobe-config/
51+
-e kayobe_config_repo_path=./stackhpc-kayobe-config/ \
52+
-e release_train_debug=${{ github.event.inputs.debug }}
4853
env:
4954
FILTER: ${{ github.event.inputs.filter }}
5055

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
# Enable to print debug logs in release train workflows
3+
release_train_debug: false

‎ansible/kayobe-repo-version-query.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,5 @@
4646
- name: Display Kayobe Pulp repository versions
4747
ansible.builtin.debug:
4848
var: kayobe_pulp_repo_versions
49+
when:
50+
- release_train_debug | bool

‎ansible/test-pulp-repo-version-query.yml‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,9 @@
117117
loop: "{{ dev_pulp_distribution_deb }}"
118118
loop_control:
119119
label: "{{ item.repository }}"
120-
when: pub | length > 0
120+
when:
121+
- release_train_debug | bool
122+
- pub | length > 0
121123

122124
- name: Set a fact about latest Deb versions
123125
ansible.builtin.set_fact:
@@ -133,6 +135,8 @@
133135
- name: Display latest versions fact
134136
ansible.builtin.debug:
135137
var: test_pulp_repository_deb_repo_versions
138+
when:
139+
- release_train_debug | bool
136140

137141
- vars:
138142
repo_list: >-
@@ -188,7 +192,9 @@
188192
loop: "{{ dev_pulp_distribution_rpm }}"
189193
loop_control:
190194
label: "{{ item.repository }}"
191-
when: pub | length > 0
195+
when:
196+
- release_train_debug | bool
197+
- pub | length > 0
192198

193199
- name: Set a fact about latest RPM versions
194200
ansible.builtin.set_fact:
@@ -204,3 +210,5 @@
204210
- name: Display latest versions fact
205211
ansible.builtin.debug:
206212
var: test_pulp_repository_rpm_repo_versions
213+
when:
214+
- release_train_debug | bool

0 commit comments

Comments
 (0)