[
https://issues.apache.org/jira/browse/NIFI-15954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18082520#comment-18082520
]
ASF subversion and git services commented on NIFI-15954:
--------------------------------------------------------
Commit d54864b63b2df37a5184685deb67570d82222eca in nifi's branch
refs/heads/main from Rob Fellows
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=d54864b63b2 ]
NIFI-15954 Honor property overrides when verifying Kafka Topics step (#11264)
KafkaToS3.verifyTopicsExists now reads the specified Topic Names list
from the overridden ConnectorConfigurationContext built from the verify
request, rather than from the persisted FlowContext, so a verification
request that narrows the selection is no longer evaluated against stale
persisted state.
> `KafkaToS3.verifyConfigurationStep` ignores property overrides when verifying
> `KafkaTopicsStep`, causing verify to fail against the persisted Topic Names
> list instead of the values supplied in the verification request.
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: NIFI-15954
> URL: https://issues.apache.org/jira/browse/NIFI-15954
> Project: Apache NiFi
> Issue Type: Bug
> Components: Core Framework
> Reporter: Rob Fellows
> Assignee: Rob Fellows
> Priority: Major
> Time Spent: 20m
> Remaining Estimate: 0h
>
> *Summary*
> `KafkaToS3.verifyConfigurationStep` ignores property overrides when verifying
> `KafkaTopicsStep`, causing verify to fail against the persisted Topic Names
> list instead of the values supplied in the verification request.
> *Description*
> When the NiFi UI submits a verification request for the `Kafka Topics`
> configuration step, the framework correctly merges the request's property
> overrides on top of the persisted configuration before invoking the
> connector. However, `KafkaToS3.verifyConfigurationStep` does not honor those
> overrides for the "verify topics exist" check — it reads `Topic Names`
> directly from the persisted `FlowContext`. As a result, any divergence
> between the persisted Topic Names and the topics the user is currently trying
> to verify (for example, after a topic has been deleted from Kafka and the UI
> has updated the multi-select to drop the now-orphaned value) is ignored, and
> the persisted list is verified instead.
> `verifyKafkaParsability` and `verifyKafkaConnectivity` are not affected
> because they consume the `VersionedExternalFlow` built from the overridden
> `ConnectorConfigurationContext`.
> *Steps to reproduce*
> 1. Start a local Kafka instance (e.g., `apache/kafka` in Docker) and create
> two topics, `demo-topic` and `nifi-topic`.
> 2. Configure a Kafka → S3 connector. In the `Kafka Topics` step, set `Topic
> Names` to `["demo-topic", "nifi-topic"]` and save the step.
> 3. Delete `nifi-topic` from Kafka: `kafka-topics.sh --delete --topic
> nifi-topic --bootstrap-server localhost:9092`.
> 4. In the UI, re-open the Kafka Topics step. The multi-select refreshes its
> allowable values, removes the now-orphaned `nifi-topic` from the form
> control, and the UI surfaces a caution banner indicating the strip.
> 5. Click *Verify*
> *Expected:* verification of `Topic Names` uses the values in the verify
> request (`["demo-topic"]`) and passes, since `demo-topic` still exists.
> *Actual:* verification fails with `The following topics do not exist in the
> Kafka cluster: nifi-topic`, because the persisted Topic Names list — not the
> request override — is being verified.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)