Skip to content

Validate the workflow tutorials in CI with one runner script - #1396

Merged
nelson-parente merged 6 commits into
dapr:masterfrom
nelson-parente:tutorials-ci
Nov 16, 2026
Merged

nelson-parente merged 6 commits into
dapr:masterfrom
nelson-parente:tutorials-ci

Conversation

@nelson-parente

@nelson-parente nelson-parente commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

This pull request does not need #1394. It applies to master on its own.

The workflow tutorials have no CI today. The steps in validate_tutorials.yaml are commented out, because mechanical-markdown cannot drive their long-running services.

Changes

  • tutorials/workflow/validate.sh <lang> <topic>: one runner for every language. It starts the tutorial, sends the requests of its .http file in order, and checks each workflow instance through GET /v1.0/workflows/dapr/<id>. It exits 0 only when each instance reaches COMPLETED, or is gone after the .http file purges it. For the Python, .NET and Go history propagation tutorials, which have no .http file, it checks the app output. It stops everything that it started.
  • validate_tutorials.yaml: a matrix job over the Python, .NET, Go and Java tutorials on ubuntu-latest, with the Dapr versions of global.env. Python, .NET and Go use dapr init --slim. Java uses Testcontainers. A second job runs combined-patterns with a Redis service container. The two jobs have 34 entries.
  • .NET: add dapr-sqlite.yaml for history propagation and versioning, and versioning.http.
  • CLAUDE.md: describe the new validation.

Tests

Each topic ran in a container with Dapr CLI and runtime 1.19.0. The only command was bash tutorials/workflow/validate.sh <lang> <topic>.

  • Python: 11 of 11 pass (SQLite, combined-patterns on Redis).
  • .NET: 11 of 11 pass (SQLite, combined-patterns on Redis).
  • Go: history-propagation passes.
  • Java: 11 of 11 pass.

bash -n tutorials/workflow/validate.sh passes.

🤖 Generated with Claude Code

nelson-parente and others added 4 commits November 6, 2026 11:31
…orkflow tutorials

Add dapr-sqlite.yaml to the .NET history propagation and versioning tutorials,
in the shape of the other .NET tutorials: it is the same as dapr.yaml with the
resources-sqlite folder, so both tutorials run without Docker and Redis.

Add versioning.http to the .NET versioning tutorial. It starts the workflow
and reads its status from the Dapr workflow API. Remove the sentence in the
.NET tutorials README that says these two tutorials have no dapr-sqlite.yaml.

The combined-patterns tutorials use Redis for pub/sub and no SQLite pub/sub
component exists, so they keep dapr.yaml only.

Signed-off-by: Nelson Parente <nelson_parente@live.com.pt>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tutorials/workflow/validate.sh <lang> <topic> builds and starts a workflow
tutorial (dapr run -f for Python, .NET and Go, mvn spring-boot:test-run for
Java), sends the requests of its .http file in order, and checks every
workflow instance that a request started through
GET /v1.0/workflows/dapr/<id>. It exits 0 only when each instance reaches
COMPLETED, or is gone after the .http file purges it. A tutorial with no .http
file that runs its scenarios and exits is checked on its output. The script
stops everything that it started.

The .http parser reads @var lines, ### request blocks, # @name names, {{var}},
{{$guid}} and {{name.response.headers.X}} or {{name.response.body.path}}
references.

Signed-off-by: Nelson Parente <nelson_parente@live.com.pt>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the commented-out .NET workflow steps with a matrix job over the
Python, .NET, Go and Java workflow tutorials. Each entry runs
tutorials/workflow/validate.sh on ubuntu-latest with the Dapr versions of
global.env. Python, .NET and Go entries use dapr init --slim and start the
Scheduler and Placement services as processes. Java entries use Testcontainers.
The combined-patterns tutorials for Python and .NET run in a second job with
a Redis service container. challenges-tips is not in the matrix because it
holds code snippets only.

Signed-off-by: Nelson Parente <nelson_parente@live.com.pt>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Nelson Parente <nelson_parente@live.com.pt>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nelson-parente
nelson-parente marked this pull request as ready for review November 6, 2026 11:33
@nelson-parente
nelson-parente requested review from a team as code owners November 6, 2026 11:33
JoshVanL
JoshVanL previously approved these changes Nov 6, 2026
…o its run

validate.sh gave PASS for a purged instance in two cases where the
tutorial did not work:
- The instance was FAILED before the purge. The check before the purge
  accepted any final status.
- No daprd answered after the purge. The script read a connection error
  as "the instance is gone".

Now the instance must be COMPLETED before the purge, or TERMINATED when
the .http file terminates it first. After the purge, at least one daprd
must answer, and no daprd must know the instance.

Other changes:
- The Java cleanup removes only the Testcontainers containers that this
  run created. It no longer removes the containers of other projects.
- The Java combined-patterns run puts back the user's
  ~/.testcontainers.properties at exit.
- macOS has no setsid command. There, python3 starts the new session.
- Only history-propagation can run without a .http file, because the
  expected output lines belong to that topic. Any other topic without a
  .http file fails at once with a clear message.
- The daprHost port lookup reads the variable directly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Nelson Parente <nelson_parente@live.com.pt>

@marcduiker marcduiker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nelson-parente
nelson-parente merged commit a7aab42 into dapr:master Nov 16, 2026
41 of 42 checks passed
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.

3 participants