Skip to content

Commit

Permalink
feat(katana): add saya option for provable mode (#174)
Browse files Browse the repository at this point in the history
* refactor(katana): rename `persistent` to `provable`

Updated field names and related references for clarity in purpose.

* feat(katana): add saya option for provable mode

Added a new `saya` option to Katana services, usable only in
provable mode. Updated validation logic and schema for compatibility.

* Update cli/src/command/deployments/services/katana.rs

Co-authored-by: glihm <[email protected]>

* fix(katana): update `saya` argument to boolean type

Changed the `saya` argument from `Option<String>` to `bool` to ensure
correct validation and alignment with its usage. Updated related error
messages and logic accordingly.

---------

Co-authored-by: glihm <[email protected]>
  • Loading branch information
steebchen and glihm authored Feb 14, 2025
1 parent bea0b8b commit d58ee6d
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
1 change: 1 addition & 0 deletions cli/src/command/deployments/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ impl CreateArgs {
katana: Some(KatanaCreateInput {
provable: Some(config.provable),
network: config.network.clone(),
saya: Some(config.saya),
}),
}
}
Expand Down
11 changes: 11 additions & 0 deletions cli/src/command/deployments/services/katana.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ pub struct KatanaCreateArgs {
#[arg(long, short, value_name = "network")]
#[arg(help = "Network to use for the service. Only in provable mode.")]
pub network: Option<String>,

#[arg(long, short, value_name = "saya")]
#[arg(
help = "Whether to start a saya instance alongside the provable Katana. Only in provable mode."
)]
pub saya: bool,
}

impl KatanaCreateArgs {
Expand All @@ -29,6 +35,11 @@ impl KatanaCreateArgs {
"The `network` option can only be supplied when `--provable` is enabled.",
));
}
if self.saya && !self.provable {
return Err(anyhow!(
"The `saya` option can only be supplied when `--provable` is enabled.",
));
}
Ok(())
}
}
Expand Down
12 changes: 11 additions & 1 deletion slot/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -11910,6 +11910,16 @@
"ofType": null
}
},
{
"defaultValue": null,
"description": null,
"name": "saya",
"type": {
"kind": "SCALAR",
"name": "Boolean",
"ofType": null
}
},
{
"defaultValue": null,
"description": null,
Expand Down Expand Up @@ -21856,4 +21866,4 @@
]
}
}
}
}

0 comments on commit d58ee6d

Please sign in to comment.