Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoSign in
Socket

servicing

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

servicing - pypi Package Compare versions

Comparing version
0.0.9
to
0.0.10
+20
-13
Cargo.lock

@@ -31,5 +31,5 @@ # This file is automatically @generated by Cargo.

name = "anstream"
version = "0.6.13"
version = "0.6.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb"
checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b"
dependencies = [

@@ -41,2 +41,3 @@ "anstyle",

"colorchoice",
"is_terminal_polyfill",
"utf8parse",

@@ -47,11 +48,11 @@ ]

name = "anstyle"
version = "1.0.6"
version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc"
checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b"
[[package]]
name = "anstyle-parse"
version = "0.2.3"
version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c"
checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4"
dependencies = [

@@ -63,5 +64,5 @@ "utf8parse",

name = "anstyle-query"
version = "1.0.2"
version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648"
checksum = "a64c907d4e79225ac72e2a354c9ce84d50ebb4586dee56c82b3ee73004f537f5"
dependencies = [

@@ -73,5 +74,5 @@ "windows-sys 0.52.0",

name = "anstyle-wincon"
version = "3.0.2"
version = "3.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7"
checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19"
dependencies = [

@@ -156,5 +157,5 @@ "anstyle",

name = "colorchoice"
version = "1.0.0"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7"
checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422"

@@ -560,2 +561,8 @@ [[package]]

[[package]]
name = "is_terminal_polyfill"
version = "1.70.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800"
[[package]]
name = "itoa"

@@ -1135,3 +1142,3 @@ version = "1.0.11"

name = "servicing"
version = "0.0.9"
version = "0.0.10"
dependencies = [

@@ -1138,0 +1145,0 @@ "base64",

[package]
name = "servicing"
version = "0.0.9"
version = "0.0.10"
edition = "2021"

@@ -17,3 +17,3 @@

thiserror = "1.0.58"
tokio = { version = "1.37.0", features = ["full"] }
tokio = { version = "1.32.1", features = ["full"] }
serde = { version = "1.0", features = ["derive"] }

@@ -20,0 +20,0 @@ serde_yaml = "0.9"

Metadata-Version: 2.3
Name: servicing
Version: 0.0.9
Version: 0.0.10
Classifier: Programming Language :: Rust

@@ -5,0 +5,0 @@ Classifier: Programming Language :: Python :: Implementation :: CPython

@@ -57,3 +57,3 @@ from typing import List, Optional

def up(self, name: str) -> None:
def up(self, name: str, skip_prompt: Optional[bool] = None) -> None:
"""

@@ -65,3 +65,3 @@ Start a service

def down(self, name: str, force: Optional[bool] = None) -> None:
def down(self, name: str, skip_prompt: Optional[bool] = None, force: Optional[bool] = None) -> None:
"""

@@ -97,3 +97,3 @@ Stop a service

def load(self, location: Optional[str] = None) -> None:
def load(self, location: Optional[str] = None, update_status: Optional[str] = None) -> None:
"""

@@ -100,0 +100,0 @@ Load the dispatcher's cache

@@ -140,2 +140,9 @@ #![allow(dead_code)] // Remove this later

}
// check if service is not yet up but started
if let Some(_) = service.url {
return Err(ServicingError::ClusterProvisionError(format!(
"Service {} is starting",
name
)));
}
// remove the configuration file

@@ -154,8 +161,9 @@ if let Some(filepath) = &service.filepath {

pub fn up(&mut self, name: String) -> Result<(), ServicingError> {
pub fn up(&mut self, name: String, skip_prompt: Option<bool>) -> Result<(), ServicingError> {
// get the service configuration
if let Some(service) = self.service.lock()?.get_mut(&name) {
if service.up {
// check if service is either up or starting
if let Some(_) = service.url {
return Err(ServicingError::ClusterProvisionError(format!(
"Service {} is already up",
"Service {} is starting or already up",
name

@@ -167,16 +175,17 @@ )));

// launch the cluster
let mut child = Command::new("sky")
// .stdout(Stdio::piped())
.arg("serve")
.arg("up")
.arg("-n")
.arg(&name)
.arg(
service
.filepath
.as_ref()
.ok_or(ServicingError::General("filepath not found".to_string()))?,
)
.spawn()?;
let mut cmd = Command::new("sky");
cmd.arg("serve").arg("up").arg("-n").arg(&name).arg(
service
.filepath
.as_ref()
.ok_or(ServicingError::General("filepath not found".to_string()))?,
);
if let Some(true) = skip_prompt {
cmd.arg("-y");
}
let mut child = cmd.spawn()?;
// ley skypilot handle the CLI interaction

@@ -245,3 +254,3 @@

Err(e) => {
error!("Error fetching the service: {:?}", e);
error!("Error fetching the service endpoint: {:?}", e);
break;

@@ -259,6 +268,11 @@ }

pub fn down(&mut self, name: String, force: Option<bool>) -> Result<(), ServicingError> {
pub fn down(
&mut self,
name: String,
skip_prompt: Option<bool>,
force: Option<bool>,
) -> Result<(), ServicingError> {
// get the service configuration
match self.service.lock()?.get_mut(&name) {
Some(service) if service.up => {
Some(service) if service.up || service.url.is_some() => {
// Update service status

@@ -278,7 +292,8 @@ service.url = None;

// launch the cluster
let mut child = Command::new("sky")
.arg("serve")
.arg("down")
.arg(&name)
.spawn()?;
let mut cmd = Command::new("sky");
cmd.arg("serve").arg("down").arg(&name);
if let Some(true) = skip_prompt {
cmd.arg("-y");
}
let mut child = cmd.spawn()?;

@@ -285,0 +300,0 @@ child.wait()?;