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 bus event handling topic.
Messages events
Check Generator
Event check.generator.run
Description: A check that runs a generator.
Priority: 3
Key | Description | Type | Default Value |
---|---|---|---|
meta | Meta properties for the message | N/A | None |
generator_definition | The Generator definition | N/A | None |
generator_instance | The id of the generator instance if it previously existed | N/A | None |
commit | The commit to target | 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 |
branch_name | The branch where the check is run | string | None |
target_id | The ID of the target object for this generator | string | None |
target_name | Name of the generator target | string | None |
query | The name of the query to use when collecting data | string | None |
variables | Input variables when running the generator | object | None |
validator_id | The ID of the validator | string | None |
proposed_change | The unique ID of the Proposed Change | N/A | None |
context | The Infrahub context | N/A | None |
Event Branch
Event event.branch.merge
Description: Sent when a branch has been merged.
Priority: 5
Key | Description | Type | Default Value |
---|---|---|---|
meta | Meta properties for the message | N/A | None |
source_branch | The source branch | string | None |
target_branch | The target branch | string | None |
context | The context of the event | N/A | None |
Event Worker
Event event.worker.new_primary_api
Description: Sent on startup or when a new primary API worker is elected.
Priority: 3
Key | Description | Type | Default Value |
---|---|---|---|
meta | Meta properties for the message | N/A | None |
worker_id | The worker ID that got elected | string | None |
Finalize Validator
Event finalize.validator.execution
Description: Update the status of a validator after all checks have been completed.
Priority: 3
Key | Description | Type | Default Value |
---|---|---|---|
meta | Meta properties for the message | N/A | None |
validator_id | The id of the validator associated with this check | string | None |
validator_execution_id | The id of current execution of the associated validator | string | None |
start_time | Start time when the message was first created | string | None |
validator_type | The type of validator to complete | string | None |
context | The Infrahub context | N/A | None |
proposed_change | The ID of the proposed change | string | 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 |
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 |
Refresh Git
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 |
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 |
Request Generator Definition
Event request.generator_definition.check
Description: Sent to trigger Generators to run for a proposed change.
Priority: 3
Key | Description | Type | Default Value |
---|---|---|---|
meta | Meta properties for the message | N/A | None |
generator_definition | The Generator Definition | N/A | None |
branch_diff | The calculated diff between the two branches | N/A | None |
proposed_change | The unique ID of the Proposed Change | string | None |
source_branch | The source branch | string | None |
source_branch_sync_with_git | Indicates if the source branch should sync with git | boolean | None |
destination_branch | The target branch | string | None |
context | The Infrahub context | N/A | None |
Request Proposed Change
Event request.proposed_change.pipeline
Description: Sent request the start of a pipeline connected to a proposed change.
Priority: 5
Key | Description | Type | Default Value |
---|---|---|---|
meta | Meta properties for the message | N/A | None |
proposed_change | The unique ID of the proposed change | string | None |
source_branch | The source branch of the proposed change | string | None |
source_branch_sync_with_git | Indicates if the source branch should sync with git | boolean | None |
destination_branch | The destination branch of the proposed change | string | None |
check_type | Can be used to restrict the pipeline to a specific type of job | N/A | all |
context | The context of the task | N/A | None |
Event request.proposed_change.refresh_artifacts
Description: Sent trigger the refresh of artifacts that are impacted by the proposed change.
Priority: 3
Key | Description | Type | Default Value |
---|---|---|---|
meta | Meta properties for the message | N/A | None |
proposed_change | The unique ID of the Proposed Change | string | None |
source_branch | The source branch of the proposed change | string | None |
source_branch_sync_with_git | Indicates if the source branch should sync with git | boolean | None |
destination_branch | The destination branch of the proposed change | string | None |
branch_diff | The calculated diff between the two branches | N/A | None |
context | The context of the task | N/A | 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 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 | 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 |