hsahu-ksolves123 opened a new pull request, #10206:
URL: https://github.com/apache/nifi/pull/10206

   **## Summary**
   Fixes NIFI-14233 where using imported PropertyDescriptor in 
PropertyDependency causes KeyError crashes in NiFi 2.1.0+.
   
   **## Problem**
   - `PropertyDependency(IMPORTED_PROPERTY, ["value"])` crashes with KeyError
   - `resolve_dependencies()` method only handled local properties (ast.Name 
nodes)  
   - Imported properties (ast.Attribute nodes) caused system crashes
   - Regression from working NiFi 2.0.0 behavior
   
   **## Solution**
   - Enhanced `resolve_dependencies()` to handle `ast.Attribute` nodes for 
imported properties
   - Added dual property lookup: `discovered_property_descriptors` + 
`module_string_constants`
   - Replaced crashes with graceful warning logs
   - Maintains full backward compatibility
   
   **## Testing**
   - Full NiFi build passes (38+ min build time)
   -  Added test case verifying ast.Attribute node handling
   -  Python syntax validation successful  
   -  No breaking changes to existing functionality
   
   **## Files Changed**
   - `ProcessorInspection.py` - Enhanced dependency resolution method
   - `test_fix.py` - Verification test for the fix
   
   This restores the ability to use imported PropertyDescriptor objects in 
PropertyDependency definitions, enabling better code reusability in Python 
processors.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to