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

[Merged by Bors] - feat: support custom configs in connector SDK #2910

Conversation

galibey
Copy link
Contributor

@galibey galibey commented Dec 29, 2022

connector macro will support any custom configs for connectors.

It is done in the following way:

  1. Config file is read and parsed to serde_yaml::Value.
  2. ConnectorConfig is parsed from the yaml value and used to initialize Producer/Consumer.
  3. User-defined config is parsed from the yaml value and passed to the user-defined function.

Validation on the deployer side is done only for ConnectorConfig type.

Each connector will be responsible for the validation of its own configs.

@galibey galibey self-assigned this Dec 29, 2022
@galibey galibey added this to the 0.10.4 milestone Dec 29, 2022
@galibey galibey requested review from sehz and morenol December 29, 2022 18:57
@galibey galibey requested a review from simlay December 30, 2022 10:25
@galibey
Copy link
Contributor Author

galibey commented Jan 5, 2023

Added an ability to specify the custom configuration in connector package metadata. OpenApi spec is used, so complex objects can be defined as well. The validation honors this specification.

@galibey galibey requested a review from sehz January 5, 2023 16:29
Copy link
Contributor

@sehz sehz left a comment

Choose a reason for hiding this comment

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

LGTM. Great work!

@galibey
Copy link
Contributor Author

galibey commented Jan 5, 2023

bors r+

bors bot pushed a commit that referenced this pull request Jan 5, 2023
`connector` macro will support any custom configs for connectors.

It is done in the following way:
1. Config file is read and parsed to `serde_yaml::Value`.
2. `ConnectorConfig` is parsed from the yaml value and used to initialize Producer/Consumer.
3. User-defined config is parsed from the yaml value and passed to the user-defined function.

Validation on the deployer side is done only for `ConnectorConfig` type.

Each connector will be responsible for the validation of its own configs.
@bors
Copy link

bors bot commented Jan 5, 2023

Build failed:

@galibey
Copy link
Contributor Author

galibey commented Jan 5, 2023

bors r+

bors bot pushed a commit that referenced this pull request Jan 5, 2023
`connector` macro will support any custom configs for connectors.

It is done in the following way:
1. Config file is read and parsed to `serde_yaml::Value`.
2. `ConnectorConfig` is parsed from the yaml value and used to initialize Producer/Consumer.
3. User-defined config is parsed from the yaml value and passed to the user-defined function.

Validation on the deployer side is done only for `ConnectorConfig` type.

Each connector will be responsible for the validation of its own configs.
@bors
Copy link

bors bot commented Jan 5, 2023

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat: support custom configs in connector SDK [Merged by Bors] - feat: support custom configs in connector SDK Jan 5, 2023
@bors bors bot closed this Jan 5, 2023
@galibey galibey deleted the feat/support-custom-config-in-connector-sdk branch January 5, 2023 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants