NIFI-14233: Fix PropertyDependency bug in Python processor with imported shared properties#10078
NIFI-14233: Fix PropertyDependency bug in Python processor with imported shared properties#10078hsahu-ksolves123 wants to merge 10 commits intoapache:mainfrom
Conversation
…ted shared properties
…ework-bundle/nifi-python-extension-api/src/main/python/src/nifiapi/__jvm__.py
…ework-bundle/nifi-python-extension-api/src/main/python/src/nifiapi/jvm.py
exceptionfactory
left a comment
There was a problem hiding this comment.
Thanks for following up on this issue @hsahu-ksolves123. However, all tests automated tests failing, with the exception of Windows, which does not run the Python tests.
At minimum, the __jvm__.py file cannot be removed. All new Python files need standard license headers, as included in existing Python files. All commits for the pull request branch should be squashed into a single commit.
Please review the Pull Request checklist and ensure the GitHub Actions run successfully. This can be checked in your own fork of Apache NiFi by enabling Actions on your fork.
The pull request checklist boxes should be filled in with an X indicating you have completed these steps. Including the detailed summary is helpful, and that can be included in addition to the checklist. After following these steps, then consider resubmitting the pull request.
Summary
Fixes a bug where Python processor PropertyDependency resolution failed if a PropertyDescriptor was imported from another module (e.g., shared_props.py), resulting in a KeyError.
Fix
Updated resolve_dependencies() in ProcessorInspection.py to:
Check module_string_constants if the property is not found in discovered_property_descriptors.
Gracefully skip unresolved properties while logging a warning.
Ensures processors that rely on shared or imported properties resolve without crashing.
Related Tickets
Closes: NIFI-14233
Closes: NIFI-14368
Testing
Tracking
Issue Tracking
Apache NiFi Jira issues created
Pull Request Tracking
Pull Request Formatting
Documentation