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

Bump gevulot-rs to 0.2.0 version #63

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
11 changes: 7 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repository = "https://github.com/gevulotnetwork/gvltctl"
description = "Gevulot Control CLI"

[dependencies]
gevulot-rs = "0.1.3"
gevulot-rs = "0.2.0"

bip32 = "0.5.1"
cargo_metadata = "0.19"
Expand All @@ -27,7 +27,7 @@ toml = "0.8.19"
openssl = { version = "*", optional = true }

# Linux VM builder dependencies
mia-installer = { git = "https://github.com/gevulotnetwork/mia.git", tag = "mia-installer-0.2.5" }
mia-installer = { git = "https://github.com/gevulotnetwork/mia.git", tag = "mia-installer-0.3.0" }

anyhow = "1"
log = "0.4.22"
Expand Down Expand Up @@ -68,6 +68,3 @@ vm-builder-v2 = [
"dep:tar",
"dep:mbrman",
]

[patch.crates-io]
gevulot-rs = { git = "https://github.com/gevulotnetwork/gevulot-rs", rev = "9aad7a9cbea15e9007ff5b45a566212bdf853620" }
7 changes: 5 additions & 2 deletions src/commands/pins.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,11 @@ async fn create_pin(
.creator(me.clone())
.cid(pin.spec.cid.clone())
.fallback_urls(pin.spec.fallback_urls.unwrap_or_default())
.bytes(ByteSize::new(pin.spec.bytes as u64, ByteUnit::Byte))
.time(pin.spec.time as u64)
.bytes(ByteSize::new(
pin.spec.bytes.bytes()? as u64,
ByteUnit::Byte,
))
.time(pin.spec.time.seconds()? as u64)
.redundancy(pin.spec.redundancy as u64)
.name(pin.metadata.name)
.description(pin.metadata.description)
Expand Down
12 changes: 6 additions & 6 deletions src/commands/tasks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,15 +217,15 @@ pub async fn create_task(
.map(|oc| (oc.source, oc.retention_period as u64))
.collect(),
)
.cpus(task.spec.resources.cpus as u64)
.gpus(task.spec.resources.gpus as u64)
.cpus(task.spec.resources.cpus.millicores()? as u64)
.gpus(task.spec.resources.gpus.millicores()? as u64)
.memory(ByteSize::new(
task.spec.resources.memory as u64,
task.spec.resources.memory.bytes()? as u64,
ByteUnit::Byte,
))
.time(task.spec.resources.time as u64)
.store_stdout(task.spec.store_stdout.unwrap_or(false))
.store_stderr(task.spec.store_stderr.unwrap_or(false))
.time(task.spec.resources.time.seconds()? as u64)
.store_stdout(task.spec.store_stdout)
.store_stderr(task.spec.store_stderr)
.labels(labels)
.into_message()?,
)
Expand Down
14 changes: 10 additions & 4 deletions src/commands/workers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,16 @@ async fn create_worker(
.description(worker.metadata.description)
.tags(worker.metadata.tags.into_iter().map(Into::into).collect())
.labels(worker.metadata.labels.into_iter().map(Into::into).collect())
.cpus(worker.spec.cpus as u64)
.gpus(worker.spec.gpus as u64)
.memory(ByteSize::new(worker.spec.memory as u64, ByteUnit::Byte))
.disk(ByteSize::new(worker.spec.disk as u64, ByteUnit::Byte))
.cpus(worker.spec.cpus.millicores()? as u64)
.gpus(worker.spec.gpus.millicores()? as u64)
.memory(ByteSize::new(
worker.spec.memory.bytes()? as u64,
ByteUnit::Byte,
))
.disk(ByteSize::new(
worker.spec.disk.bytes()? as u64,
ByteUnit::Byte,
))
.into_message()?,
)
.await?;
Expand Down
Loading