-
Notifications
You must be signed in to change notification settings - Fork 75
Feature/20260115 improvements #402
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…eter_context - Fix prepare_parameter to properly unset parameter values using value_removed flag - Previously, passing None or omitting value could result in empty string or null instead of actually removing the parameter value - Add _NOT_PROVIDED sentinel to distinguish omitted value from explicit None - prepare_parameter now correctly handles: omit (preserve existing), None (remove), empty string (set to ""), or value (set) - Add rename_parameter_context() for lightweight context renaming - Use config.long_max_wait for update_parameter_context timeout - Include description in get_parameter_ownership_map output - Add comprehensive tests for new functionality
- Add descendants=True parameter to filter bulletins by process group hierarchy - When True (default), includes bulletins from all child process groups - When False, only returns bulletins from components directly in the specified PG - Builds regex pattern of all PG IDs for efficient API filtering
- Add greedy and identifier_type parameters for flexible PG resolution - Supports UUID, name, or ProcessGroupEntity as pg_id input - Uses resolve_entity for consistent behavior with other canvas functions
…letins - Add flowfiles_in/out, bytes_in/out, bytes_read/written stats - Use descendants=True for bulletin collection to match processor/controller scope - Update docstring to document bulletin counts
- Batch all parameters per context into single update_parameter_context call - Avoids multiple stop/disable/update/enable/restart cycles per parameter - Preserve parameter descriptions during updates - Add tests for empty string and None value handling
- Document that port-to-port connections use larger queue boxes (240 vs 224) - Clarify existing QUEUE_BOX_WIDTH is for processor-to-processor connections
- CLI now exits with code 1 when result dict contains 'error' or 'errors' key - Update cleanup.py: change 'message' to 'error' for failure cases - Update verify_config.py: add 'error' key with failed component names - Add tests for error key detection and exit code behavior - Document error field convention in cli.rst and ci.rst for CI authors This enables scripts to rely on exit codes for operational failures, not just Python exceptions. CI functions should include an 'error' key when operations fail to trigger non-zero exit.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #402 +/- ##
==========================================
+ Coverage 76.51% 76.63% +0.11%
==========================================
Files 41 41
Lines 4739 4780 +41
==========================================
+ Hits 3626 3663 +37
- Misses 1113 1117 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ottobackwards
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine to me. My one set of feedback is that the field names of all these return values, and the parameter checks for specific values etc that are strings should be either constants or string enums ( if there is a specific valid set of values ).
This can be a follow on.
| result["queued_flowfiles"] = str(agg.flow_files_queued or 0) | ||
| result["queued_bytes"] = str(agg.bytes_queued or 0) | ||
| result["active_threads"] = str(agg.active_thread_count or 0) | ||
| # Throughput stats (cumulative over stats retention period, typically 5 min) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of raw strings, all these standard result fields should be constants
nipyapi 1.4.0
Status: Ready for review
Summary
CLI exit code standardization, bulletins descendants filtering, batch parameter updates, and enhanced status reporting.
Breaking Changes
None - all changes are backward compatible.
CLI Improvements
Standardized error exit codes - CLI now exits with code 1 when result contains
errororerrorskey:Previously, operational failures (e.g., verification failed) returned exit 0 with failure info in JSON. Now they return exit 1.
Error field convention documented for CI function authors - include
errorkey for failures.New Features
bulletinsget_bulletin_board(descendants=True)canvaslist_all_controllers(greedy, identifier_type)ciget_status()throughput statsparameterslist_orphaned_contexts()parametersrename_parameter_context()layoutPORT_QUEUE_BOX_WIDTHPerformance
Batch parameter updates -
configure_inherited_params()now batches all parameters per context into a single API call, avoiding multiple stop/disable/update/enable/restart cycles.Bug Fixes
value=Nonevs omitted valuecleanup()andverify_config()now useerrorkey for failures (CLI exit code support)Documentation
Nonevs""vs omitted)Commits
Testing
All 682 tests pass against NiFi 2.7.2 single-user profile.