Skip to content

Impossible to update imported topics config #519

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

Open
ThomasCAI-mlv opened this issue Feb 17, 2025 · 0 comments
Open

Impossible to update imported topics config #519

ThomasCAI-mlv opened this issue Feb 17, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@ThomasCAI-mlv
Copy link
Collaborator

ThomasCAI-mlv commented Feb 17, 2025

Describe the bug

When a topic is created outside of ns4kafka, then is imported to ns4kafka with POST /api/namespaces/<namespace>/topics/_/import, this topic config (retention.ms, min.insync.replicas for example) cannot be updated with POST /api/namespaces/<namespace>/topics

Notes:

  1. The issue was found when the topic is created on Confluent Cloud. I don't know yet if it applies for self-hosted kafka clusters.
  2. We have the same issue when we try the delete-records endpoint on imported topics.

To Reproduce

  1. Create a namespace "myNamespace" with owner ACL on topic prefixed by "myNamespace."
  2. On Confluent Cloud, manually create a new topic "myNamespace.myTopic" with the default configurations.
  3. With ns4kafka, import the topics with the endpoint POST /api/namespaces/myNamespace/topics/_/import
  4. With ns4kafka, try to update the topic config with the endpoint POST /api/namespaces/myNamespace/topics and the following body:
{
	"apiVersion": "v1",
	"kind": "Topic",
	"metadata": {
		"name": "myNamespace.myTopic"
	},
	"spec": {
		"replicationFactor": 3,
		"partitions": 1,
		"configs": {
			"min.insync.replicas": "3",
			"cleanup.policy": "delete",
			"retention.ms": "86400000"
		}
	}
}

The API call failed with 500 Internal Servor Error: Cannot invoke \"String.equals(Object)\" because the return value of \"java.util.Map.get(Object)\" is null

Environment:

  • Kafkactl distribution and version: not relevant
  • Ns4Kafka version: v1.14.0
  • Kafka broker type and version Apache Kafka 3.8 / Confluent Platform 7.8

Steps taken to try and solve the problem

To bypass delete-records, the topic can be deleted then recreated through ns4kafka. But for topic update, I don't think we have any workaround except fixing the bug in ns4kafka directly.

@ThomasCAI-mlv ThomasCAI-mlv added the bug Something isn't working label Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant