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

Fixing behavior when topic options update is ignored #173

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions module_utils/kafka_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1499,16 +1499,17 @@ def get_topics_to_update(self, topics):
topic['name']
)
)
topics = [
topic for topic in topics if (
topic['partitions'] > 0 and topic['replica_factor'] > 0)
]
topics_changed.update(
self.is_topics_configuration_need_update({
topic['name']: topic['options'].items()
for topic in topics
})
)

topics = [
topic for topic in topics if (
topic['partitions'] > 0 and topic['replica_factor'] > 0)
]
topics_changed.update(
self.is_topics_replication_need_update({
topic['name']: {
Expand Down Expand Up @@ -1546,10 +1547,6 @@ def ensure_topics(self, topics):
)
)

topics = [
topic for topic in topics if (
topic['partitions'] > 0 and topic['replica_factor'] > 0)
]

topics_config_need_update = self.is_topics_configuration_need_update({
topic['name']: topic['options'].items()
Expand All @@ -1563,6 +1560,10 @@ def ensure_topics(self, topics):
})
topics_changed.update(topics_config_need_update)

topics = [
topic for topic in topics if (
topic['partitions'] > 0 and topic['replica_factor'] > 0)
]
topics_replication_need_update = \
self.is_topics_replication_need_update({
topic['name']: {
Expand Down
Loading