Message bus events
This document provides detailed documentation for all events used in the Infrahub message bus system.
For more detailed explanations on how these events are used within Infrahub, see the event system documentation.
Messages events​
Git Branch Heads​
Event git.branch_heads.get​
Description: Read the remote head of every branch of a repository from a worker's local clone.
Priority: 4
| Key | Description | Type | Default Value |
|---|---|---|---|
| meta | Meta properties for the message | N/A | None |
| repository_id | The unique ID of the Repository | string | None |
| repository_name | The name of the repository | string | None |
| repository_kind | The kind of the repository | string | None |
| location | The external URL of the repository | string | None |
| branches | The branches whose remote heads are read | array | None |
Git Commit Log​
Event git.commit_log.get​
Description: Read the commit log of a repository from a worker's local clone.
Priority: 4
| Key | Description | Type | Default Value |
|---|---|---|---|
| meta | Meta properties for the message | N/A | None |
| repository_id | The unique ID of the Repository | string | None |
| repository_name | The name of the repository | string | None |
| repository_kind | The kind of the repository | string | None |
| location | The external URL of the repository | string | None |
| infrahub_branch_name | Infrahub branch the log is read for | string | None |
| git_ref | Remote branch or read-only ref whose history is listed | string | None |
| imported_commit | Commit imported on the Infrahub branch | N/A | None |
| limit | Number of commits to return | integer | None |
| offset | Number of commits to skip from the head | integer | None |
| include_pending_count | Whether to count the commits not yet imported | boolean | None |
Git File​
Event git.file.get​
Description: Read a file from a Git repository.
Priority: 4
| Key | Description | Type | Default Value |
|---|---|---|---|
| meta | Meta properties for the message | N/A | None |
| branch_name | The Infrahub branch the file request is scoped to | string | None |
| commit | The commit id to use to access the file | string | None |
| file | The path and filename within the repository | string | None |
| repository_id | The unique ID of the Repository | string | None |
| repository_name | The name of the repository | string | None |
| repository_kind | The kind of the repository | string | None |
Git Repository​
Event git.repository.connectivity​
Description: Validate connectivity and credentials to remote repository.
Priority: 3
| Key | Description | Type | Default Value |
|---|---|---|---|
| meta | Meta properties for the message | N/A | None |
| repository_name | The name of the repository | string | None |
| repository_location | The location of repository | string | None |
| default_branch | The branch that must exist on the remote; when unset, only connectivity is checked | N/A | None |
| requires_write | Whether the check must also confirm write (push) access to the remote | boolean | False |
Refresh Git​
Event refresh.git.clone​
Description: Ask every worker to create its local copy of a repository if it has none, without changing any checkout.
Priority: 3
| Key | Description | Type | Default Value |
|---|---|---|---|
| meta | Meta properties for the message | N/A | None |
| repository_id | The unique ID of the repository | string | None |
| repository_name | The name of the repository | string | None |
| repository_kind | The type of repository | string | None |
| infrahub_branch_name | Infrahub branch whose ref a new copy checks out | string | None |
Event refresh.git.fetch​
Description: Fetch a repository remote changes.
Priority: 3
| Key | Description | Type | Default Value |
|---|---|---|---|
| meta | Meta properties for the message | N/A | None |
| location | The external URL of the repository | string | None |
| repository_id | The unique ID of the repository | string | None |
| repository_name | The name of the repository | string | None |
| repository_kind | The type of repository | string | None |
| infrahub_branch_name | Infrahub branch on which to sync the remote repository | string | None |
| infrahub_branch_id | Id of the Infrahub branch on which to sync the remote repository | string | None |
| commit | Commit SHA to check out, pinned by the sync orchestrator instead of pulling the latest upstream HEAD | N/A | None |
| branches | Every branch to converge with its pinned commit, the first one repeating the single-branch fields | N/A | None |
Event refresh.git.branch_deleted​
Description: Notify workers that a branch was deleted from the remote repository.
Priority: 3
| Key | Description | Type | Default Value |
|---|---|---|---|
| meta | Meta properties for the message | N/A | None |
| repository_id | The unique ID of the repository | string | None |
| repository_name | The name of the repository | string | None |
| repository_kind | The type of repository | string | None |
| branch_name | The name of the branch that was deleted | string | None |
Refresh Registry​
Event refresh.registry.branches​
Description: Sent to indicate that the registry should be refreshed and new branch data loaded.
Priority: 3
| Key | Description | Type | Default Value |
|---|---|---|---|
| meta | Meta properties for the message | N/A | None |
Event refresh.registry.rebased_branch​
Description: Sent to refresh a rebased branch within the local registry.
Priority: 3
| Key | Description | Type | Default Value |
|---|---|---|---|
| meta | Meta properties for the message | N/A | None |
| branch | The branch that was rebased | string | None |
Refresh Settings​
Event refresh.settings.response_delay​
Description: Broadcast to update the API response delay on every running API worker process.
Priority: 3
| Key | Description | Type | Default Value |
|---|---|---|---|
| meta | Meta properties for the message | N/A | None |
| response_delay | Delay in seconds to add to each API request | integer | None |
Send Echo​
Event send.echo.request​
Description: Sent a echo request, a ping message for example.
Priority: 5
| Key | Description | Type | Default Value |
|---|---|---|---|
| meta | Meta properties for the message | N/A | None |
| message | The message to send | string | None |
Responses events​
Git Branch Heads​
Event git.branch_heads.get​
Priority: 4
| Key | Description | Type | Default Value |
|---|---|---|---|
| meta | Meta properties for the message | N/A | None |
| passed | N/A | boolean | True |
| routing_key | N/A | string | git.branch_heads.get |
| data.fetched_at | N/A | N/A | None |
| data.unavailable_reason | N/A | N/A | None |
| data.warm_up_task_id | N/A | N/A | None |
| data.branches | N/A | array | None |
| data.error_message | N/A | N/A | None |
| errors | N/A | array | None |
| initial_message | Initial message in dict format, the primary goal of this field is to provide additional context when there is an error | N/A | None |
Git Commit Log​
Event git.commit_log.get​
Priority: 4
| Key | Description | Type | Default Value |
|---|---|---|---|
| meta | Meta properties for the message | N/A | None |
| passed | N/A | boolean | True |
| routing_key | N/A | string | git.commit_log.get |
| data.condition | N/A | N/A | None |
| data.remote_head | N/A | N/A | None |
| data.imported_commit | N/A | N/A | None |
| data.pending_count | N/A | N/A | None |
| data.fetched_at | N/A | N/A | None |
| data.unavailable_reason | N/A | N/A | None |
| data.warm_up_task_id | N/A | N/A | None |
| data.commits | N/A | array | None |
| data.error_message | N/A | N/A | None |
| errors | N/A | array | None |
| initial_message | Initial message in dict format, the primary goal of this field is to provide additional context when there is an error | N/A | None |
Git File​
Event git.file.get​
Priority: 4
| Key | Description | Type | Default Value |
|---|---|---|---|
| meta | Meta properties for the message | N/A | None |
| passed | N/A | boolean | True |
| routing_key | N/A | string | git.file.get |
| data.content | N/A | N/A | None |
| data.error_message | N/A | N/A | None |
| data.http_code | N/A | N/A | None |
| errors | N/A | array | None |
| initial_message | Initial message in dict format, the primary goal of this field is to provide additional context when there is an error | N/A | None |
Send Echo​
Event send.echo.request​
Priority: 5
| Key | Description | Type | Default Value |
|---|---|---|---|
| meta | Meta properties for the message | N/A | None |
| passed | N/A | boolean | True |
| routing_key | N/A | string | send.echo.request |
| data.response | The response string | string | |
| errors | N/A | array | None |
| initial_message | Initial message in dict format, the primary goal of this field is to provide additional context when there is an error | N/A | None |