Skip to content

[cuebot/cuegui] Feature add layer dispatchorder control#2354

Open
tifilipebr wants to merge 11 commits into
AcademySoftwareFoundation:masterfrom
tifilipebr:feature/gui-layer-dispatchorder
Open

[cuebot/cuegui] Feature add layer dispatchorder control#2354
tifilipebr wants to merge 11 commits into
AcademySoftwareFoundation:masterfrom
tifilipebr:feature/gui-layer-dispatchorder

Conversation

@tifilipebr
Copy link
Copy Markdown
Contributor

@tifilipebr tifilipebr commented May 20, 2026

This PR just complement it: #222

Summary by CodeRabbit

  • New Features

    • Added "Reorder Dispatch..." option to the layer context menu to set dispatch priority for one or multiple layers.
    • Exposed a layer dispatch-order API so layers can be reordered programmatically.
    • Added a Python SDK Layer method to update dispatch order from scripts.
  • Chores

    • Version bumped to 1.24

Review Change Stack

DiegoTavares and others added 7 commits March 23, 2026 18:30
…2034)

ASWF created a discussion group to come up with a process to release
binaries. While this effort is ongoing, we were advised to avoid
publishing binaries on github when possible.
Signed-off-by: Alexis Oblet <alexis@theyard-vfx.com>
Signed-off-by: Alexis Oblet <aoblet@users.noreply.github.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 20, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: fca8b03c-db51-4097-b96a-a43fad9704ae

📥 Commits

Reviewing files that changed from the base of the PR and between 5c4155b and fce9422.

📒 Files selected for processing (2)
  • cuebot/src/main/java/com/imageworks/spcue/dao/postgres/LayerDaoJdbc.java
  • cuegui/cuegui/MenuActions.py

📝 Walkthrough

Walkthrough

This PR adds SetDispatchOrder across the stack: proto RPC/messages, Java backend DAO/service and JDBC persistence with validation, ManageLayer gRPC handler, Python Layer wrapper, cuegui menu action, and a version bump to 1.24.

Changes

Layer Dispatch Order Feature

Layer / File(s) Summary
Protocol definition for SetDispatchOrder RPC
proto/src/job.proto
SetDispatchOrder RPC added to LayerInterface; LayerSetDispatchOrderRequest and LayerSetDispatchOrderResponse message types introduced.
Backend DAO and service layer for dispatch order persistence
cuebot/src/main/java/com/imageworks/spcue/dao/LayerDao.java, cuebot/src/main/java/com/imageworks/spcue/dao/postgres/LayerDaoJdbc.java, cuebot/src/main/java/com/imageworks/spcue/service/JobManager.java, cuebot/src/main/java/com/imageworks/spcue/service/JobManagerService.java
LayerDao declares updateLayerDispatchOrder; LayerDaoJdbc implements with strict positivity validation and JDBC UPDATE to int_dispatch_order. JobManager interface and JobManagerService delegate through the DAO.
gRPC handler wiring for SetDispatchOrder endpoint
cuebot/src/main/java/com/imageworks/spcue/servant/ManageLayer.java
ManageLayer imports protobuf types and implements setDispatchOrder RPC handler: retrieves layer, gates via attemptChange, calls JobManager.setLayerDispatchOrder, returns response.
Python pycue Layer wrapper method
pycue/opencue/wrappers/layer.py
Layer.setDispatchOrder(order) sends SetDispatchOrder RPC to cuebot with Layer and order, respecting Cuebot.Timeout.
cuegui UI controls for dispatch order reordering
cuegui/cuegui/LayerMonitorTree.py, cuegui/cuegui/MenuActions.py
LayerMonitorTree repositions menu separator. MenuActions adds reorder_dispatch action that prompts for an integer order, invokes setDispatchOrder on selected layers via cuebotCall, and updates UI.
Version increment
VERSION.in
Version bumped from 1.23 to 1.24.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

"🐰
I nudged orders through proto, DB, and UI,
a tiny hop from client to cue,
a numeric hop, set true and clean,
now layers march in tidy routine."

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 40.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
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately describes the main change: adding layer dispatch order control to both cuebot and cuegui, which is reflected across the file changes.
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 unit tests (beta)
  • Create PR with unit tests

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.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@cuebot/src/main/java/com/imageworks/spcue/dao/postgres/LayerDaoJdbc.java`:
- Around line 319-321: The validation in LayerDaoJdbc currently checks "if (val
< 0)" but the exception message says "must be positive," which is inconsistent;
update the check to "if (val <= 0)" so that the code enforces a strictly
positive dispatch order (keep the existing message), referencing the same val
variable in LayerDaoJdbc where the current check is performed.

In `@cuegui/cuegui/MenuActions.py`:
- Line 1093: The else branch sets title = "Reorder layer %s" % layer.data.name
but `layer` is undefined for the single-layer case; mirror the approach used in
the reorder method by assigning the first selected layer to a local variable
(e.g., __layer = layers[0]) and use __layer.data.name when building the title so
the single-layer path references a defined symbol (adjust in the method that
builds the title where `layer` is currently used).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: eb71a675-0162-4c46-897d-fea46dcef981

📥 Commits

Reviewing files that changed from the base of the PR and between aa359d5 and 13d0917.

📒 Files selected for processing (10)
  • VERSION.in
  • cuebot/src/main/java/com/imageworks/spcue/dao/LayerDao.java
  • cuebot/src/main/java/com/imageworks/spcue/dao/postgres/LayerDaoJdbc.java
  • cuebot/src/main/java/com/imageworks/spcue/servant/ManageLayer.java
  • cuebot/src/main/java/com/imageworks/spcue/service/JobManager.java
  • cuebot/src/main/java/com/imageworks/spcue/service/JobManagerService.java
  • cuegui/cuegui/LayerMonitorTree.py
  • cuegui/cuegui/MenuActions.py
  • proto/src/job.proto
  • pycue/opencue/wrappers/layer.py

Comment thread cuebot/src/main/java/com/imageworks/spcue/dao/postgres/LayerDaoJdbc.java Outdated
Comment thread cuegui/cuegui/MenuActions.py Outdated
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

♻️ Duplicate comments (1)
cuegui/cuegui/MenuActions.py (1)

1093-1095: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Fix undefined variable in single-layer reorder title (Line 1094).

layer is undefined in the single-layer branch, causing a runtime NameError when this action is used with one selected layer.

🐛 Proposed fix
-        else:
-            title = "Reorder layer %s" % layer.data.name
+        else:
+            __layer = layers[0]
+            title = "Reorder layer %s" % __layer.data.name
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cuegui/cuegui/MenuActions.py` around lines 1093 - 1095, The single-layer
branch assigns title using an undefined variable "layer", causing a NameError;
change that assignment to reference the actual selected-layer variable (e.g.,
use layers[0].data.name or the existing selected_layers/selectedLayer variable
used elsewhere) so the line becomes something like title = "Reorder layer %s" %
layers[0].data.name, ensuring you reference the same list/name used in the
surrounding code where multiple layers are handled.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Duplicate comments:
In `@cuegui/cuegui/MenuActions.py`:
- Around line 1093-1095: The single-layer branch assigns title using an
undefined variable "layer", causing a NameError; change that assignment to
reference the actual selected-layer variable (e.g., use layers[0].data.name or
the existing selected_layers/selectedLayer variable used elsewhere) so the line
becomes something like title = "Reorder layer %s" % layers[0].data.name,
ensuring you reference the same list/name used in the surrounding code where
multiple layers are handled.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7b8fe33c-515e-4d79-adef-8688c44021bb

📥 Commits

Reviewing files that changed from the base of the PR and between 13d0917 and 5c4155b.

📒 Files selected for processing (6)
  • VERSION.in
  • cuebot/src/main/java/com/imageworks/spcue/dao/postgres/LayerDaoJdbc.java
  • cuegui/cuegui/LayerMonitorTree.py
  • cuegui/cuegui/MenuActions.py
  • proto/src/job.proto
  • pycue/opencue/wrappers/layer.py
✅ Files skipped from review due to trivial changes (1)
  • VERSION.in

@ramonfigueiredo
Copy link
Copy Markdown
Collaborator

Thanks, @tifilipebr.

Please review and address the feedback from CodeRabbitAI first. Once all comments have been resolved, please mark them as Resolved.

When your PR is ready for final review, just leave a comment in this PR and tag:

@ramonfigueiredo
Ready for review!

We’ll review it and approve it as soon as possible.

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.

4 participants