mattcasters commented on PR #11645:
URL: https://github.com/apache/nifi/pull/11645#issuecomment-5631704533
Thanks @bbende for the thorough review and insights!
In response to your feedback, we have streamlined the PR to focus squarely
on the root cause in `StandardVersionedComponentSynchronizer`:
1. **Reverted `preserveExistingParameterContextEntries` plumbing (11
files):**
- Reverted changes to `ProcessGroupResource`, `NiFiServiceFacade`,
`ProcessGroupDAO`, `ProcessGroup`, `FlowSynchronizationOptions`, and related
classes.
- Eliminating the second read of the strategy inside `withWriteLock`
resolves the cluster replication discrepancy.
2. **Reverted `StandardParameterContext` changes:**
- Reverted the `verifyCanSetParameters(getEffectiveParameters(), ...)`
change and its test so this broader behavior can be discussed and tested
separately in its own dedicated JIRA.
3. **Streamlined
`StandardVersionedComponentSynchronizer.addMissingConfiguration`:**
- **Local Parameters:** Uses
`currentParameterContext.getParameters().get(...)` to build description updates
from the raw local parameter via `fromParameter(localParameter)`. This
preserves the raw value and parameter reference syntax (`#{targetParam}`)
without flattening it to a resolved literal.
- **Inherited Parameters:** Checks
`currentParameterContext.getRawEffectiveParameters()` and skips inherited
parameters (`continue;`). Inherited parameters are never materialized as local
overrides on child contexts, and referencing components are unaffected.
- **Missing Parameters:** Continues adding genuinely absent parameters.
- **No-op avoidance:** Only calls `setParameters()` when `parameters` is
non-empty.
4. **Updated Unit Tests (`StandardVersionedComponentSynchronizerTest`):**
- Added
`testInheritedParameterNotMaterializedAsLocalOverrideWhenDescriptionDiffers` to
test that divergent descriptions do not cause child contexts to materialize
local overrides of inherited parameters.
- Added `testParameterReferencePreservedWhenDescriptionUpdated` to test
that alias references (`#{targetParam}`) retain their reference syntax and are
not flattened to literals upon description updates.
- Switched tests to use standard `synchronizationOptions`.
- All 60 unit tests pass, and Checkstyle reports 0 violations.
--
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]