Provide a way to spawn workflows that checks for topology issues

Open
#148 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
rust
Domain
backend

Research direction

Start by reading the workflow Builder and Commands construction paths, then trace how spawning differs from running when CircularCollect or an unreachable terminate operation is encountered. Done means topology errors are detected when the workflow is spawned, while preserving a consistent representation between the builder and queued commands.

Written by the indexing model from the issue text.

Description

Currently it is possible to get a CircularCollect cancellation error when running a workflow if a user puts two collect operations in one cycle. This is only caught when a service is run, not when it gets spawned.

Another error that can happen when running a workflow is if the terminate operation cannot be reached from the workflow input.

Besides these two topological errors, all other mistakes or unsupported workflow constructions are caught by the compiler, making the need for a holistic workflow error check somewhat niche. It is also difficult due to the fact that the workflow is built by Commands, with each element put into a queue. The workflow Builder doesn't have a holistic view of what the user has constructed, making it difficult to scrutinize.

To implement this feature, we would probably need to change the Builder to internally keep track of the topology of what the user has built, and analyze this internal representation after the user has finished spawning the workflow. This has a risk of fragmenting the source of truth between the internal representation and the version that's queued up in the commands. Perhaps one way of solving this is to create a new World to initially spawn the workflow inside of, evaluate the workflow inside the self-contained world, and then use Commands to transfer the spawned workflow into the real world.

Dominant language
Rust
Stars
75
Forks
18
Avg merge
12d 12h
Merged PRs (30d)
3

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from open-rmf/crossflow

All issues in open-rmf/crossflow

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.