Skip to content

KAFKA-20751: Preserve available versions for cached connector plugin validation failures#22712

Open
majialoong wants to merge 1 commit into
apache:trunkfrom
majialoong:KAFKA-20751
Open

KAFKA-20751: Preserve available versions for cached connector plugin validation failures#22712
majialoong wants to merge 1 commit into
apache:trunkfrom
majialoong:KAFKA-20751

Conversation

@majialoong

Copy link
Copy Markdown
Contributor

Preserve the available plugin versions stored in cached connector plugin validation failures.

This keeps repeated validation of an unavailable connector.plugin.version consistent with the initial validation response and avoids an NPE in the cached failure path.

@github-actions github-actions Bot added triage PRs from the community connect labels Jun 30, 2026
@majialoong

Copy link
Copy Markdown
Contributor Author

Before this change, validating the same unavailable connector plugin version twice could return a 500/NPE response instead of the normal validation result.

Request:

http://localhost:8083/connector-plugins/org.apache.kafka.connect.file.FileStreamSinkConnector/config/validate

{
    "connector.class": "org.apache.kafka.connect.file.FileStreamSinkConnector",
    "connector.plugin.version": "2.0.1", // unavailable connector plugin version
    "tasks.max": "1",
    "topics": "test"
}

The second request will receive the following response:

{
    "error_code": 500,
    "message": "java.lang.NullPointerException: Cannot invoke \"java.util.List.stream()\" because the return value of \"org.apache.kafka.connect.runtime.isolation.VersionedPluginLoadingException.availableVersions()\" is null"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-approved connect triage PRs from the community

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants