Repository navigation
Fix step exit code references in examples - #57
Merged
Merged
Conversation
The graceful-degradation examples read a step's exit code from an
environment variable named after the step ID. Dagu sets no such
variable, so the precondition never matched and the fallback step was
always skipped. Use the supported ${<id>.exit_code} reference.
Also state that a dag.run child does not go through its queue, so the
queue's max_concurrency does not limit it.
Refs dagucloud/dagu#3033
6 tasks done
Contributor
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
dagu-sh-docs | 5d6504a | Oct 31 2026, 03:19 PM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three graceful-degradation examples read a step's exit code from
${env.<STEP_ID>_EXIT_CODE}. Dagu has never set such a variable, so the precondition never matched and the fallback step was always skipped (item 4 of dagucloud/dagu#3033). The examples now use the supported${<id>.exit_code}reference.The queue page also now states that a
dag.runchild starts directly rather than through its queue, so the queue'smax_concurrencydoes not limit it. The reporter of #3033 expected otherwise.Changes
writing-workflows/continue-on.md:${try_optimal_method.exit_code},${check_primary.exit_code}writing-workflows/control-flow.md:${try_advanced_method.exit_code}writing-workflows/queues.md: one sentence ondag.runand queue limitsValidation
Ran a DAG locally with a step that exits 7 under
continue_on: failed. The${env.FLASH_EXIT_CODE}precondition skips the step;${flash.exit_code}runs it.Related: dagucloud/dagu#3461
Summary by cubic
Fixes three graceful-degradation examples that read a step's exit code from the unsupported
${env.<STEP_ID>_EXIT_CODE}variable, which Dagu never sets, causing the fallback step to always be skipped. The examples now use the supported${<id>.exit_code}reference (dagucloud/dagu#3033).Also clarifies in the queues doc that a
dag.runchild starts directly rather than through its queue, so the queue'smax_concurrencydoes not limit it.Written for commit 5d6504a. Summary will update on new commits.