Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@kriyanshii
Copy link
Contributor

@kriyanshii kriyanshii commented Dec 14, 2025

The SubCmdBuilder.Dequeue method was missing the queue name parameter when building the dequeue command. The CLI command expects the queue name as the first positional argument after "dequeue", but it was not being included, causing dequeue operations via the API to fail.

This change:

  • Updates Dequeue to use dag.ProcGroup() to get the queue name
  • Includes the queue name as the first argument after "dequeue"
  • Updates tests to verify the queue name is included
  • Adds test case for DAGs with custom queue names

Fixes the issue where dequeuing from the API failed because the queue name was not being passed to the CLI command.

Summary by CodeRabbit

  • Bug Fixes
    • Dequeue command now correctly incorporates queue name from DAG configuration, allowing proper queue identification during execution.

✏️ Tip: You can customize this high-level summary in your review settings.

The SubCmdBuilder.Dequeue method was missing the queue name parameter
when building the dequeue command. The CLI command expects the queue
name as the first positional argument after "dequeue", but it was not
being included, causing dequeue operations via the API to fail.

This change:
- Updates Dequeue to use dag.ProcGroup() to get the queue name
- Includes the queue name as the first argument after "dequeue"
- Updates tests to verify the queue name is included
- Adds test case for DAGs with custom queue names

Fixes the issue where dequeuing from the API failed because the queue
name was not being passed to the CLI command.
@coderabbitai
Copy link

coderabbitai bot commented Dec 14, 2025

Walkthrough

The Dequeue command construction is updated to utilize the DAG object parameter (previously unused) and incorporate the queue name from the DAG as a second CLI argument. The control flow shifts from a two-argument form (command, dag-run) to a three-argument form (command, queue-name, dag-run), with tests updated to verify the queue name derivation from DAG.Queue or DAG name as fallback.

Changes

Cohort / File(s) Summary
Dequeue command construction
internal/runtime/subcmd.go
Method signature updated to accept DAG object; queue name now extracted and added as second argument to dequeue command
Dequeue command tests
internal/runtime/subcmd_test.go
Tests updated to verify queue name (from DAG.Queue or DAG name) as second argument; new test case added for custom queue scenario

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • Straightforward method signature change with consistent pattern applied across implementation and tests
  • Limited scope (2 files) with clear, localized modifications to argument composition
  • No complex logic branches or interdependencies requiring deeper analysis

Suggested reviewers

  • yottahmd

Poem

🐰 The dequeue now knows its way,
With queue names parsed from DAGs today,
Arguments three where two once stood,
A cleaner command flow, understood!
Hop along, the tests agree! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title accurately summarizes the main change: including the queue name in the dequeue command, which directly addresses the core fix described in the PR objectives.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

@ghansham
Copy link

ghansham commented Dec 14, 2025

Also check if the dag run is assigned to default queue. Do regression testing for default case via api route

@yottahmd yottahmd changed the title runtime: include queue name in dequeue command fix(runtime): include queue name in dequeue command Dec 14, 2025
Copy link
Collaborator

@yottahmd yottahmd left a comment

Choose a reason for hiding this comment

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

Thank you very much, LGTM! 🚀🚀🚀

@yottahmd yottahmd merged commit 23a29f3 into dagu-org:main Dec 14, 2025
5 checks passed
@codecov
Copy link

codecov bot commented Dec 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.93%. Comparing base (0498640) to head (ef0f488).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1481      +/-   ##
==========================================
+ Coverage   59.91%   59.93%   +0.01%     
==========================================
  Files         195      195              
  Lines       21886    21887       +1     
==========================================
+ Hits        13114    13117       +3     
  Misses       7364     7364              
+ Partials     1408     1406       -2     
Files with missing lines Coverage Δ
internal/runtime/subcmd.go 78.62% <100.00%> (+0.14%) ⬆️

... and 3 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0498640...ef0f488. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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