Skip to content

feat(third-party-integrations): generic dispatcher - #142

Merged
migmartri merged 15 commits into
chainloop-dev:mainfrom
migmartri:dispatcher
Jun 6, 2023
Merged

feat(third-party-integrations): generic dispatcher#142
migmartri merged 15 commits into
chainloop-dev:mainfrom
migmartri:dispatcher

Conversation

@migmartri

Copy link
Copy Markdown
Member

Continuation of #38

TLDR; The server side integrations code is now fully generic and decoupled from the dependency-track implementation. It also works for attestation-based integrations which we expect to implement soon #28

It defines a generic dispatcher (and removes previous dependency-track specific code).

The fanout dispatcher is called when an attestation is received and performs two phases

1 - Integrations configuration preparation (integrationsMap)

  • Load the integration attached to the workflow
  • Calculate what kind of inputs these want, material type (i.e CDX SBOM) or attestation (thanks to this refactor(integrations): dynamic integrations loader #141)
  • For each one it makes sure to collect all the context required for a plugin to be executed. Registration and attachment configurations, credentials and the actual input)

2 - Attestation analysis, materials extraction and integration execution

The next step is for the dispatcher to analyze the kind of materials is contained in the received attestation and match them with the previously computed map.

migmartri added 14 commits June 1, 2023 22:17
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
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 682eb17 into chainloop-dev:main Jun 6, 2023
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.

2 participants