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

Modify schemas outside of terraform and provider recognizing diff #17

Open
ekeric13 opened this issue May 26, 2022 · 1 comment
Open

Comments

@ekeric13
Copy link

Currently this provider works well for avro schemas that I only modify via terraform.

But if I make modifications outside of terraform it doesn't recognize them.

For example I created a new schema via the kafka api and it said there were no changes made:

Acquiring state lock. This may take a few moments...
schemaregistry_schema.heartbeat_v1: Refreshing state... [id=heartbeat_v1]

No changes. Your infrastructure matches the configuration.

I also deleted my existing schema via the kafka api and instead of trying to create a new one it gives me this error:

Acquiring state lock. This may take a few moments...
schemaregistry_schema.heartbeat_v1: Refreshing state... [id=heartbeat_v1]
╷
│ Error: 404 Not Found: Subject 'heartbeat_v1' not found. io.confluent.rest.exceptions.RestNotFoundException: Subject 'heartbeat_v1' not found.
│ io.confluent.rest.exceptions.RestNotFoundException: Subject 'heartbeat_v1' not found.
│ 	at io.confluent.kafka.schemaregistry.rest.exceptions.Errors.subjectNotFoundException(Errors.java:77)
│ 	at io.confluent.kafka.schemaregistry.rest.resources.SubjectVersionsResource.getSchemaByVersion(SubjectVersionsResource.java:141)
│ 	at jdk.internal.reflect.GeneratedMethodAccessor17.invoke(Unknown Source)
│ 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
│ 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
│ 	at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:52)
@belint01
Copy link

It happened to me that entry in schema registry has been deleted and created during terraform apply but eventually terraform execution failed because of some other unrelated reason. Every subsequent terraform apply was failing because schemaregistry provider couldn't refresh the state saying:

Subject 'foo' not found. io.confluent.rest.exceptions.RestNotFoundException: Subject 'foo' not found.
io.confluent.rest.exceptions.RestNotFoundException: Subject 'foo' not found.

It looks that schemaregistry provider is able to break the state on his own

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

No branches or pull requests

2 participants