Skip to content

NIFI-14233: Fix PropertyDependency bug in Python processor with imported shared properties#10078

Closed
hsahu-ksolves123 wants to merge 10 commits intoapache:mainfrom
hsahu-ksolves123:NIFI-14233-fix-python-dependency
Closed

NIFI-14233: Fix PropertyDependency bug in Python processor with imported shared properties#10078
hsahu-ksolves123 wants to merge 10 commits intoapache:mainfrom
hsahu-ksolves123:NIFI-14233-fix-python-dependency

Conversation

@hsahu-ksolves123
Copy link

@hsahu-ksolves123 hsahu-ksolves123 commented Jul 9, 2025

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

  1. Updated resolve_dependencies() in ProcessorInspection.py to:

  2. Check module_string_constants if the property is not found in discovered_property_descriptors.

  3. Gracefully skip unresolved properties while logging a warning.

  4. Ensures processors that rely on shared or imported properties resolve without crashing.

Related Tickets

  1. Closes: NIFI-14233

  2. Closes: NIFI-14368

Testing

  1. Added test processors that import shared property descriptors from external modules.
  2. Verified that property dependencies are resolved correctly without KeyError.
  3. Confirmed that unresolved optional properties are skipped with appropriate logs.

Tracking
Issue Tracking
Apache NiFi Jira issues created

Pull Request Tracking

  1. Pull request title starts with Apache NiFi Jira issue number (e.g., NIFI-14233)
  2. Commit message starts with Jira issue number (e.g., NIFI-14233)

Pull Request Formatting

  1. Based on current revision of the main branch
  2. PR refers to a feature branch with one commit containing changes

Documentation

  1. No documentation changes required
  2. Code comments and logging updated appropriately

Copy link
Contributor

@exceptionfactory exceptionfactory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants