Skip to content

Draft: HTTP callbacks as event handler/notification #7469

@dnsmichi

Description

@dnsmichi

Shell scripts for event handlers need to be deployed. Most recently, a community member asked how to rewrite a bash script with curl into Python with requests.

Also, we have a couple of tools already around:

  • DSL with runtime functions as custom variables
  • JSON.encode/decode
  • Http Client C++ code in the background
  • Access to the runtime state of an object, either through macros or direct object access

The thing I'd like to discuss here:

  • An EventCommand which just uses http-callback as executed method
    • Additional variables need to be defined in a specified format, e.g. with creating a DSL function filling the required fields.
  • A NotificationCommand which fires http-callback and additional credentials stored somewhere, plus the POST body.
  • Execution location configuration - either local or command_endpoint

Similar things are available with GitLab webhooks already.

Describe the solution you'd like

A clear way of configuring this inside the DSL. The user requirement for notifications needs to be lifted.

Also, blocking callbacks shouldn't block other operations, so might need a different task pool here, than the checker component uses.

Describe alternatives you've considered

A Python script which takes care about argument handling and curl requests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    TBDTo be defined - We aren't certain about this yetarea/notificationsNotification eventsenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions