Project

General

Profile

Actions

Bug #35867

closed

Default "Katello Promote" template for "Actions Katello Content View Promote Succeeded" event fails to render

Added by Jan Loeser over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Adding a webhook for "Actions Katello Content View Promote Succeeded" with default template "Katello Promote" results in:

2022-12-14T07:45:06 [I|app|e9fe6d76] ForemanWebhooks::EventSubscriber: actions.katello.content_view.promote_succeeded.event.foreman event received
2022-12-14T07:45:06 [E|dyn|e9fe6d76] Failed to run hook 'emit_event' for action 'Actions::Katello::ContentView::Promote'
2022-12-14T07:45:06 [E|dyn|e9fe6d76] undefined method `action_output' for #<ForemanTasks::Task::DynflowTask:0x00005570a3456988>
 e9fe6d76 | Did you mean?  action_continuous_output (NoMethodError)
 e9fe6d76 | /usr/share/gems/gems/activemodel-6.1.7/lib/active_model/attribute_methods.rb:469:in `method_missing'
...

Webhook + template info:

[root@foreman ~]# hammer webhook info --id 3
Id:                  3
Name:                promote2
Target URL:          http://localhost:8100/shellhook/promote_contentview
Enabled:             yes
Event:               actions.katello.content_view.promote_succeeded.event.foreman
HTTP Method:         POST
HTTP Content Type:   application/json
Webhook Template:    Katello Promote
User:                
Verify SSL:          yes
Proxy Authorization: no
HTTP Headers:        
 1)  =>
Created at:          2022/12/13 15:55:34
Updated at:          2022/12/14 06:43:58
[root@foreman ~]# hammer webhook-template info --name "Katello Promote" 
Id:            182
Name:          Katello Promote
Description:   
    Example payload for actions.katello.content_view.promote_suc
    eeded
Locked:        yes
Default:       yes
Created at:    2022/12/13 13:13:08
Updated at:    2022/12/13 13:13:08
Locations:     
    Default Location
Organizations: 
    Default Organization

Problematic line is the last one in default template:

[root@foreman ~]# hammer webhook-template dump --name "Katello Promote" | grep action_output
# Task action output <%= @object.task.action_output %>

If the line is removed, the template can be rendered.

Installed Packages

candlepin-4.2.3-1.el8.noarch
candlepin-selinux-4.2.3-1.el8.noarch
foreman-3.6.0-0.2.develop.20221201132419giteaf0052.el8.noarch
foreman-cli-3.6.0-0.2.develop.20221201132419giteaf0052.el8.noarch
foreman-debug-3.6.0-0.2.develop.20221201132419giteaf0052.el8.noarch
foreman-dynflow-sidekiq-3.6.0-0.2.develop.20221201132419giteaf0052.el8.noarch
foreman-installer-3.6.0-0.1.develop.20221209031324git5dcd8c9.el8.noarch
foreman-installer-katello-3.6.0-0.1.develop.20221209031324git5dcd8c9.el8.noarch
foreman-postgresql-3.6.0-0.2.develop.20221201132419giteaf0052.el8.noarch
foreman-proxy-3.6.0-0.1.develop.20221110105526gitbefb442.el8.noarch
foreman-release-3.6.0-0.1.develop.el8.noarch
foreman-selinux-3.6.0-0.2.develop.el8.noarch
foreman-service-3.6.0-0.2.develop.20221201132419giteaf0052.el8.noarch
katello-4.8.0-0.2.master.el8.noarch
katello-ca-consumer-foreman.local-1.0-1.noarch
katello-certs-tools-2.9.0-1.el8.noarch
katello-client-bootstrap-1.7.9-1.el8.noarch
katello-common-4.8.0-0.2.master.el8.noarch
katello-debug-4.8.0-0.2.master.el8.noarch
katello-repos-4.8-0.1.nightly.el8.noarch
katello-selinux-4.0.2-2.el8.noarch
pulpcore-selinux-1.3.2-1.el8.x86_64
python39-pulp-ansible-0.15.0-1.el8.noarch
python39-pulp-certguard-1.5.5-1.el8.noarch
python39-pulp-cli-0.14.0-4.el8.noarch
python39-pulp-container-2.14.2-1.el8.noarch
python39-pulp-deb-2.20.0-1.el8.noarch
python39-pulp-file-1.11.1-1.el8.noarch
python39-pulp-python-3.7.2-2.el8.noarch
python39-pulp-rpm-3.18.5-1.el8.noarch
python39-pulpcore-3.21.0-1.el8.noarch
qpid-proton-c-0.37.0-1.el8.x86_64
rubygem-foreman-tasks-7.1.0-1.fm3_6.el8.noarch
rubygem-foreman_maintain-1.2.1-1.el8.noarch
rubygem-foreman_remote_execution-8.1.1-1.fm3_6.el8.noarch
rubygem-foreman_webhooks-3.0.5-1.fm3_5.el8.noarch
rubygem-hammer_cli-3.6.0-0.1.pre.develop.20221129111837gitc6cb296.el8.noarch
rubygem-hammer_cli_foreman-3.6.0-0.2.pre.develop.20221128091426git3e93ffd.el8.noarch
rubygem-hammer_cli_foreman_remote_execution-0.2.2-1.fm3_0.el8.noarch
rubygem-hammer_cli_foreman_tasks-0.0.18-1.fm3_5.el8.noarch
rubygem-hammer_cli_foreman_webhooks-0.0.4-1.fm3_5.el8.noarch
rubygem-hammer_cli_katello-1.8.0-0.1.pre.master.20221121193143git6f9bd71.el8.noarch
rubygem-katello-4.8.0-0.1.pre.master.20221206212347gita06d647.el8.noarch
rubygem-pulp_ansible_client-0.15.0-1.el8.noarch
rubygem-pulp_certguard_client-1.5.5-1.el8.noarch
rubygem-pulp_container_client-2.14.3-1.el8.noarch
rubygem-pulp_deb_client-2.20.0-1.el8.noarch
rubygem-pulp_file_client-1.11.2-1.el8.noarch
rubygem-pulp_ostree_client-2.0.0-0.1.a1.el8.noarch
rubygem-pulp_python_client-3.7.3-1.el8.noarch
rubygem-pulp_rpm_client-3.18.9-1.el8.noarch
rubygem-pulpcore_client-3.21.3-1.el8.noarch
rubygem-qpid_proton-0.37.0-1.el8.x86_64
rubygem-smart_proxy_pulp-3.2.0-3.fm3_3.el8.noarch

Expectation would be that Katello promote event works with default Katello promote template.

Reproduced on recent TFM/Katello nightly. However, this was first seen in Foreman v3.1.


Files

production.log production.log 17.8 KB production log dump Jan Loeser, 12/14/2022 12:32 PM
Actions

Also available in: Atom PDF