Project merging: ensure nodes are sorted
Nobody has claimed this yet.
- Dominant language
- Elixir
- Stars
- 296
- Forks
- 86
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 50
Description
There are currently cases in project merging where matches are non-deterministic, meaning nodes can be assigned different UUIDs at different times.
# Source: trigger->a, a->b, b->c, b->d
# Target: trigger->x, x->y, y->z, y->q
# Special case: node 'b' has both parent and children changed
# Should map: a->x, b->y, c->z, d->q
c and d can both map to z or d, and which is chosen depends on the order they happen to sit in the array.
The original algorithm proposed a sorted queue of nodes, which would ensure a deterministic order. Sorting can be done hierarchically, top-down and left-to-right. Child order should be determined by x/y position if present, or node id (not uuid) if it is not.
See thread: https://github.com/OpenFn/lightning/pull/3582#issuecomment-3370018765
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the project-merging implementation and review the discussion in PR #3582, especially the proposed sorted queue. Define the hierarchical, top-down and left-to-right ordering, using x/y position or node id as described, then verify that the example mapping is deterministic regardless of array order.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elixir
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100