Group diff output by process group#76
Conversation
sfc-gh-dchaffelson
left a comment
There was a problem hiding this comment.
Nice one, Pierre — this reads cleanly and lines up with #75 exactly: full-path group headers, the (Parameter Contexts) section pulled out last, Bundle Changes left in its own section, and visual-only diffs still dropped. Moving the bundle/visual handling into the first pass keeps the behaviour identical while making the grouping logic easy to follow, and I like that the before-snapshot groups are now registered so removed components still show a readable path.
Especially appreciated the test coverage — the nested-group fixtures plus asserting header order and that each change lands under the right group is exactly what this kind of output change needs.
Two small things, neither blocking:
- Heads-up on a merge conflict with #66. That PR also rewrites
FlowDiff.java, so whichever of the two lands first will leave the other needing a rebase. Just a sequencing note since both are yours. - Added/removed process group placement. A diff whose component is a process group resolves to its parent's section (via
getGroupIdentifier()), so e.g. "Group A added" shows underRootrather than underRoot > Group A. That seems reasonable to me (the group has no section of its own yet) — just flagging to confirm it's what you intended.
Base is a couple of weeks back now, so a quick rebase + CI re-run before merge is probably worth it (also relevant given the #66 overlap). Otherwise LGTM.
Resolves #75. Diffs are now organised under a bold header per process group path (e.g. **`Root > SubGroup`** — N changes) instead of a single flat list. Parameter-context-level diffs (value changes, adds, removes inside a context) are collected under a synthetic **`(Parameter Contexts)`** section printed last. - Register snapshot A process groups alongside B's so removed components whose group no longer exists in B still get a named path. - Add buildProcessGroupPath() and getGroupPathForDiff() helpers. - Refactor executeFlowDiffForOneFlow() into two phases: collect (bundles + visual-only handled as before; rest grouped by path) then print (group header + inner switch per group). - Add test fixtures with nested process groups and four new tests.
ad25b76 to
9b4fc16
Compare
|
Thanks for the review @sfc-gh-dchaffelson - pushed a commit to address |
Closes #75.
Summary
**\Root > SubGroup`** — N changes` header, making it immediately clear which group a change belongs to. Groups are sorted alphabetically; the root group comes first, nested groups in path order.(Parameter Contexts)section: parameter-context-level diffs (value changes, parameter adds/removes inside a context) are collected in a dedicated section printed last, separate from structural process group changes.has been added in Process Group Xsuffix was removed from the controller service added message.Example output
Test plan
mvn test)testNestedGroupsHaveSeparateSections— verifies the raw diff set contains expected diff types when using the new nested-PG fixturestestGroupedOutputContainsGroupHeaders— verifies group headers appear in the correct order and changes are placed under the right grouptestSingleGroupOutputHasGroupHeader— verifies single-group flows still produce a group header and no spurious(Parameter Contexts)section