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

Add more verbose output about kafka schema compatibility #200

Open
hklasa opened this issue Apr 8, 2020 · 3 comments
Open

Add more verbose output about kafka schema compatibility #200

hklasa opened this issue Apr 8, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@hklasa
Copy link

hklasa commented Apr 8, 2020

Hello.

Currently we are facing with the issue in CI/CD that terrafrorm produce following log:

Error: kafka schema is not compatible with version :4

  on .terraform/modules/kafka_data/modules/service_kafka_data/main.tf line 36, in resource "aiven_kafka_schema" "this":
  36: resource "aiven_kafka_schema" "this" {



Error: kafka schema is not compatible with version :4

  on .terraform/modules/kafka_data/modules/service_kafka_data/main.tf line 36, in resource "aiven_kafka_schema" "this":
  36: resource "aiven_kafka_schema" "this" {

We cannot fastly determine which schema is not compatible with Aiven schema registry. Can you add more verbose output to this error log with an information about schema subject?

@ivan-savciuc
Copy link
Contributor

Hello,

It looks like there is no error in your case coming from the Aiven API which may help to understand a compatibility issue - more can be found here https://github.com/aiven/aiven-go-client/blob/master/kafka_schemas.go#L227

If we do have an error message coming from Aiven API response on an attempt to add a new Kafka Schema TF users should see that, but there is none in your case.

I will have a look if we have another API endpoint or any way to provide more information regarding schema compatibility issues.

@ivan-savciuc ivan-savciuc self-assigned this Apr 14, 2020
@ivan-savciuc ivan-savciuc added the enhancement New feature or request label Apr 14, 2020
@ivan-savciuc
Copy link
Contributor

After testing Aiven API Kafka Schema validation endpoint, it looks it sends back an error with explanation only in the situation when a user tries to send a broken Avro format and responds with 500 HTTP. But when a user tries to send an incompatible schema, it returns only a boolean compatibility flag, and in case it is false TF users see that generic error message Kafka schema is not compatible with version: %n.

I created a ticket to improve this situation in our internal issue tracker, unfortunately, cannot give you a link. No changes in TF provider itself are necessary, and when this feature will out, all users will immediately benefit from it.

@hklasa
Copy link
Author

hklasa commented Apr 20, 2020

Thank you, Ivan. I am looking forward for news regarding this enhancement.

@ivan-savciuc ivan-savciuc removed their assignment May 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants