MILAB-5867: Expose uiQueueUsesForBatchSetup feature flag in tengo SDK#1489
MILAB-5867: Expose uiQueueUsesForBatchSetup feature flag in tengo SDK#1489
Conversation
Add `uiQueueUsesForBatchSetup` to feats.lib.tengo and update the fallback runner selection logic in exec/limits.lib.tengo. When the flag is false, the ui-tasks queue uses RunCommand/batch instead of the default RunCommand/executor, enabling batch execution for UI tasks.
|
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a new feature flag, Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request correctly introduces the uiQueueUsesForBatchSetup feature flag to allow configuring the runner for the UI tasks queue. The changes are well-contained and follow the existing patterns in the codebase. I have one minor suggestion to improve the readability of the conditional logic.
| // 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) { |
There was a problem hiding this comment.
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) {
Summary
uiQueueUsesForBatchSetuptofeats.lib.tengo— reads the backend feature flag of the same nameexec/limits.lib.tengo: when the flag isfalse, ui-tasks queue usesRunCommand/batchinstead ofRunCommand/executortrueon the backend, so ui-tasks continues using the local executor unless explicitly changedTest plan
true): ui-tasks queue resolves toRunCommand/executor--workflow-ui-queue-must-use-batchflag set: ui-tasks queue resolves toRunCommand/batchwhen batch runner is availableDepends on: https://github.com/milaboratory/pl/pull/1659