Sync public tree to b67d2a6
This commit is contained in:
parent
21f21fa8b6
commit
1d72f20cce
7 changed files with 466 additions and 6 deletions
|
|
@ -5722,9 +5722,40 @@ fn coordinator_run_report(plan: RunPlan) -> Result<Value> {
|
|||
.get("status")
|
||||
.and_then(Value::as_str)
|
||||
.unwrap_or("coordinator_response");
|
||||
let task = plan.entry.clone();
|
||||
let artifact_path = format!("/vfs/artifacts/{task}-output.txt");
|
||||
let launch_task_response = if status == "started" {
|
||||
let manifest_path = plan.project.join("Cargo.toml");
|
||||
session.request_allow_error(json!({
|
||||
"type": "launch_task",
|
||||
"tenant": tenant.clone(),
|
||||
"project": project.clone(),
|
||||
"actor_user": user.clone(),
|
||||
"process": process.clone(),
|
||||
"task": task.clone(),
|
||||
"environment": null,
|
||||
"environment_digest": null,
|
||||
"required_capabilities": ["Command"],
|
||||
"dependency_cache": null,
|
||||
"source_snapshot": null,
|
||||
"required_artifacts": [],
|
||||
"quota_available": true,
|
||||
"policy_allowed": true,
|
||||
"command": "cargo",
|
||||
"command_args": [
|
||||
"test",
|
||||
"--quiet",
|
||||
"--manifest-path",
|
||||
manifest_path.to_string_lossy()
|
||||
],
|
||||
"artifact_path": artifact_path.clone(),
|
||||
}))?
|
||||
} else {
|
||||
Value::Null
|
||||
};
|
||||
Ok(json!({
|
||||
"command": "run",
|
||||
"status": status,
|
||||
"status": if launch_task_response.get("type").and_then(Value::as_str) == Some("task_launched") { "task_launched" } else { status },
|
||||
"project_root": plan.project,
|
||||
"entry": plan.entry,
|
||||
"tenant": tenant,
|
||||
|
|
@ -5734,6 +5765,9 @@ fn coordinator_run_report(plan: RunPlan) -> Result<Value> {
|
|||
"coordinator": coordinator,
|
||||
"process": process,
|
||||
"run_start": run_start,
|
||||
"task": task,
|
||||
"worker_placement_requested": launch_task_response.is_object(),
|
||||
"task_launch": launch_task_response,
|
||||
"coordinator_response": response,
|
||||
"coordinator_session_requests": session.requests(),
|
||||
"private_website_required": false,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue