Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fan-out integration] new SDK #38

Closed
migmartri opened this issue Mar 16, 2023 · 2 comments
Closed

[fan-out integration] new SDK #38

migmartri opened this issue Mar 16, 2023 · 2 comments

Comments

@migmartri
Copy link
Member

migmartri commented Mar 16, 2023

UPDATE

This effort has evolved into creating a custom SDK for extensions that can be found here https://github.com/chainloop-dev/chainloop/tree/main/app/controlplane/extensions

NOTE: We should make sure that whatever design we make here meets also this #28 other effort.

Currently, adding a third party integration requires changes in many places in the control-plane codebase as described here #37 (comment). In short it requires changes is pretty much every layer of the application, a) api proto changes, b) biz/use-cases changes and of course c) actual integration code.

c) is the only part that's clearly defined with interfaces

type Checker interface {
// Validate that the integration can be registered for future calls
Validate(ctx context.Context) error
}
type Doer interface {
Do(ctx context.Context) error
// Validate that the integration can be performed with the parameters provided
Validate(ctx context.Context) error
}

The other two changes are currently custom and per-integration.

The goal of this effort is to design an architecture where adding a new integration just requires such custom code to implement some interfaces, custom code that should probably live in https://github.com/chainloop-dev/chainloop/tree/e770faeeed854cfcff45a06100f9a2eef57d779a/app/controlplane/internal/integrations

Some goals

  • These new interfaces should cover the "registration" and "attachment" use cases
  • We should aim to no code changes required for a new attestation in the biz, service or API layer

Tasks

No tasks being tracked yet.
@migmartri migmartri changed the title abstract / define third party integration interface [fan-out integrations] abstract / define third party integration interface Mar 16, 2023
@migmartri migmartri changed the title [fan-out integrations] abstract / define third party integration interface [fan-out integration] abstract / define third party integration interface Mar 16, 2023
@migmartri migmartri changed the title [fan-out integration] abstract / define third party integration interface [fan-out integration] abstract / define integration interface Mar 16, 2023
@migmartri migmartri self-assigned this May 10, 2023
@migmartri
Copy link
Member Author

A WIP code for the dispatcher codo can be found here https://github.com/migmartri/chainloop/pull/1/files

@migmartri
Copy link
Member Author

Our latest release contains all the sdk changes and new plugins https://github.com/chainloop-dev/chainloop/releases/tag/v0.11.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant