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

Include task labels #61

Merged
merged 1 commit into from
Feb 27, 2025
Merged
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
8 changes: 8 additions & 0 deletions src/commands/tasks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,13 @@ pub async fn create_task(
.map(|e| (e.source.clone(), e.target.clone()))
.collect();

let labels: HashMap<String, String> = task
.metadata
.labels
.into_iter()
.map(|label| (label.key, label.value))
.collect();

let resp = client
.tasks
.create(
Expand All @@ -219,6 +226,7 @@ pub async fn create_task(
.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))
.labels(labels)
.into_message()?,
)
.await?;
Expand Down
Loading