Repository navigation
fix: accept STATELESS_GROUP affected components and normalise port failures (1.8.1) - #420
Merged
Merged
Conversation
…ilures * Add a spec augmentation that mirrors AffectedComponentDTO.referenceType's enum into AffectedComponentEntity, and regenerate. NiFi returns STATELESS_GROUP for components in stateless process groups, but the 2.12.0 OpenAPI spec omits it from the entity (NIFI-16464, fixed upstream in apache/nifi#11811), so parameter provider fetch/apply raised ValueError on flows with stateless groups. Only affected_component_entity.py changes. Remove the augmentation when generating from a NiFi release with the fix. * verify_config: return port failures as {"step", "explanation"} dicts, like controller and processor failures, instead of plain strings. Fixes #419 Fixes #418
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #420 +/- ##
==========================================
+ Coverage 78.27% 78.30% +0.02%
==========================================
Files 41 41
Lines 5115 5116 +1
==========================================
+ Hits 4004 4006 +2
+ Misses 1111 1110 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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
Patch release candidate for 1.8.1. Fixes #419 and fixes #418.
AffectedComponentEntity.reference_typerejectsSTATELESS_GROUP. NiFi returnsSTATELESS_GROUPfor components in stateless process groups. The NiFi 2.12.0 OpenAPI spec omits it fromAffectedComponentEntity.referenceType, thoughAffectedComponentDTOhas it. So fetching or applying a parameter provider on a flow with stateless groups raisedValueErrorwhile deserialising the response, before the apply was submitted.main, so in a future NiFi release).nifi_affected_component_reference_type.py, which mirrors the DTO enum into the entity, thenmake augment-openapi gen-clientsagainst the committed 2.12.0 base spec.nipyapi/nifi/models/affected_component_entity.py, by one line. The resulting values and order match the merged upstream annotation.mainis a 2.13.0-SNAPSHOT that is 126 commits past 2.12.0, with new model fields and endpoints a 2.12 server doesn't have.ci.verify_configport failures were plain strings. Port validation has returnedport_results[*].failuresas plain strings since it was introduced in 1.7.0, while controller and processor results use{"step", "explanation"}dicts. We are changing ports to the same shape ("step": "Port validation") for consistency, so callers can handle every result row the same way.verified,failed_countor a row'ssuccessare unaffected, and valid ports still returnfailures: [].explanation; this is noted in the history.docs/history.rsthas the dated1.8.1 (2026-10-24)entry.Test plan
make lint: 10.00/10. All pre-commit hooks pass (black, isort, flake8, pylint).make augment-openapi gen-clients: regenerated diff is the singleAffectedComponentEntityenum line.tests/test_generated_models.py::test_affected_component_accepts_stateless_group.tests/test_ci.py::test_verify_config_with_invalid_portnow asserts the failure shape.make test NIPYAPI_PROFILE=single-user(NiFi 2.12.0): 777 passed, 33 skipped, 1 failed.test_versioning.py::test_update_git_flow_ver_to_latest, passes when run alone. It is order-dependent in the GitHub-registry tests, and the versioning code is untouched.