Bug 2230733 - build_entered.event.foreman contains no object payload
Summary: build_entered.event.foreman contains no object payload
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hooks and Webhooks
Version: 6.13.2
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Satellite QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-08-09 22:39 UTC by Paul Dudley
Modified: 2023-08-17 14:59 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-08-17 14:59:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 35777 0 Normal New @object is not available in build_entered.event.foreman 2023-08-09 22:40:42 UTC

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.


Note You need to log in before you can comment on or make changes to this bug.