Skip to content

Commit

Permalink
Shorten label on some loops to show name instead of entire json block (
Browse files Browse the repository at this point in the history
…#1002)

* Fix loop label in controller_execution_environments

* Shorten label of job template async status

The current label of the step to wait for the async job templates to complete shows the full JSON output of the job var, which is very verbose and can be especially long when a survey is included.

Shorten the output so it only shows the name of the job template, very similar to the task that  manages controller job templates

* Loop labels to name of object

* Add changelog fragments

---------

Co-authored-by: Sean Sullivan <ssulliva@redhat.com>
  • Loading branch information
MallocArray and sean-m-sullivan authored Dec 16, 2024
1 parent d356068 commit 0d0c5df
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 2 deletions.
3 changes: 3 additions & 0 deletions changelogs/fragments/controller_credential_types.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
bugfixes:
- Update loop label to only show name of credential type instead of entire json object
3 changes: 3 additions & 0 deletions changelogs/fragments/controller_job_templates.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
bugfixes:
- Update loop label to only show name of job template instead of entire json object
3 changes: 3 additions & 0 deletions changelogs/fragments/controller_workflow_job_templates.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
bugfixes:
- Update loop label to only show name of workflow job template instead of entire json object
2 changes: 1 addition & 1 deletion roles/controller_credential_types/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
loop: "{{ __credentialtypes_job_async.results }}"
loop_control:
loop_var: __credentialtypes_job_async_result_item
label: "{{ __operation.verb }} Controller Credential Type {{ __credentialtypes_job_async_result_item }} | Wait for finish the credential type {{ __operation.action }}"
label: "{{ __operation.verb }} Controller Credential Type {{ __credentialtypes_job_async_result_item.__controller_credential_type_item.name }} | Wait for finish the credential type {{ __operation.action }}"
when: not ansible_check_mode and __credentialtypes_job_async_result_item.ansible_job_id is defined
no_log: "{{ controller_configuration_credential_types_secure_logging }}"
vars:
Expand Down
2 changes: 1 addition & 1 deletion roles/controller_job_templates/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
loop: "{{ __job_templates_job_async.results }}"
loop_control:
loop_var: __job_templates_job_async_result_item
label: "{{ __operation.verb }} Job Template {{ __job_templates_job_async_result_item }} | Wait for finish the Job Template {{ __operation.action }}"
label: "{{ __operation.verb }} Job Template {{ __job_templates_job_async_result_item.__controller_template_item.name }} | Wait for finish the Job Template {{ __operation.action }}"
when: not ansible_check_mode and __job_templates_job_async_result_item.ansible_job_id is defined
no_log: "{{ controller_configuration_job_templates_secure_logging }}"
vars:
Expand Down
1 change: 1 addition & 0 deletions roles/controller_workflow_job_templates/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
loop: "{{ controller_workflows | default(workflow_job_templates) }}"
loop_control:
loop_var: __workflow_loop_item
label: "Workflow {{ __workflow_loop_item.name }}"
when:
- __workflow_loop_item.simplified_workflow_nodes is defined
- (__workflow_loop_item.state | default('present')) == "present"
Expand Down

0 comments on commit 0d0c5df

Please sign in to comment.