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

feat: add Ksql warning to KsqlResource response when CommandRunner degraded #6039

Merged

Conversation

stevenpyzhang
Copy link
Member

@stevenpyzhang stevenpyzhang commented Aug 17, 2020

ksql> show streams;

 Stream Name         | Kafka Topic                 | Format 
------------------------------------------------------------
 KSQL_PROCESSING_LOG | default_ksql_processing_log | JSON   
 TEST                | TEST                        | JSON   
 TEST1               | TEST1                       | JSON   
------------------------------------------------------------
WARNING: The server has encountered an incompatible entry in its log and cannot process further DDL statements.
This is most likely due to the service being rolled back to an earlier version.

Done by adding a KsqlWarning to the existing warnings list for each KsqlEntity returned from the server.

Alternatively, we could just add a separate WarningEntity to the KsqlEntityList returned from the server instead of modifying each KsqlEntity.
https://github.com/confluentinc/ksql/blob/453125c87f8538f80029278f323c2c193870fa85/ksqldb-rest-model/src/main/java/io/confluent/ksql/rest/entity/WarningEntity.java

Testing done

Manual and unit test

Reviewer checklist

  • Ensure docs are updated if necessary. (eg. if a user visible feature is being added or changed).
  • Ensure relevant issues are linked (description should include text like "Fixes #")

@stevenpyzhang stevenpyzhang force-pushed the ksql-warning-degraded branch from 6a0cab8 to d51287c Compare August 20, 2020 21:05
@stevenpyzhang stevenpyzhang marked this pull request as ready for review August 20, 2020 21:06
@stevenpyzhang stevenpyzhang requested a review from a team as a code owner August 20, 2020 21:06
Copy link
Contributor

@agavra agavra left a comment

Choose a reason for hiding this comment

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

LGTM - I think it makes sense to add this to every statement so that it's clear what's going on. Might want to get one more opinion on this (perhaps from product)

@stevenpyzhang stevenpyzhang merged commit 6d547da into confluentinc:master Aug 26, 2020
sarwarbhuiyan pushed a commit to sarwarbhuiyan/ksql that referenced this pull request Sep 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants