-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automatic loading of namespaced custom components (#500)
- Loading branch information
Showing
54 changed files
with
428 additions
and
529 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
kafka_brokers: "http://k8kafka-cp-kafka-headless.kpops.svc.cluster.local:9092" | ||
components_module: tests.pipeline.test_components | ||
pipeline_base_dir: tests/pipeline |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# Migrate from V6 to V7 | ||
|
||
## [Automatic loading of namespaced custom components](https://github.com/bakdata/kpops/pull/500) | ||
|
||
KPOps is now distributed as a Python namespace package (as defined by [PEP 420](https://peps.python.org/pep-0420/)). This allows us to standardize the namespace `kpops.components` for both builtin and custom pipeline components. | ||
|
||
As a result of the restructure, some imports need to be adjusted: | ||
|
||
**KPOps Python API** | ||
|
||
```diff | ||
-import kpops | ||
+import kpops.api as kpops | ||
``` | ||
|
||
**builtin KPOps components** | ||
|
||
```diff | ||
-from kpops.components import ( | ||
- HelmApp, | ||
- KafkaApp, | ||
- KafkaConnector, | ||
- KafkaSinkConnector, | ||
- KafkaSourceConnector, | ||
- KubernetesApp, | ||
- StreamsBootstrap, | ||
- ProducerApp, | ||
- StreamsApp, | ||
- PipelineComponent, | ||
- StreamsApp, | ||
- ProducerApp, | ||
-) | ||
+from kpops.components.base_components import ( | ||
+ HelmApp, | ||
+ KafkaApp, | ||
+ KafkaConnector, | ||
+ KafkaSinkConnector, | ||
+ KafkaSourceConnector, | ||
+ KubernetesApp, | ||
+ PipelineComponent, | ||
+) | ||
+from kpops.components.streams_bootstrap import ( | ||
+ StreamsBootstrap, | ||
+ StreamsApp, | ||
+ ProducerApp, | ||
+) | ||
``` | ||
|
||
### your custom KPOps components | ||
|
||
#### config.yaml | ||
|
||
```diff | ||
-components_module: components | ||
``` | ||
|
||
#### Python module | ||
|
||
```diff | ||
-components/__init__.py | ||
+kpops/components/custom/__init__.py | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.