Skip to content

Commit

Permalink
fix(cli): remove standalone Saya service support
Browse files Browse the repository at this point in the history
Removed all references and functionality related to the Saya service
from the CLI. Updated corresponding documentation and schema to
reflect this change.
  • Loading branch information
steebchen committed Jan 31, 2025
1 parent f39a26d commit d48e20c
Show file tree
Hide file tree
Showing 10 changed files with 5 additions and 118 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ The commands that Slot CLI offers must reflect what's the internal infrastructur
The current design is the following:

1. Slot CLI implements infra specific commands (like accounts, teams, etc..). Those one are directly mapped to the infra specific code.
2. To use the services like Katana, Torii, Saya, etc.. Slot CLI must know the arguments that each service expects. For this, Slot CLI is using the `cli` crate for each service.
3. When creating or updating a service like Katana, Torii and Saya, Slot CLI will gather the arguments from the CLI and creates a TOML configuration file for each service, which will ease the process of creating the services and passing arguments to the corresponding service.
2. To use the services like Katana, Torii, etc.. Slot CLI must know the arguments that each service expects. For this, Slot CLI is using the `cli` crate for each service.
3. When creating or updating a service like Katana and Torii, Slot CLI will gather the arguments from the CLI and creates a TOML configuration file for each service, which will ease the process of creating the services and passing arguments to the corresponding service.

## GraphQL

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ slot deployments delete <Project Name> torii

Read service logs
```sh
slot deployments logs <Project Name> <katana | torii | saya>
slot deployments logs <Project Name> <katana | torii>
```

List all deployments
Expand All @@ -46,7 +46,7 @@ slot deployments list

View deployments configuration
```sh
slot deployments describe <Project Name> <katana | torii | saya>
slot deployments describe <Project Name> <katana | torii>
```

View predeployed accounts
Expand Down
6 changes: 0 additions & 6 deletions cli/src/command/deployments/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,6 @@ impl CreateArgs {
config: slot::read::base64_encode_string(&service_config),
}
}
CreateServiceCommands::Saya(config) => CreateServiceInput {
type_: DeploymentService::saya,
version: config.version.clone(),
config: "TODO".to_string(),
},
};

let tier = match &self.tier {
Expand All @@ -103,7 +98,6 @@ impl CreateArgs {
let service = match &self.create_commands {
CreateServiceCommands::Katana(_) => "katana",
CreateServiceCommands::Torii(_) => "torii",
CreateServiceCommands::Saya(_) => "saya",
};

println!(
Expand Down
2 changes: 0 additions & 2 deletions cli/src/command/deployments/delete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use slot::{api::Client, credential::Credentials};
pub enum Service {
Katana,
Torii,
Saya,
}

#[derive(Debug, Args)]
Expand Down Expand Up @@ -48,7 +47,6 @@ impl DeleteArgs {
let service = match &self.service {
Service::Katana => DeploymentService::katana,
Service::Torii => DeploymentService::torii,
Service::Saya => DeploymentService::saya,
};

let request_body = DeleteDeployment::build_query(Variables {
Expand Down
1 change: 0 additions & 1 deletion cli/src/command/deployments/describe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ impl DescribeArgs {
let service = match self.service {
Service::Torii => DeploymentService::torii,
Service::Katana => DeploymentService::katana,
Service::Saya => DeploymentService::saya,
};

let request_body = DescribeDeployment::build_query(Variables {
Expand Down
1 change: 0 additions & 1 deletion cli/src/command/deployments/logs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ impl LogReader {
let service = match self.service {
Service::Katana => DeploymentService::katana,
Service::Torii => DeploymentService::torii,
Service::Saya => DeploymentService::saya,
};

let request_body = DeploymentLogs::build_query(Variables {
Expand Down
8 changes: 0 additions & 8 deletions cli/src/command/deployments/services/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@ use clap::{Subcommand, ValueEnum};

use self::{
katana::{KatanaAccountArgs, KatanaCreateArgs, KatanaUpdateArgs},
saya::{SayaCreateArgs, SayaUpdateArgs},
torii::{ToriiCreateArgs, ToriiUpdateArgs},
};

mod katana;
mod saya;
mod torii;

#[derive(Debug, Subcommand, serde::Serialize)]
Expand All @@ -17,8 +15,6 @@ pub enum CreateServiceCommands {
Katana(KatanaCreateArgs),
#[command(about = "Torii deployment.")]
Torii(ToriiCreateArgs),
#[command(about = "Saya deployment.")]
Saya(SayaCreateArgs),
}

#[derive(Debug, Subcommand, serde::Serialize)]
Expand All @@ -28,8 +24,6 @@ pub enum UpdateServiceCommands {
Katana(KatanaUpdateArgs),
#[command(about = "Torii deployment.")]
Torii(Box<ToriiUpdateArgs>),
#[command(about = "Saya deployment.")]
Saya(SayaUpdateArgs),
}

#[derive(Debug, Subcommand, serde::Serialize)]
Expand All @@ -43,15 +37,13 @@ pub enum KatanaAccountCommands {
pub enum Service {
Katana,
Torii,
Saya,
}

impl std::fmt::Display for Service {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Service::Katana => write!(f, "katana"),
Service::Torii => write!(f, "torii"),
Service::Saya => write!(f, "saya"),
}
}
}
83 changes: 0 additions & 83 deletions cli/src/command/deployments/services/saya.rs

This file was deleted.

6 changes: 0 additions & 6 deletions cli/src/command/deployments/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,6 @@ impl UpdateArgs {
config: Some(slot::read::base64_encode_string(&service_config)),
}
}
UpdateServiceCommands::Saya(config) => UpdateServiceInput {
type_: DeploymentService::saya,
version: config.version.clone(),
config: None, // TODO
},
};

let tier = match &self.tier {
Expand Down Expand Up @@ -96,7 +91,6 @@ impl UpdateArgs {
let service = match &self.update_commands {
UpdateServiceCommands::Katana(_) => "katana",
UpdateServiceCommands::Torii(_) => "torii",
UpdateServiceCommands::Saya(_) => "saya",
};

println!(
Expand Down
8 changes: 1 addition & 7 deletions slot/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -8742,12 +8742,6 @@
"description": null,
"isDeprecated": false,
"name": "torii"
},
{
"deprecationReason": null,
"description": null,
"isDeprecated": false,
"name": "saya"
}
],
"fields": [],
Expand Down Expand Up @@ -21584,4 +21578,4 @@
]
}
}
}
}

0 comments on commit d48e20c

Please sign in to comment.