Bug 2230733

Summary: build_entered.event.foreman contains no object payload
Product: Red Hat Satellite Reporter: Paul Dudley <pdudley>
Component: Hooks and WebhooksAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED NOTABUG QA Contact: Satellite QE Team <sat-qe-bz-list>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.13.2CC: jstloui9, ofedoren
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-08-17 14:59:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Paul Dudley 2023-08-09 22:39:55 UTC
When creating a webhook for the build_entered event, no data is deployed and hooks will retrieve a nil value for any processed payload.

reference; https://projects.theforeman.org/issues/35777

Expectations;
build_entered retrieves proper object data

Actual results;
No payload is returned and so hooks cannot be built against this event

Comment 1 Oleh Fedorenko 2023-08-10 11:06:28 UTC
Hello Paul, have you seen the documentation [1] for such events? build_entered and build_exited are custom ones and there is no @object variable, but there is a standard @payload variable, which contains id and name of the host, which can be used to retrieve the host via e.g. load_hosts loader or a separate API call.

[1] - https://access.redhat.com/documentation/en-us/red_hat_satellite/6.13/html/administering_red_hat_satellite/using_webhooks_admin#webhooks-available-events_admin

Comment 2 Paul Dudley 2023-08-17 14:59:52 UTC
Thank you for clearing that up, Oleh! With that i was able to see what I was doing wrong and provide the right way to get the data returned by the event. Marking as closed. Thanks again.