Skip to content
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

rsc: Fix type for hidden_info #1616

Merged
merged 2 commits into from
Aug 1, 2024
Merged
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
3 changes: 1 addition & 2 deletions rust/entity/src/job.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ pub struct Model {
pub cwd: String,
pub stdin: String,
pub is_atty: bool,
#[sea_orm(column_type = "Binary(BlobSize::Blob(None))")]
pub hidden_info: Vec<u8>,
pub hidden_info: String,
pub stdout_blob_id: Uuid,
pub stderr_blob_id: Uuid,
pub status: i32,
Expand Down
2 changes: 1 addition & 1 deletion rust/migration/src/m20220101_000002_create_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ impl MigrationTrait for Migration {
.col(ColumnDef::new(Job::Cwd).string().not_null())
.col(ColumnDef::new(Job::Stdin).string().not_null())
.col(ColumnDef::new(Job::IsAtty).boolean().not_null())
.col(ColumnDef::new(Job::HiddenInfo).ezblob())
.col(ColumnDef::new(Job::HiddenInfo).string().not_null())
.col(ColumnDef::new(Job::StdoutBlobId).uuid().not_null())
.col(ColumnDef::new(Job::StderrBlobId).uuid().not_null())
.col(ColumnDef::new(Job::Status).integer().not_null())
Expand Down
2 changes: 1 addition & 1 deletion rust/rsc/.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"server_address": "0.0.0.0:3002",
"connection_pool_timeout": 60,
"standalone": false,
"active_store": "3446d287-1d6f-439f-bc8a-9e73ab34065d",
"active_store": "6716a342-e800-40f8-a1c4-03f520fd64ff",
"log_directory": null,
"blob_eviction": {
"tick_rate": 60,
Expand Down
10 changes: 4 additions & 6 deletions rust/rsc/src/bin/rsc/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ pub struct AddJobPayload {
pub cwd: String,
pub stdin: String,
pub is_atty: bool,
#[serde(with = "serde_bytes")]
pub hidden_info: Vec<u8>,
pub hidden_info: String,
pub visible_files: Vec<VisibleFile>,
pub output_dirs: Vec<Dir>,
pub output_symlinks: Vec<Symlink>,
Expand Down Expand Up @@ -73,7 +72,7 @@ impl AddJobPayload {
hasher.update(&self.stdin.len().to_le_bytes());
hasher.update(self.stdin.as_bytes());
hasher.update(&self.hidden_info.len().to_le_bytes());
hasher.update(self.hidden_info.as_slice());
hasher.update(self.hidden_info.as_bytes());
hasher.update(&[self.is_atty as u8]);
hasher.update(&self.visible_files.len().to_le_bytes());
for file in &self.visible_files {
Expand All @@ -93,8 +92,7 @@ pub struct ReadJobPayload {
pub cwd: String,
pub stdin: String,
pub is_atty: bool,
#[serde(with = "serde_bytes")]
pub hidden_info: Vec<u8>,
pub hidden_info: String,
pub visible_files: Vec<VisibleFile>,
}

Expand All @@ -111,7 +109,7 @@ impl ReadJobPayload {
hasher.update(&self.stdin.len().to_le_bytes());
hasher.update(self.stdin.as_bytes());
hasher.update(&self.hidden_info.len().to_le_bytes());
hasher.update(self.hidden_info.as_slice());
hasher.update(self.hidden_info.as_bytes());
hasher.update(&[self.is_atty as u8]);
hasher.update(&self.visible_files.len().to_le_bytes());
for file in &self.visible_files {
Expand Down
Loading