Rob Fellows created NIFI-15954:
----------------------------------

             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.
                 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


*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)

Reply via email to