-
-
Notifications
You must be signed in to change notification settings - Fork 205
Add Queue Override Support for DAG Enqueue Operations #1111 #1240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ed edits and remove stray binary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great! Thanks for wonderful contribution.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1240 +/- ##
==========================================
- Coverage 64.38% 64.37% -0.02%
==========================================
Files 130 130
Lines 20147 20158 +11
==========================================
+ Hits 12972 12976 +4
- Misses 6130 6136 +6
- Partials 1045 1046 +1
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Add Queue Override Support for DAG Enqueue Operations
Problem
Queue names are hardcoded in DAG YAML files. When reprocessing data with different priorities (e.g., realtime vs historical), the same high-priority queue is always used, making it impossible to dynamically assign DAGs to different queues based on processing requirements.
Solution
Add optional parameter to override DAG-level queue definition during enqueue operations, allowing users to dynamically assign DAGs to different queues without modifying the DAG files.
Changes
1. CLI Command Enhancement
--queueflag to enqueue CLI command--queue(shorthand:-u) to override DAG-level queue definitiondagu enqueue --queue="realtime" my_dag.yaml2. API Endpoint Enhancement
queueparameter to enqueue API endpointsapi/v2/api.yaml) to include optionalqueuefield{ "queue": "realtime", "params": "PRIORITY=high", "dagRunId": "optional-run-id" }3. Queue Resolution Logic Update
Queuefield toDAGRunStatusto persist queue override4. Data Model Changes
Queue stringfield to store queue overrideWithQueue(queue string)StatusOption for setting queueEnqueueOptionsto includeQueuefield5. Backend Implementation
internal/cmd/enqueue.goto handle queue overrideinternal/dagrun/manager.goto pass queue override to CLIinternal/frontend/api/v2/dags.goto process queue overrideinternal/frontend/api/v2/queues.goto use stored queue overrideTechnical Details
Queue Resolution Priority
Backward Compatibility
Usage Examples
CLI Usage
API Usage
Benefits
Testing
Files Modified
Core Implementation
internal/models/status.go- Added Queue field to DAGRunStatusinternal/cmd/enqueue.go- Added queue override handlinginternal/cmd/start.go- Updated enqueueDAGRun callinternal/cmd/flags.go- Added queue flag definitioninternal/dagrun/manager.go- Enhanced EnqueueOptions and EnqueueDAGRunAPI Layer
api/v2/api.yaml- Added queue parameter to enqueue endpointinternal/frontend/api/v2/dags.go- Updated API enqueue implementationinternal/frontend/api/v2/queues.go- Enhanced queue resolution logicTesting
internal/cmd/enqueue_test.go- Added test case for queue overrideGenerated Files
api/v2/api.gen.go- Regenerated API typesui/src/api/v2/schema.ts- Regenerated TypeScript typesMigration Notes
No migration is required. This is a purely additive feature that maintains full backward compatibility.
Future Enhancements
Potential future improvements could include: