Skip to content

feat(integrations): new dispatcher mode - #206

Merged
migmartri merged 4 commits into
chainloop-dev:mainfrom
migmartri:dispatcher-3
Jun 26, 2023
Merged

feat(integrations): new dispatcher mode#206
migmartri merged 4 commits into
chainloop-dev:mainfrom
migmartri:dispatcher-3

Conversation

@migmartri

@migmartri migmartri commented Jun 23, 2023

Copy link
Copy Markdown
Member

Updates the dispatcher and sdk to enable aggregated mode, more on that here #205

The summary of the change would be

  • Now an attached integration gets called only once, with all the materials in their parameters.
  • There is no need to indicate in the plugin that you want to receive the attestation envelope, you'll always get that.

247920281-271806e0-e323-4c89-b170-c89411072aae

This makes the execution mode conceptually easier to understand and explain. An integration will be called each time an attestation is received, and it might contain some materials of the type you've subscribed to.

re: dispatcher changes

The code has been simplified by following a hydration pattern where we make a queue of possible dispatches go through a series of hydration steps, 1) initialize queue and with integration configurations from the DB, 2) add attestation and material information, 3) add chainloop metadata and 4) dispatch

This new mode enables developers for example to be able to send the materials they care alongside the attestation at once, see example of a discord POC below

image

Closes #205

Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
@migmartri
migmartri requested a review from danlishka June 23, 2023 14:11
@migmartri
migmartri marked this pull request as draft June 23, 2023 14:15
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
@migmartri
migmartri marked this pull request as ready for review June 23, 2023 15:10
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>

@danlishka danlishka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@migmartri
migmartri merged commit 860e31e into chainloop-dev:main Jun 26, 2023
@migmartri
migmartri deleted the dispatcher-3 branch June 26, 2023 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fanout-dispatcher aggregation mode

2 participants