Compare commits

...

1 Commits

Author SHA1 Message Date
windmill-internal-app[bot]
9294998efa AI: Updates to files (run 16182172858) 2025-07-09 23:53:31 +00:00
13 changed files with 76 additions and 5 deletions

View File

@@ -78,6 +78,7 @@ async fn clone_repo(
clone_cmd.arg(&repo.url);
clone_cmd.arg(&target_path);
clone_cmd.kill_on_drop(true);
let clone_cmd_child = start_child_process(clone_cmd, GIT_PATH.as_str()).await?;
handle_child(
job_id,
@@ -99,6 +100,7 @@ async fn clone_repo(
// Checkout specific commit if provided
if let Some(commit) = &repo.commit {
let mut checkout_cmd = Command::new(GIT_PATH.as_str());
checkout_cmd.kill_on_drop(true);
checkout_cmd
.current_dir(job_dir)
.env_clear()
@@ -132,6 +134,7 @@ async fn clone_repo(
}
let mut rev_parse_cmd = Command::new(GIT_PATH.as_str());
rev_parse_cmd.kill_on_drop(true);
let commit_hash_output = rev_parse_cmd
.current_dir(job_dir)
@@ -202,6 +205,7 @@ async fn clone_repo_without_history(
create_empty_dir(&target_path)?;
let mut init_cmd = Command::new(GIT_PATH.as_str());
init_cmd.kill_on_drop(true);
init_cmd
.current_dir(job_dir)
.env_clear()
@@ -236,6 +240,7 @@ async fn clone_repo_without_history(
.await?;
let mut add_remote_cmd = Command::new(GIT_PATH.as_str());
add_remote_cmd.kill_on_drop(true);
add_remote_cmd
.current_dir(job_dir)
.env_clear()
@@ -268,6 +273,7 @@ async fn clone_repo_without_history(
.await?;
let mut fetch_cmd = Command::new(GIT_PATH.as_str());
fetch_cmd.kill_on_drop(true);
fetch_cmd
.current_dir(job_dir)
.env_clear()
@@ -300,6 +306,7 @@ async fn clone_repo_without_history(
.await?;
let mut checkout_cmd = Command::new(GIT_PATH.as_str());
checkout_cmd.kill_on_drop(true);
checkout_cmd
.current_dir(job_dir)
.env_clear()
@@ -429,6 +436,7 @@ pub async fn install_galaxy_collections(
.await;
let mut galaxy_roles_cmd = Command::new(ANSIBLE_GALAXY_PATH.as_str());
galaxy_roles_cmd.kill_on_drop(true);
galaxy_roles_cmd
.current_dir(job_dir)
.env_clear()
@@ -466,6 +474,7 @@ pub async fn install_galaxy_collections(
.await?;
let mut galaxy_collections_cmd = Command::new(ANSIBLE_GALAXY_PATH.as_str());
galaxy_collections_cmd.kill_on_drop(true);
galaxy_collections_cmd
.current_dir(job_dir)
.env_clear()
@@ -519,6 +528,7 @@ pub async fn get_collection_locks(
job_dir: &str,
) -> anyhow::Result<(HashMap<String, String>, String)> {
let mut ansible_cmd = Command::new(ANSIBLE_GALAXY_PATH.as_str());
ansible_cmd.kill_on_drop(true);
ansible_cmd
.current_dir(job_dir)
@@ -563,6 +573,7 @@ pub async fn get_collection_locks(
pub async fn get_role_locks(job_dir: &str) -> anyhow::Result<(HashMap<String, String>, String)> {
let mut ansible_cmd = Command::new(ANSIBLE_GALAXY_PATH.as_str());
ansible_cmd.kill_on_drop(true);
ansible_cmd
.current_dir(job_dir)
@@ -610,6 +621,7 @@ pub async fn get_git_repo_full_head_commit_hash(
git_ssh_cmd: &str,
) -> anyhow::Result<String> {
let mut git_cmd = Command::new(GIT_PATH.as_str());
git_cmd.kill_on_drop(true);
git_cmd
.env("GIT_SSH_COMMAND", git_ssh_cmd)
@@ -1073,6 +1085,7 @@ fi
file.metadata()?.permissions().set_mode(0o777);
// let mut nsjail_cmd = Command::new(NSJAIL_PATH.as_str());
let mut nsjail_cmd = Command::new(NSJAIL_PATH.as_str());
nsjail_cmd.kill_on_drop(true);
nsjail_cmd
.current_dir(job_dir)
.env_clear()
@@ -1099,6 +1112,7 @@ fi
start_child_process(nsjail_cmd, NSJAIL_PATH.as_str()).await?
} else {
let mut ansible_cmd = Command::new(ANSIBLE_PLAYBOOK_PATH.as_str());
ansible_cmd.kill_on_drop(true);
ansible_cmd
.current_dir(job_dir)
.env_clear()

View File

@@ -183,6 +183,7 @@ exit $exit_status
];
cmd_args.extend(args);
let mut nsjail_cmd = Command::new(NSJAIL_PATH.as_str());
nsjail_cmd.kill_on_drop(true);
nsjail_cmd
.current_dir(job_dir)
.env_clear()
@@ -198,6 +199,7 @@ exit $exit_status
let mut cmd_args = vec!["wrapper.sh"];
cmd_args.extend(&args);
let mut bash_cmd = Command::new(BIN_BASH.as_str());
bash_cmd.kill_on_drop(true);
bash_cmd
.current_dir(job_dir)
.env_clear()
@@ -618,7 +620,9 @@ pub async fn handle_powershell_job(
.collect::<Vec<_>>()
.join(", "),
);
let child = Command::new(POWERSHELL_PATH.as_str())
let mut child_cmd = Command::new(POWERSHELL_PATH.as_str());
child_cmd.kill_on_drop(true);
let child = child_cmd
.args(&["-Command", &install_string])
.stdout(Stdio::piped())
.stderr(Stdio::piped())
@@ -750,7 +754,11 @@ $env:PSModulePath = \"{};$PSModulePathBackup\"",
"wrapper.sh",
];
cmd_args.extend(pwsh_args.iter().map(|x| x.as_str()));
Command::new(NSJAIL_PATH.as_str())
{
let mut cmd = Command::new(NSJAIL_PATH.as_str());
cmd.kill_on_drop(true);
cmd
}
.current_dir(job_dir)
.env_clear()
.envs(PROXY_ENVS.clone())
@@ -771,6 +779,7 @@ $env:PSModulePath = \"{};$PSModulePathBackup\"",
cmd_args = vec!["wrapper.sh"];
cmd_args.extend(pwsh_args.iter().map(|x| x.as_str()));
cmd = Command::new(BIN_BASH.as_str());
cmd.kill_on_drop(true);
}
#[cfg(windows)]
@@ -778,6 +787,7 @@ $env:PSModulePath = \"{};$PSModulePathBackup\"",
cmd_args = vec![r".\wrapper.ps1".to_string()];
cmd_args.extend(pwsh_args.iter().map(|x| x.replace("--", "-")));
cmd = Command::new(POWERSHELL_PATH.as_str());
cmd.kill_on_drop(true);
}
cmd.current_dir(job_dir)

View File

@@ -140,6 +140,7 @@ pub async fn gen_bun_lockfile(
gen_bunfig(job_dir).await?;
let mut child_cmd = Command::new(&*BUN_PATH);
child_cmd.kill_on_drop(true);
child_cmd
.current_dir(job_dir)
.env_clear()
@@ -293,6 +294,7 @@ pub async fn install_bun_lockfile(
occupancy_metrics: &mut Option<&mut OccupancyMetrics>,
) -> Result<()> {
let mut child_cmd = Command::new(if npm_mode { &*NPM_PATH } else { &*BUN_PATH });
child_cmd.kill_on_drop(true);
child_cmd
.current_dir(job_dir)
.env_clear()
@@ -508,6 +510,7 @@ pub async fn generate_wrapper_mjs(
occupancy_metrics: &mut Option<&mut OccupancyMetrics>,
) -> Result<()> {
let mut child = Command::new(&*BUN_PATH);
child.kill_on_drop(true);
child
.current_dir(job_dir)
.env_clear()
@@ -558,6 +561,7 @@ pub async fn generate_bun_bundle(
occupancy_metrics: &mut Option<&mut OccupancyMetrics>,
) -> Result<()> {
let mut child = Command::new(&*BUN_PATH);
child.kill_on_drop(true);
child
.current_dir(job_dir)
.env_clear()
@@ -1335,6 +1339,7 @@ try {{
)?;
let mut nsjail_cmd = Command::new(NSJAIL_PATH.as_str());
nsjail_cmd.kill_on_drop(true);
let args = if annotation.nodejs {
vec![
"--config",
@@ -1383,6 +1388,7 @@ try {{
let script_path = format!("{job_dir}/wrapper.mjs");
let mut bun_cmd = Command::new(&*NODE_BIN_PATH);
bun_cmd.kill_on_drop(true);
bun_cmd
.current_dir(job_dir)
.env_clear()
@@ -1401,6 +1407,7 @@ try {{
let script_path = format!("{job_dir}/wrapper.mjs");
let mut bun_cmd = Command::new(&*BUN_PATH);
bun_cmd.kill_on_drop(true);
let args = if codebase.is_some() || has_bundle_cache {
vec!["run", &script_path]
} else {

View File

@@ -83,6 +83,7 @@ pub async fn generate_nuget_lockfile(
gen_cs_proj(code, job_dir, reqs, lines_to_remove)?;
let mut gen_lockfile_cmd = Command::new(DOTNET_PATH.as_str());
gen_lockfile_cmd.kill_on_drop(true);
gen_lockfile_cmd
.current_dir(job_dir)
.args(vec!["restore", "--use-lock-file"])
@@ -323,6 +324,7 @@ async fn build_cs_proj(
}
let mut build_cs_cmd = Command::new(DOTNET_PATH.as_str());
build_cs_cmd.kill_on_drop(true);
build_cs_cmd
.current_dir(job_dir)
.env_clear()
@@ -555,6 +557,7 @@ pub async fn handle_csharp_job(
.replace("{SHARED_MOUNT}", shared_mount),
)?;
let mut nsjail_cmd = Command::new(NSJAIL_PATH.as_str());
nsjail_cmd.kill_on_drop(true);
nsjail_cmd
.current_dir(job_dir)
.env_clear()
@@ -584,6 +587,7 @@ pub async fn handle_csharp_job(
format!("{job_dir}/Main.exe")
};
let mut run_csharp = Command::new(&compiled_executable_name);
run_csharp.kill_on_drop(true);
run_csharp
.current_dir(job_dir)
.env_clear()

View File

@@ -123,6 +123,7 @@ pub async fn generate_deno_lock(
let deno_envs = get_common_deno_proc_envs("", base_internal_url).await;
let mut child_cmd = Command::new(DENO_PATH.as_str());
child_cmd.kill_on_drop(true);
child_cmd
.current_dir(job_dir)
.args(vec![
@@ -394,6 +395,7 @@ try {{
}
args.push(&script_path);
let mut deno_cmd = Command::new(DENO_PATH.as_str());
deno_cmd.kill_on_drop(true);
deno_cmd
.current_dir(job_dir)
.env_clear()

View File

@@ -235,6 +235,7 @@ func Run(req Req) (interface{{}}, error){{
}
let mut build_go_cmd = Command::new(GO_PATH.as_str());
build_go_cmd.kill_on_drop(true);
build_go_cmd
.current_dir(job_dir)
.env_clear()
@@ -352,6 +353,7 @@ func Run(req Req) (interface{{}}, error){{
.replace("{SHARED_MOUNT}", shared_mount),
)?;
let mut nsjail_cmd = Command::new(NSJAIL_PATH.as_str());
nsjail_cmd.kill_on_drop(true);
nsjail_cmd
.current_dir(job_dir)
.env_clear()
@@ -372,8 +374,10 @@ func Run(req Req) (interface{{}}, error){{
#[cfg(unix)]
let mut run_go = Command::new(&compiled_executable_name);
run_go.kill_on_drop(true);
#[cfg(windows)]
let mut run_go = Command::new(&compiled_executable_name);
run_go.kill_on_drop(true);
run_go
.current_dir(job_dir)
@@ -476,6 +480,7 @@ pub async fn install_go_dependencies(
if !raw_deps && !skip_go_mod {
gen_go_mymod(code, job_dir).await?;
let mut child_cmd = Command::new(GO_PATH.as_str());
child_cmd.kill_on_drop(true);
child_cmd
.current_dir(job_dir)
.env_clear()
@@ -563,6 +568,7 @@ pub async fn install_go_dependencies(
"tidy"
};
let mut child_cmd = Command::new(GO_PATH.as_str());
child_cmd.kill_on_drop(true);
child_cmd
.current_dir(job_dir)
.env_clear()

View File

@@ -179,6 +179,7 @@ pub async fn resolve<'a>(
} else {
JAVA_PATH.as_str()
});
cmd.kill_on_drop(true);
cmd.env_clear()
.current_dir(job_dir.to_owned())
.env("PATH", PATH_ENV.as_str())
@@ -320,6 +321,7 @@ async fn install<'a>(
} else {
JAVA_PATH.as_str()
});
cmd.kill_on_drop(true);
let artifacts = dependencies
.into_iter()
.map(|e| {
@@ -491,6 +493,7 @@ async fn compile<'a>(
} else {
JAVAC_PATH.as_str()
});
cmd.kill_on_drop(true);
cmd.env_clear()
.current_dir(job_dir.to_owned())
.env("PATH", PATH_ENV.as_str())
@@ -601,6 +604,7 @@ async fn run<'a>(
.replace("{CLONE_NEWUSER}", &(!*DISABLE_NUSER).to_string()),
)?;
let mut cmd = Command::new(NSJAIL_PATH.as_str());
cmd.kill_on_drop(true);
cmd.env_clear()
.current_dir(job_dir)
.env("PATH", PATH_ENV.as_str())
@@ -657,6 +661,7 @@ async fn run<'a>(
} else {
JAVA_PATH.as_str()
});
cmd.kill_on_drop(true);
cmd.env_clear()
.current_dir(job_dir.to_owned())
.env("PATH", PATH_ENV.as_str())

View File

@@ -254,6 +254,7 @@ async fn run<'a>(
.replace("{CLONE_NEWUSER}", &(!*DISABLE_NUSER).to_string()),
)?;
let mut nsjail_cmd = Command::new(NSJAIL_PATH.as_str());
nsjail_cmd.kill_on_drop(true);
nsjail_cmd
.env_clear()
.current_dir(job_dir)
@@ -291,6 +292,7 @@ async fn run<'a>(
} else {
NU_PATH.as_str()
});
cmd.kill_on_drop(true);
cmd.env_clear()
.current_dir(job_dir.to_owned())
.env("PATH", PATH_ENV.as_str())

View File

@@ -84,6 +84,7 @@ pub async fn composer_install(
}
let mut child_cmd = Command::new(&*COMPOSER_PATH);
child_cmd.kill_on_drop(true);
let args = vec!["install", "--no-dev", "--no-progress"];
child_cmd
.current_dir(job_dir)
@@ -290,6 +291,7 @@ try {{
)?;
let mut nsjail_cmd = Command::new(NSJAIL_PATH.as_str());
nsjail_cmd.kill_on_drop(true);
let args = vec![
"--config",
"run.config.proto",
@@ -313,6 +315,7 @@ try {{
let script_path = format!("{job_dir}/wrapper.php");
let mut php_cmd = Command::new(&*PHP_PATH);
php_cmd.kill_on_drop(true);
let args = vec![&script_path];
php_cmd
.current_dir(job_dir)

View File

@@ -308,6 +308,7 @@ pub async fn uv_pip_compile(
let uv_cmd = UV_PATH.as_str();
let mut child_cmd = Command::new(uv_cmd);
child_cmd.kill_on_drop(true);
child_cmd
.current_dir(job_dir)
.env_clear()
@@ -795,6 +796,7 @@ mount {{
let child = if !*DISABLE_NSJAIL {
let mut nsjail_cmd = Command::new(NSJAIL_PATH.as_str());
nsjail_cmd.kill_on_drop(true);
nsjail_cmd
.current_dir(job_dir)
.env_clear()
@@ -819,6 +821,7 @@ mount {{
start_child_process(nsjail_cmd, NSJAIL_PATH.as_str()).await?
} else {
let mut python_cmd = Command::new(&python_path);
python_cmd.kill_on_drop(true);
let args = vec!["-u", "-m", "wrapper"];
python_cmd
@@ -1339,6 +1342,7 @@ async fn spawn_uv_install(
)?;
let mut nsjail_cmd = Command::new(NSJAIL_PATH.as_str());
nsjail_cmd.kill_on_drop(true);
nsjail_cmd
.current_dir(job_dir)
.env_clear()
@@ -1424,6 +1428,7 @@ async fn spawn_uv_install(
#[cfg(unix)]
{
let mut cmd = Command::new(command_args[0]);
cmd.kill_on_drop(true);
cmd.env_clear()
.envs(PROXY_ENVS.clone())
.envs(envs)
@@ -1436,6 +1441,7 @@ async fn spawn_uv_install(
#[cfg(windows)]
{
let mut cmd: Command = Command::new("uv");
cmd.kill_on_drop(true);
cmd.env_clear()
.envs(envs)
.envs(PROXY_ENVS.clone())

View File

@@ -356,7 +356,11 @@ impl PyV {
#[cfg(unix)]
let uv_cmd = UV_PATH.as_str();
Command::new(uv_cmd)
{
let mut cmd = Command::new(uv_cmd);
cmd.kill_on_drop(true);
cmd
}
.env_clear()
.envs(WIN_ENVS.to_vec())
.args([
@@ -612,6 +616,7 @@ impl PyV {
let uv_cmd = UV_PATH.as_str();
let mut child_cmd = Command::new(uv_cmd);
child_cmd.kill_on_drop(true);
child_cmd
.env_clear()
.env("HOME", HOME_ENV.to_string())
@@ -667,6 +672,7 @@ impl PyV {
let uv_cmd = UV_PATH.as_str();
let mut child_cmd = Command::new(uv_cmd);
child_cmd.kill_on_drop(true);
child_cmd.env_clear();

View File

@@ -162,6 +162,7 @@ pub async fn generate_cargo_lockfile(
gen_cargo_crate(code, job_dir)?;
let mut gen_lockfile_cmd = Command::new(CARGO_PATH.as_str());
gen_lockfile_cmd.kill_on_drop(true);
gen_lockfile_cmd
.current_dir(job_dir)
.args(vec!["generate-lockfile"])
@@ -252,6 +253,7 @@ async fn get_build_dir(
if run_sweep {
// Also run sweep to make sure target isn't using too much disk
let mut sweep_cmd = Command::new(CARGO_PATH.as_str());
sweep_cmd.kill_on_drop(true);
sweep_cmd
.current_dir(job_dir)
.env_clear()
@@ -342,6 +344,7 @@ pub async fn build_rust_crate(
.replace("{BUILD}", &build_dir),
)?;
let mut nsjail_cmd = Command::new(NSJAIL_PATH.as_str());
nsjail_cmd.kill_on_drop(true);
nsjail_cmd
.current_dir(job_dir)
.env_clear()
@@ -368,6 +371,7 @@ pub async fn build_rust_crate(
start_child_process(nsjail_cmd, NSJAIL_PATH.as_str()).await?
} else {
let mut build_rust_cmd = Command::new(CARGO_PATH.as_str());
build_rust_cmd.kill_on_drop(true);
build_rust_cmd
.current_dir(job_dir)
.env_clear()
@@ -549,6 +553,7 @@ pub async fn handle_rust_job(
.replace("{SHARED_MOUNT}", shared_mount),
)?;
let mut nsjail_cmd = Command::new(NSJAIL_PATH.as_str());
nsjail_cmd.kill_on_drop(true);
nsjail_cmd
.current_dir(job_dir)
.env_clear()
@@ -564,6 +569,7 @@ pub async fn handle_rust_job(
} else {
let compiled_executable_name = "./main";
let mut run_rust = Command::new(compiled_executable_name);
run_rust.kill_on_drop(true);
run_rust
.current_dir(job_dir)
.env_clear()

View File

@@ -1,12 +1,12 @@
{
"name": "windmill-components",
"version": "1.503.3",
"version": "1.503.4",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "windmill-components",
"version": "1.503.3",
"version": "1.503.4",
"hasInstallScript": true,
"license": "AGPL-3.0",
"dependencies": {