fix: add ParameterProvider and FlowAnalysisRule to reference_type allowed values#407
Open
pvillard31 wants to merge 1 commit into
Open
Conversation
…owed values NiFi 2.x can return ParameterProvider and FlowAnalysisRule as reference_type values in ControllerServiceReferencingComponentDTO when a ParameterProvider or FlowAnalysisRule references a ControllerService. The current allowed_values list only includes Processor, ControllerService, ReportingTask, and FlowRegistryClient, causing a ValueError during deserialization. This is confirmed by NiFi source code (DtoFactory.java lines 1966-1973 for ParameterProvider and lines 1957-1965 for FlowAnalysisRule).
Collaborator
|
My concern here is if this will survive the next generation if it has not been fixed in NiFi. @Chaffelson will need to confirm. I will kick the workflow though. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #407 +/- ##
==========================================
- Coverage 76.81% 75.13% -1.68%
==========================================
Files 41 41
Lines 4831 4831
==========================================
- Hits 3711 3630 -81
- Misses 1120 1201 +81 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Author
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
ParameterProviderandFlowAnalysisRuleto theallowed_valueslist inControllerServiceReferencingComponentDTO.reference_typesetterFixes #406
Details
NiFi's
DtoFactory.java(lines 1928-1983) setsreferenceTypebased on the component type:Processor✅ already in allowed_valuesControllerService✅ already in allowed_valuesReportingTask✅ already in allowed_valuesFlowRegistryClient✅ already in allowed_valuesParameterProvider❌ added in this PRFlowAnalysisRule❌ added in this PRNote: NiFi's own OpenAPI/Swagger spec enum for this field is also incomplete (only lists Processor, ControllerService, ReportingTask, FlowRegistryClient), so auto-generation from swagger alone won't catch this.