Repository navigation
feat: NiFi 2.12.0 support and parameter provider helpers - #415
Merged
Merged
Conversation
Supported versions and generated clients - Bump the tested NiFi/Registry version to 2.12.0 and regenerate both clients; the generated surface change is additive. - Validate map enum values rather than keys, accept unset sensitivities, add STATELESS_GROUP to AffectedComponentEntity, and add a Configuration.client_side_validation switch. Parameter providers and contexts - Add provider discovery, type lookup, property updates, fetch, apply and combined fetch/apply helpers. Apply keeps staged sensitivity and synchronized choices unless overridden, defaults unset ones as NiFi does, rejects unknown parameter names, and warns when no group is synchronized. - Add ordered inheritance updates, bound-context lookup, and connecting a provider-created context with local sensitive aliases. Connect keeps an already inherited source in place unless a higher context shadows a mapped name, rejects non-sensitive sources and keeps alias descriptions. - Add list/get for controller-level management services. Behaviour and consistency - Share async request completion and cleanup in utils.wait_for_request: completed requests are deleted, failures raise, and timeouts or interruptions no longer cancel the server-side request. - refresh stays on provider operations that submit the supplied revision; inheritance and connect helpers always re-read their target. - get_process_group returns None for a missing ID, like the other getters. - ensure_management_controller no longer adopts a process-group service. - Correct the get_controller docstring. - Retire version guards for NiFi releases older than 2.0. Generated with [Snowflake CoCo](https://docs.snowflake.com/en/user-guide/cortex-code/cortex-code) Co-authored-by: Snowflake CoCo <noreply@snowflake.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #415 +/- ##
==========================================
+ Coverage 77.24% 78.27% +1.03%
==========================================
Files 41 41
Lines 4966 5115 +149
==========================================
+ Hits 3836 4004 +168
+ Misses 1130 1111 -19 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Remove the AffectedComponentEntity STATELESS_GROUP augmentation: the value has not been observed from a live server, and the upstream schema fix is already proposed. Regenerating without it changes only that enum list. Also remove a REST diagnostics test that covered behaviour this change does not touch. Generated with [Snowflake CoCo](https://docs.snowflake.com/en/user-guide/cortex-code/cortex-code) Co-authored-by: Snowflake CoCo <noreply@snowflake.com>
Add live tests for get_management_controller with a missing ID, duplicate names in ensure_management_controller, and argument validation in the parameter helpers. Remove a connect check for braces in source parameter names: NiFi only allows [A-Za-z0-9 ._-] and the names must already exist, so it could never trigger. Generated with [Snowflake CoCo](https://docs.snowflake.com/en/user-guide/cortex-code/cortex-code) Co-authored-by: Snowflake CoCo <noreply@snowflake.com>
ottobackwards
approved these changes
Oct 20, 2026
Collaborator
|
If we change behavior of functions and or / return values we'll have to make sure the version bump is appropriate |
…tive Release notes: date 1.8.0 as 2026-10-22 and add a Behaviour Changes section listing every existing function whose behaviour or return value changes, led by get_process_group returning None for a missing ID. Simplify the documented CLI form for fetch_and_apply_parameter_provider. Makefile: - dist, wheel, sdist and install clean only build output; they no longer delete test certificates or coverage reports. - Certificate removal moves to a new clean-certs target, run by clean-all. - check-dist and test-dist reuse an existing build instead of rebuilding, and still build when dist/ is empty (as CI relies on). - Generated-code removal moves to clean-generated. rebuild-all runs it just before gen-clients, because wait-ready imports nipyapi and failed once clean-all had removed the clients. - rebuild-all no longer augments the specs twice. - Mark the clean and build targets .PHONY (dist/ and docs/ are real directories).
The CI checkout was shallow and had no tags, so setuptools-scm versioned the wheel built by make test-dist as 0.0.1.dev1+unknown. This has been true on main as well, not only on this branch. Fetch full history and tags in that job, and make test_distribution.py fail on a fallback version so a mis-versioned build can no longer pass. Move the actions to their Node 24 majors: checkout v5, setup-python v6, codecov v5 (we already use `files`) and setup-buildx v4 (we pass no removed inputs). Pin jobs to ubuntu-24.04, because setup-python has no Python 3.9 build for Ubuntu 26.04, which ubuntu-latest is moving to.
The CI jobs only check out code and run tests; Codecov and the registry tests use their own secrets. Declaring the permissions resolves the CodeQL actions/missing-workflow-permissions findings.
checkout v7, setup-python v7 and codecov-action v7. codecov v5 pinned a Node 20 build of actions/github-script internally; v6+ pins Node 24. None of the intervening breaking changes affect this workflow: no pull_request_target, no pip-install input, no post-checkout git credentials.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Uplifts nipyapi to NiFi/Registry 2.12.0 and adds generic helpers for parameter providers, context inheritance and controller-level services. Along the way, a few existing helpers are aligned with library conventions. This PR also carries the 1.8.0 release prep. Full details are in
docs/history.rst(1.8.0, dated 2026-10-22) anddocs/parameters.rst.Version: 1.8.0 is a minor bump over 1.7.0. No public function is removed and no signature changes, but some existing functions change behaviour. They are listed under Behaviour Changes at the top of the 1.8.0 release notes, led by
get_process_group, which is the highest-traffic of them.Supported versions and generated clients
ParameterGroupConfigurationEntity.parameter_sensitivitiesnow validates map values rather than keys, and accepts an unset (None) sensitivity. Before this, provider fetch and apply responses could not be deserialized.Configuration.client_side_validationflag.New helpers
nipyapi.parameters:synchronizedchoices unless the caller overrides them. Unset choices default to sensitive and synchronized, matching NiFi.sensitivities, and logs a warning when no selected group is synchronized.set_inherited_parameter_contexts(prepend or replace),get_process_group_parameter_context, andconnect_parameter_provider_group.connect_parameter_provider_groupinherits a provider-created context and sets local sensitive aliases, in one atomic update.canvas.list_all_management_controllersandcanvas.get_management_controller, which return controller-level services only.Behaviour changes to existing functions (full list in the release notes)
canvas.get_process_groupreturnsNonefor a missing ID, instead of raisingValueError("Unable to locate group ..."). That is what its 404 handler intends, and matchesget_processorandget_parameter_context. Thenipyapi.cicommands already handledNone; their error message is nowProcess group not found: <id>.update_parameter_context(and the rename, upsert and delete-parameter helpers that call it) andverify_controller/verify_processornow shareutils.wait_for_request:ValueError;canvas.ensure_management_controllermatches controller-level services only, and raises if several share the name.canvas.get_controllerdocstring is corrected; its behaviour is unchanged./flow/aboutrequest on every parameter call.Build tooling
make dist,wheel,sdistandinstallno longer delete the test certificates or coverage reports.check-distandtest-distreuse an existing build. They still build whendist/is empty, which CI relies on.rebuild-allfailed after its ownclean-all, becausewait-readyimports nipyapi once the clients are gone. It now removes the generated code just before regenerating it.Test plan
make rebuild-allcompletes:twine check, the clean-venv import test, and docs.failure_reason. Each one's docstring says why, and they follow NiFi'sStandardAsynchronousWebRequestsemantics.make lint/ pre-commit is clean.