Skip to content

test: cover distributed queued runtime params#2242

Merged
yohamta0 merged 1 commit into
mainfrom
test/distributed-queued-runtime-params
Jun 1, 2026
Merged

test: cover distributed queued runtime params#2242
yohamta0 merged 1 commit into
mainfrom
test/distributed-queued-runtime-params

Conversation

@yohamta0

@yohamta0 yohamta0 commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add scheduler unit coverage that distributed queue dispatch includes queued runtime params in coordinator tasks
  • add shared-nothing integration coverage for queued root DAG runtime params reaching worker execution
  • extend the distributed integration fixture with a params-aware enqueue helper

Testing

  • go test ./internal/service/scheduler -run TestDAGExecutor_DistributedRetryPassesQueuedParams -count=1
  • go test ./internal/service/scheduler -run TestDAGExecutor -count=1
  • go test ./internal/intg/distr -run TestParams -count=1
  • go test ./internal/intg/distr -run 'TestExecution_QueueLifecycle/queueItemRemovedAfterSuccess' -count=1

Summary by cubic

Add tests to verify queued runtime params propagate end-to-end in distributed runs, including retries. Adds a params-aware enqueue helper and asserts params flow into coordinator tasks, DAGRun status, and worker outputs.

Written for commit 5b7a51d. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Tests
    • Enhanced test coverage for distributed DAG execution, including parameterized queue operations and runtime parameter handling in queued runs.
    • Added distributed retry test to verify parameters are correctly preserved through retry operations.

@coderabbitai

coderabbitai Bot commented Jun 1, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 29bab335-8289-4ab7-a9a0-0d4187970035

📥 Commits

Reviewing files that changed from the base of the PR and between 5779d09 and 5b7a51d.

📒 Files selected for processing (3)
  • internal/intg/distr/fixtures_test.go
  • internal/intg/distr/params_test.go
  • internal/service/scheduler/dag_executor_test.go

📝 Walkthrough

Walkthrough

This PR adds test infrastructure and tests to verify that runtime parameters enqueued on a DAG run are preserved through the queued state and propagated to distributed task retry dispatch and node execution. Changes span test fixture helpers, unit tests, and integration tests.

Changes

Queued Runtime Parameters Propagation in Distributed Retries

Layer / File(s) Summary
Parameterized enqueue test helper
internal/intg/distr/fixtures_test.go
Adds enqueueWithParams(params string) helper method that constructs enqueue subcommands with explicit Params values, enabling parameterized test scenarios.
Distributed retry params dispatch test
internal/service/scheduler/dag_executor_test.go
Introduces TestDAGExecutor_DistributedRetryPassesQueuedParams with a capturingDispatcher mock to verify queued parameters from previousStatus are passed into dispatched coordinator tasks during retry operations.
Integration test for queued runtime parameters
internal/intg/distr/params_test.go
Adds TestParams_DistributedQueuedRunRuntimeParams to verify that enqueued runtime parameters persist through queued state and are correctly propagated to node execution, checked via node output assertions.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • dagucloud/dagu#2238: Implements DAGExecutor.ExecuteDAG changes to propagate previousStatus.Params into distributed task Params, which these tests validate.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title concisely and clearly summarizes the primary change: adding test coverage for distributed queued runtime parameters.
Description check ✅ Passed The PR description includes a summary section detailing the changes and a testing section with commands, but lacks several template sections like 'Changes' (bullet points) and 'Checklist'.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/distributed-queued-runtime-params

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No issues found across 3 files

Tip: cubic could auto-approve low-risk PRs like this, if it thinks it's safe to merge. Learn more

Re-trigger cubic

@yohamta0 yohamta0 merged commit d5132db into main Jun 1, 2026
11 checks passed
@yohamta0 yohamta0 deleted the test/distributed-queued-runtime-params branch June 1, 2026 04:37
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.

1 participant