Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
.vscode/
.claude/settings.local.json

# Agent tools
.mcp_*
.mcp.*

# Testing
test_config.json
test-dry-run.json
Expand Down
2 changes: 1 addition & 1 deletion sdk/workflow-tengo/src/exec/limits.lib.tengo
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ getResourceTypes := func(queueName) {

// Fallback: existing logic for backward compatibility with older backends
runnerType := constants.RUNNER_EXECUTOR
if feats.hasBatch && queueName != constants.UI_TASKS_QUEUE {
if feats.hasBatch && (queueName != constants.UI_TASKS_QUEUE || !feats.uiQueueUsesForBatchSetup) {
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

While the logic is correct, the condition can be made more readable by expressing the exception case more directly. The intent is to use the batch runner if available, unless it's the UI queue and the uiQueueUsesForBatchSetup flag is enabled. Rewriting the condition to !(A && B) makes this exception clearer.

if feats.hasBatch && !(queueName == constants.UI_TASKS_QUEUE && feats.uiQueueUsesForBatchSetup) {

runnerType = constants.RUNNER_BATCH
}
return {
Expand Down
6 changes: 5 additions & 1 deletion sdk/workflow-tengo/src/feats.lib.tengo
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,9 @@ export ll.toStrict({
hasBlobSize: ll.methodExists(plapi, "getBlobSize"),

// true when backend supports docker packages
isDockerAvailable: _isEnabled("dockerSupport")
isDockerAvailable: _isEnabled("dockerSupport"),

// when true (default), ui-tasks queue uses RunCommand/executor resource type.
// when false, ui-tasks queue uses RunCommand/batch resource type (when batch setup is active).
uiQueueUsesForBatchSetup: _isEnabled("uiQueueUsesForBatchSetup")
})