Migrate from V6 to V7¶
Automatic loading of namespaced custom components¶
KPOps is now distributed as a Python namespace package (as defined by PEP 420). 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
builtin KPOps components
your custom KPOps components¶
config.yaml¶
Python module¶
Rename app field¶
The app attribute of the builtin KPOps components has been renamed to better differentiate them. Both your pipeline.yaml and defaults.yaml files have to be updated, e.g.:
defaults.yaml¶
Call destroy from inside of reset or clean¶
Before v7, the KPOps CLI executed destroy before running reset/clean to ensure the component was destroyed.
This logic has changed. The destroy method is now called within the PipelineComponent's reset/clean.
During migrating to v7, you should check your custom components and see if they override the reset/clean methods. If so, you need to call the supermethod reset/clean to trigger the destroy inside the parent class. Alternatively, if you are implementing the PipelineComponent class, you need to call the destroy method at the beginning of the method.
components.py¶
For example, when creating a custom StreamsApp or ProducerApp (or any other custom component), you must call the supermethod reset/clean to execute the destroy in the parent class. Otherwise, the logic of destroy will not be executed!