Skip to content

Group diff output by process group#76

Open
sfc-gh-pvillard wants to merge 1 commit into
mainfrom
feature/group-diffs-by-process-group
Open

Group diff output by process group#76
sfc-gh-pvillard wants to merge 1 commit into
mainfrom
feature/group-diffs-by-process-group

Conversation

@sfc-gh-pvillard

Copy link
Copy Markdown
Collaborator

Closes #75.

Summary

  • Group headers per process group: each process group involved in changes gets its own **\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.
  • Snapshot A process groups registered: groups from the before-snapshot are now also registered so that components removed from groups that no longer exist in the after-snapshot still display a human-readable path instead of a raw UUID.
  • No change to per-diff message wording: every existing diff description is unchanged; only the grouping and headers are new.
  • Controller service added message simplified: since the group is already shown by the section header, the redundant has been added in Process Group X suffix was removed from the controller service added message.

Example output

#### Flow Changes

**`MyFlow`** — 5 changes
- A Processor of type `GenerateFlowFile` named `Gen` has been added ...
- In Processor of type `UpdateAttribute` named `Update`, the value of property ...

**`MyFlow > Ingestion Group`** — 2 changes
- In Processor of type `InvokeHTTP` named `Call API`, the Run Schedule changed from `1 min` to `* * * * * ?`
- A Processor of type `UpdateAttribute` named `Enrich` has been removed

**`(Parameter Contexts)`** — 1 change
- In the Parameter Context `MyCtx`, the value of the parameter `api.url` has changed from `https://old` to `https://new`

Test plan

  • All 26 existing tests continue to pass (mvn test)
  • testNestedGroupsHaveSeparateSections — verifies the raw diff set contains expected diff types when using the new nested-PG fixtures
  • testGroupedOutputContainsGroupHeaders — verifies group headers appear in the correct order and changes are placed under the right group
  • testSingleGroupOutputHasGroupHeader — verifies single-group flows still produce a group header and no spurious (Parameter Contexts) section

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Group diff output by process group

1 participant