Skip to content

Commit

Permalink
Update files
Browse files Browse the repository at this point in the history
  • Loading branch information
raminqaf committed Jul 15, 2024
1 parent e3cea1e commit a68691f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
18 changes: 8 additions & 10 deletions docs/docs/user/migration-guide/v6-v7.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,21 +71,19 @@ During migrating to v7, you should check your custom components and see if they

#### components.py

For example, when creating a custom `StreamsApp` or `ProducerApp`, you **must** call the supermethod `rest/clean` to execute the `destroy` in the parent class. **Otherwise, the logic of destroy will not be executed!**
For example, when creating a custom `StreamsApp` or `ProducerApp` (or any other custom component), you **must** call the supermethod `rest/clean` to execute the `destroy` in the parent class. **Otherwise, the logic of destroy will not be executed!**

```diff
````diff
class MyStreamsApp(StreamsApp):

@override
async def clean(self, dry_run: bool) -> None:
+ await super().clean(dry_run)
# Some custom clean logic
# ...
```

If you implement the `PipelineComponent` you **must** call the `destroy` method inside the `clean` method.

```diff
```diff


class MyCustomComponent(PipelineComponent):

@override
Expand All @@ -95,7 +93,7 @@ class MyCustomComponent(PipelineComponent):

@override
async def clean(self, dry_run: bool) -> None:
+ await self.destroy(dry_run)
+ await super().clean(dry_run)
# Some custom clean logic
# ...
```
````
5 changes: 1 addition & 4 deletions kpops/components/streams_bootstrap/producer/producer_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,7 @@ def helm_chart(self) -> str:
return f"{self.repo_config.repository_name}/{AppType.PRODUCER_APP.value}"

async def reset(self, dry_run: bool) -> None:
"""Not supported. Producer App cannot be reset.
The producer app doesn't have consumer group offsets to be reset.
"""
"""Reset not necessary, since producer app has no consumer group offsets."""
await super().reset(dry_run)

@override
Expand Down

0 comments on commit a68691f

Please sign in to comment.