Skip to content

Commit 0e469f9

Browse files
authored
Rust RQD (#1759)
Introduce a Rust directory containing a Rust version of the RQD module and its dependencies. For more information about the workspace organization, see `Opencue/rust/OVERVIEW.md` Modules can be compiled for the desired OS with `cargo built -r`, this version supports both MacOS and Linux. Compiling at debug mode favours the Linux version build. Binaries can be found after compilation on the default directory (target/release). --------- Signed-off-by: Diego Tavares <[email protected]>
1 parent 2c43c63 commit 0e469f9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+17281
-9
lines changed

.github/workflows/rust.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Rust
2+
3+
on:
4+
push:
5+
branches: ["master"]
6+
pull_request:
7+
branches: ["master"]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Install Protoc
19+
uses: arduino/setup-protoc@v3
20+
- name: Build
21+
run: |
22+
cd rust
23+
cargo build --verbose
24+
- name: Run tests
25+
run: |
26+
cd rust
27+
cargo test --verbose

VERSION.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.9
1+
1.10

proto/src/renderPartition.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ message RenderPartitionSeq {
5454

5555

5656
// -------- Requests & Responses --------]
57-
message RenderPartDeleteRequest {
5857

58+
message RenderPartDeleteRequest {
5959
RenderPartition render_partition = 1;
6060
}
6161

proto/src/report.proto

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@ message CoreDetail {
3939
int32 locked_cores = 3;
4040
int32 booked_cores = 4;
4141
//map <key: physid, value: coreid>
42-
map<int64, CoreId> reserved_cores = 5;
42+
// This field is deprecated as it should have never been part of the API. It was previously used
43+
// solely on rqd's end to store a map of reserved cores, but the data was never communicated to
44+
// the server.
45+
map<int64, CoreId> reserved_cores = 5 [deprecated=true];
4346
}
4447

4548
message CoreId {

proto/src/rqd.proto

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11

2+
23
syntax = "proto3";
34
package rqd;
45

@@ -15,7 +16,7 @@ import "report.proto";
1516

1617
// Implemented by the Rqd server. Called by cuebot and tools.
1718
service RqdInterface {
18-
// Return the RunFrame by id
19+
// [Deprecated] Return the RunFrame by id
1920
rpc GetRunFrame(RqdStaticGetRunFrameRequest) returns (RqdStaticGetRunFrameResponse);
2021

2122
// Return the RunningFrameStatus report
@@ -42,7 +43,7 @@ service RqdInterface {
4243
// Reboot the host when it becomes idle
4344
rpc RebootIdle(RqdStaticRebootIdleRequest) returns (RqdStaticRebootIdleResponse);
4445

45-
// Reboot the host now
46+
// [Deprecated] Reboot the host now
4647
rpc RebootNow(RqdStaticRebootNowRequest) returns (RqdStaticRebootNowResponse);
4748

4849
// Return the HostReport
@@ -54,7 +55,7 @@ service RqdInterface {
5455
// [Deprecated] Restart rqd process now
5556
rpc RestartRqdNow(RqdStaticRestartNowRequest) returns (RqdStaticRestartNowResponse);
5657

57-
// Turn off rqd when it becomes idle
58+
// [Deprecated] Turn off rqd when it becomes idle
5859
rpc ShutdownRqdIdle(RqdStaticShutdownIdleRequest) returns (RqdStaticShutdownIdleResponse);
5960

6061
// Stop rqd now
@@ -99,10 +100,16 @@ message RunFrame {
99100
string log_dir = 9;
100101
string show = 10;
101102
string shot = 11;
102-
string job_temp_dir = 12;
103+
// Deprecated: Not reliable and will not be taken on consideration moving forward
104+
string job_temp_dir = 12 [deprecated=true];
105+
// Deprecated: Not reliable and will not be taken on consideration moving forward
103106
string frame_temp_dir = 13;
104-
string log_file = 14;
105-
string log_dir_file = 15;
107+
// Deprecated: The log_path is defined rqd using job_dir, job_name and frame_name.
108+
// This field is misleading as it doesn't give cuebot the power to define the log path
109+
string log_file = 14 [deprecated=true];
110+
// Deprecated: The log_path is defined rqd using job_dir, job_name and frame_name.
111+
// This field is misleading as it doesn't give cuebot the power to define the log path
112+
string log_dir_file = 15 [deprecated=true];
106113
int64 start_time = 16;
107114
oneof uid_optional {
108115
int32 uid = 17;

rust/.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/target
2+
3+
# TODO: Remove once these crates are stable and ready for public use
4+
/crates/cuebot-config
5+
/crates/dist-lock
6+
/crates/scheduler
7+
8+
.DS_Store
9+
config/rqd.local_docker.yaml

0 commit comments

Comments
 (0)