Skip to content

examples: Add the workspace demo workflows - #31

Open
SCcagg5 wants to merge 4 commits into
stack/30-e3from
stack/31-x1
Open

SCcagg5 wants to merge 4 commits into
stack/30-e3from
stack/31-x1

Conversation

@SCcagg5

@SCcagg5 SCcagg5 commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

Part of a stack of 31 pull requests that depend on each other. They must be reviewed and merged in order: each PR builds on the previous one and its diff only contains its own changes.

  • Previous: PR 30
  • Next: none (last PR of the stack)
All PRs of the stack
# PR
1 specs: Add spec 083 and the samples store
2 ir: Add run state fields for ephemeral runs and reused outputs
3 runtime: Bound continuous steps and carry outputs of selected steps
4 api: Add step samples, events, availability and selected-step runs
5 test(ui): add YAML fixtures for the document model tests
6 ui(lib): add shared UI kit, status helpers and right-panel shell
7 ui(canvas): add canvas engine core, toolbars and editor helpers
8 ui(i18n): add workspace message catalogs, first batch
9 ui(canvas): add canvas Flow view, step run panel and workflow panel
10 ui(editor): add YAML document model, canvas model and run source logic
11 ui(editor): Add edit session, YAML format and quick fixes, run actions, tab strip
12 ui(editor): Add canvas graph model, Add step panel, issues popover, run bar
13 ui(canvas): Add layered layout, dependency edges, status styles, reference picker
14 ui(canvas): Add export, flow builder, upstream data panel, output capture
15 ui(canvas): Add node cards, launchers, inspector sections, client issues
16 ui(editor): Add visual editor, step inspector and YAML file panel
17 ui(lists): Open runs on the workflow page; add tab and schedule helpers
18 ui(workspace): Add workspace URL state, legacy redirects and run list links
19 ui(workspace): Add workspace data layer, run facts and Workflow panel
20 ui(workspace): Add run start controls, visible runs and reuse source
21 ui(workspace): Add data provider, bar identity, continuous panel and step list
22 ui(logs): Add run actions cluster, cached logs and log popout page
23 ui(workspace): Add Activity dock, step run view and workflow page
24 test(workspace): Add integration tests for the workspace shell and step view
25 ui(pages): Retire classic run pages and open runs on the workflow page
26 test(editor): Add integration tests for the editor, inspector and run overlay
27 test(ui): Add repository-wide guard tests and ESLint boundary rules
28 e2e: Add workspace helpers and fixtures, update existing specs
29 e2e: Add workspace specs, part 1 of 2
30 e2e: Add workspace specs, part 2 of 2
31 examples: Add the workspace demo workflows

Stack 31/31. Base branch: stack/30-e3. Review and merge in order; this PR builds on the previous one.
Size: 16 files changed, 219 insertions(+).
Checked: No code. Files only.

Summary

This PR adds examples/workspace-demo/: nine workflows and a setup script. They show the graph, a router, reuse of earlier outputs, chains, repeating steps and two build workflows.

Why

The workspace needs sample workflows to try it, and to take screenshots. This PR comes last in the stack (after PR 30) and changes no code.

Changes

  • examples/workspace-demo/dags/
    • graph-etl.yaml, graph-router.yaml: graph workflows with outputs and a router.
    • reuse-costly.yaml: a slow first step, a middle step and a last step. Run it, edit middle, then run the last step to reuse the outputs.
    • always-running.yaml, repeat-until.yaml: repeating steps. always-running repeats every ten seconds with no limit.
    • chain-backup.yaml, chain-report.yaml: chained workflows, one with two schedules.
    • build-site.yaml, build-docs.yaml: build workflows.
  • examples/workspace-demo/demo-build/: input files for the build workflows (index.md, guide.md, style.css, and empty docs/ and out/).
  • examples/workspace-demo/setup.sh: copies the workflows and demo-build into a data directory.
  • examples/workspace-demo/README.md: usage.

How to review

  1. Read README.md and setup.sh.
  2. Read reuse-costly.yaml and always-running.yaml.
  3. Skim the other workflows.

Pay most attention to these places:

  • The build workflows expect <data-dir>/demo-build and the work directory /var/lib/dagu/demo-build. Check that the paths are right for the container image.
  • setup.sh uses set -eu and fails when no argument is given.

Tests

No tests are added. Run ./setup.sh <data-dir>, start Dagu with DAGU_HOME=<data-dir>, and run each workflow.

Screenshots

No visible UI change in this PR.
The workflows fill the screens of PR 5 to PR 27 with data.

Workflow graph
Reused outputs

This was referenced Oct 28, 2026
@yohamta0
yohamta0 force-pushed the stack/31-x1 branch 2 times, most recently from bfc860e to 81450af Compare October 29, 2026 10:50
@yohamta0
yohamta0 force-pushed the stack/30-e3 branch 2 times, most recently from 7ec6acd to 79732f4 Compare October 29, 2026 12:58
@yohamta0
yohamta0 force-pushed the stack/31-x1 branch 2 times, most recently from b885b1b to e764307 Compare October 30, 2026 06:44
@yohamta0
yohamta0 force-pushed the stack/30-e3 branch 2 times, most recently from 838cbd8 to dc7227f Compare October 30, 2026 08:07
@yohamta0
yohamta0 force-pushed the stack/31-x1 branch 2 times, most recently from 299833a to 734925d Compare October 30, 2026 08:43
@yohamta0
yohamta0 force-pushed the stack/31-x1 branch 2 times, most recently from 0619863 to e0238cf Compare October 31, 2026 05:37
SCcagg5 and others added 4 commits October 31, 2026 19:48
* e2e: workspace specs (2/2)
* Drop dead e2e absence checks, assert step clear
* Expect a disabled run caret for executing roles
* Check profile scope and tab names in e2e
The build workflows used /var/lib/dagu/demo-build as working_dir, so
they failed outside the container image. A relative working_dir
resolves against the DAG file, so ../demo-build follows any data
directory that setup.sh fills.

The router and the repeat demos drew numbers from RANDOM, which dash
does not set, so the router always took the 2xx branch. The repeat
condition was also a value match, where backtick text is literal, so it
never matched and always ran six times. Both now read a random byte
from /dev/urandom, and the repeat uses a command-check condition.

The chain-backup comment now says that both schedules run the whole
chain, and the README says that the demo runs on a schedule and that
setup.sh overwrites earlier copies.
The merge, load, middle and use steps echoed outputs of earlier steps
inside double quotes. The reference expands to JSON with its own double
quotes, which the shell then removed, so the demo printed
orders={orders:42} instead of the JSON it read. The steps now print
through a quoted heredoc, where the shell leaves the text alone.
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.

2 participants