Compare commits
1 Commits
fix-py-non
...
dependabot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
65f076fd34 |
2
.github/workflows/backend-test.yml
vendored
2
.github/workflows/backend-test.yml
vendored
@@ -42,7 +42,7 @@ jobs:
|
||||
- uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.21.5
|
||||
- uses: actions/setup-python@v2
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.11
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
|
||||
16
CHANGELOG.md
16
CHANGELOG.md
@@ -1,21 +1,5 @@
|
||||
# Changelog
|
||||
|
||||
## [1.441.2](https://github.com/windmill-labs/windmill/compare/v1.441.1...v1.441.2) (2024-12-27)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **backend:** fix zombies left by the bash executor ([#4985](https://github.com/windmill-labs/windmill/issues/4985)) ([8db69ce](https://github.com/windmill-labs/windmill/commit/8db69ce15e25601d0ac2ac98b1e45c0c01c11967))
|
||||
|
||||
## [1.441.1](https://github.com/windmill-labs/windmill/compare/v1.441.0...v1.441.1) (2024-12-24)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **backend:** timeout for bigquery/graphql/snowflake ([#4965](https://github.com/windmill-labs/windmill/issues/4965)) ([1d20dea](https://github.com/windmill-labs/windmill/commit/1d20dea6630407840fd058a8b51c410fae3fbe78))
|
||||
* windows compatibility for C# ([#4980](https://github.com/windmill-labs/windmill/issues/4980)) ([b12e9c3](https://github.com/windmill-labs/windmill/commit/b12e9c3005db10d15ee27894a819dbb556832a83))
|
||||
* **windows&python:** Access is denied. (os error 5) ([#4969](https://github.com/windmill-labs/windmill/issues/4969)) ([6bd2dc3](https://github.com/windmill-labs/windmill/commit/6bd2dc38325388a55dd288b94e26ac6018622aaa))
|
||||
|
||||
## [1.441.0](https://github.com/windmill-labs/windmill/compare/v1.440.3...v1.441.0) (2024-12-20)
|
||||
|
||||
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "\n UPDATE queue SET flow_status = JSONB_SET(flow_status, ARRAY['user_states'], JSONB_SET(COALESCE(flow_status->'user_states', '{}'::jsonb), ARRAY[$1], $2))\n WHERE id = $3 AND workspace_id = $4 AND job_kind IN ('flow', 'flowpreview', 'flownode') RETURNING 1\n ",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "?column?",
|
||||
"type_info": "Int4"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Text",
|
||||
"Jsonb",
|
||||
"Uuid",
|
||||
"Text"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
null
|
||||
]
|
||||
},
|
||||
"hash": "364248db86a9228bba6ff522e811d68c5c902ee0a07ea69bff772ff10d0dc5aa"
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "UPDATE queue SET running = false, started_at = null\n WHERE last_ping < now() - ($1 || ' seconds')::interval\n AND running = true AND job_kind NOT IN ('flow', 'flowpreview', 'flownode', 'singlescriptflow') AND same_worker = false RETURNING id, workspace_id, last_ping",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "workspace_id",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 2,
|
||||
"name": "last_ping",
|
||||
"type_info": "Timestamptz"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Text"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false,
|
||||
false,
|
||||
true
|
||||
]
|
||||
},
|
||||
"hash": "84576f6add15108ade2ed3a88185d67db17904859e5f01f1d578af4e1d062a85"
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "\n SELECT usr.email, usage.executions\n FROM usr\n , LATERAL (\n SELECT COALESCE(SUM(duration_ms + 1000)/1000 , 0)::BIGINT executions\n FROM completed_job\n WHERE workspace_id = $1\n AND job_kind NOT IN ('flow', 'flowpreview', 'flownode')\n AND email = usr.email\n AND now() - '1 week'::interval < created_at \n ) usage\n WHERE workspace_id = $1\n ",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "email",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "executions",
|
||||
"type_info": "Int8"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Text"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false,
|
||||
null
|
||||
]
|
||||
},
|
||||
"hash": "f6a275ad8bc7dfec7f9a6b60c669f6f2ff93ce57b5afadabd618e1fb52951fef"
|
||||
}
|
||||
282
backend/Cargo.lock
generated
282
backend/Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "windmill"
|
||||
version = "1.441.2"
|
||||
version = "1.441.0"
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
|
||||
@@ -30,7 +30,7 @@ members = [
|
||||
]
|
||||
|
||||
[workspace.package]
|
||||
version = "1.441.2"
|
||||
version = "1.441.0"
|
||||
authors = ["Ruben Fiszel <ruben@windmill.dev>"]
|
||||
edition = "2021"
|
||||
|
||||
|
||||
@@ -1497,7 +1497,7 @@ async fn handle_zombie_jobs(db: &Pool<Postgres>, base_internal_url: &str, worker
|
||||
let restarted = sqlx::query!(
|
||||
"UPDATE queue SET running = false, started_at = null
|
||||
WHERE last_ping < now() - ($1 || ' seconds')::interval
|
||||
AND running = true AND job_kind NOT IN ('flow', 'flowpreview', 'flownode', 'singlescriptflow') AND same_worker = false RETURNING id, workspace_id, last_ping",
|
||||
AND running = true AND job_kind NOT IN ('flow', 'flowpreview', 'singlescriptflow') AND same_worker = false RETURNING id, workspace_id, last_ping",
|
||||
*ZOMBIE_JOB_TIMEOUT,
|
||||
)
|
||||
.fetch_all(db)
|
||||
@@ -1534,7 +1534,7 @@ async fn handle_zombie_jobs(db: &Pool<Postgres>, base_internal_url: &str, worker
|
||||
|
||||
let mut timeout_query =
|
||||
"SELECT * FROM queue WHERE last_ping < now() - ($1 || ' seconds')::interval
|
||||
AND running = true AND job_kind NOT IN ('flow', 'flowpreview', 'flownode', 'singlescriptflow')"
|
||||
AND running = true AND job_kind NOT IN ('flow', 'flowpreview', 'singlescriptflow')"
|
||||
.to_string();
|
||||
if *RESTART_ZOMBIE_JOBS {
|
||||
timeout_query.push_str(" AND same_worker = true");
|
||||
@@ -1618,7 +1618,7 @@ async fn handle_zombie_flows(db: &DB) -> error::Result<()> {
|
||||
r#"
|
||||
SELECT *
|
||||
FROM queue
|
||||
WHERE running = true AND suspend = 0 AND suspend_until IS null AND scheduled_for <= now() AND (job_kind = 'flow' OR job_kind = 'flowpreview' OR job_kind = 'flownode')
|
||||
WHERE running = true AND suspend = 0 AND suspend_until IS null AND scheduled_for <= now() AND (job_kind = 'flow' OR job_kind = 'flowpreview')
|
||||
AND last_ping IS NOT NULL AND last_ping < NOW() - ($1 || ' seconds')::interval AND canceled = false
|
||||
"#,
|
||||
).bind(FLOW_ZOMBIE_TRANSITION_TIMEOUT.as_str())
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
openapi: "3.0.3"
|
||||
|
||||
info:
|
||||
version: 1.441.2
|
||||
version: 1.441.0
|
||||
title: Windmill API
|
||||
|
||||
contact:
|
||||
|
||||
@@ -65,7 +65,6 @@ impl WebhookArgs {
|
||||
let s3_client = build_object_store_client(&s3_resource).await?;
|
||||
|
||||
let mut body = HashMap::new();
|
||||
let mut files = HashMap::new();
|
||||
|
||||
while let Some(field) = multipart.next_field().await.map_err(|e| {
|
||||
Error::BadRequest(format!(
|
||||
@@ -108,9 +107,12 @@ impl WebhookArgs {
|
||||
)
|
||||
.await?;
|
||||
|
||||
files.entry(name).or_insert(vec![]).push(serde_json::json!({
|
||||
"s3": &file_key
|
||||
}));
|
||||
body.insert(
|
||||
name,
|
||||
to_raw_value(&serde_json::json!({
|
||||
"s3": &file_key
|
||||
})),
|
||||
);
|
||||
} else {
|
||||
body.insert(
|
||||
name,
|
||||
@@ -120,10 +122,6 @@ impl WebhookArgs {
|
||||
}
|
||||
}
|
||||
|
||||
for (k, v) in files {
|
||||
body.insert(k, to_raw_value(&v));
|
||||
}
|
||||
|
||||
if self.wrap_body.unwrap_or(false) {
|
||||
self.args
|
||||
.args
|
||||
|
||||
@@ -2340,7 +2340,7 @@ pub async fn set_flow_user_state(
|
||||
let r = sqlx::query_scalar!(
|
||||
r#"
|
||||
UPDATE queue SET flow_status = JSONB_SET(flow_status, ARRAY['user_states'], JSONB_SET(COALESCE(flow_status->'user_states', '{}'::jsonb), ARRAY[$1], $2))
|
||||
WHERE id = $3 AND workspace_id = $4 AND job_kind IN ('flow', 'flowpreview', 'flownode') RETURNING 1
|
||||
WHERE id = $3 AND workspace_id = $4 AND job_kind IN ('flow', 'flowpreview') RETURNING 1
|
||||
"#,
|
||||
key,
|
||||
value,
|
||||
|
||||
@@ -473,7 +473,7 @@ async fn list_user_usage(
|
||||
SELECT COALESCE(SUM(duration_ms + 1000)/1000 , 0)::BIGINT executions
|
||||
FROM completed_job
|
||||
WHERE workspace_id = $1
|
||||
AND job_kind NOT IN ('flow', 'flowpreview', 'flownode')
|
||||
AND job_kind NOT IN ('flow', 'flowpreview')
|
||||
AND email = usr.email
|
||||
AND now() - '1 week'::interval < created_at
|
||||
) usage
|
||||
|
||||
@@ -122,7 +122,7 @@ exit_status=$?
|
||||
|
||||
# Clean up the named pipe and background processes
|
||||
rm -f bp
|
||||
pkill -P $$ || true
|
||||
|
||||
|
||||
# Exit with the captured status
|
||||
exit $exit_status
|
||||
|
||||
@@ -45,17 +45,11 @@ use crate::SYSTEM_ROOT;
|
||||
#[cfg(feature = "csharp")]
|
||||
const NSJAIL_CONFIG_RUN_CSHARP_CONTENT: &str = include_str!("../nsjail/run.csharp.config.proto");
|
||||
|
||||
#[cfg(feature = "csharp")]
|
||||
#[cfg(windows)]
|
||||
const DOTNET_ROOT_DEFAULT: &str = "C:\\Program Files\\dotnet";
|
||||
|
||||
#[cfg(feature = "csharp")]
|
||||
#[cfg(unix)]
|
||||
const DOTNET_ROOT_DEFAULT: &str = "/usr/share/dotnet";
|
||||
|
||||
#[cfg(feature = "csharp")]
|
||||
lazy_static::lazy_static! {
|
||||
static ref DOTNET_ROOT: String = std::env::var("DOTNET_ROOT").unwrap_or_else(|_| DOTNET_ROOT_DEFAULT.to_string());
|
||||
static ref HOME_DIR: String = std::env::var("HOME").expect("Could not find the HOME environment variable");
|
||||
static ref DOTNET_ROOT: String = std::env::var("DOTNET_ROOT").expect("Could not find the DOTNET_ROOT environment variable");
|
||||
|
||||
}
|
||||
|
||||
#[cfg(feature = "csharp")]
|
||||
@@ -89,30 +83,6 @@ pub async fn generate_nuget_lockfile(
|
||||
.args(vec!["restore", "--use-lock-file"])
|
||||
.stdout(Stdio::piped())
|
||||
.stderr(Stdio::piped());
|
||||
#[cfg(windows)]
|
||||
gen_lockfile_cmd
|
||||
.env("SystemRoot", SYSTEM_ROOT.as_str())
|
||||
.env("SystemRoot", SYSTEM_ROOT.as_str())
|
||||
.env(
|
||||
"TMP",
|
||||
std::env::var("TMP").unwrap_or_else(|_| "C:\\tmp".to_string()),
|
||||
)
|
||||
.env("USERPROFILE", crate::USERPROFILE_ENV.as_str())
|
||||
.env(
|
||||
"APPDATA",
|
||||
std::env::var("APPDATA")
|
||||
.unwrap_or_else(|_| format!("{}\\AppData\\Roaming", HOME_ENV.as_str())),
|
||||
)
|
||||
.env(
|
||||
"ProgramFiles",
|
||||
std::env::var("ProgramFiles").unwrap_or_else(|_| String::from("C:\\Program Files")),
|
||||
)
|
||||
.env(
|
||||
"LOCALAPPDATA",
|
||||
std::env::var("LOCALAPPDATA")
|
||||
.unwrap_or_else(|_| format!("{}\\AppData\\Local", HOME_ENV.as_str())),
|
||||
);
|
||||
|
||||
let gen_lockfile_process = start_child_process(gen_lockfile_cmd, DOTNET_PATH.as_str()).await?;
|
||||
handle_child(
|
||||
job_id,
|
||||
@@ -177,17 +147,6 @@ fn gen_cs_proj(
|
||||
})
|
||||
.join("\n");
|
||||
|
||||
let item_group = if pkgs.is_empty() {
|
||||
"".to_string()
|
||||
} else {
|
||||
format!(
|
||||
r#" <ItemGroup>
|
||||
{pkgs}
|
||||
</ItemGroup>
|
||||
"#
|
||||
)
|
||||
};
|
||||
|
||||
write_file(
|
||||
job_dir,
|
||||
"Main.csproj",
|
||||
@@ -200,7 +159,10 @@ fn gen_cs_proj(
|
||||
<StartupObject>WindmillScriptCSharpInternal.Wrapper</StartupObject>
|
||||
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
|
||||
</PropertyGroup>
|
||||
{item_group}
|
||||
<ItemGroup>
|
||||
{pkgs}
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
"#
|
||||
),
|
||||
@@ -335,27 +297,13 @@ async fn build_cs_proj(
|
||||
.stderr(Stdio::piped());
|
||||
|
||||
#[cfg(windows)]
|
||||
build_cs_cmd
|
||||
.env("SystemRoot", SYSTEM_ROOT.as_str())
|
||||
.env(
|
||||
{
|
||||
build_cs_cmd.env("SystemRoot", SYSTEM_ROOT.as_str());
|
||||
build_cs_cmd.env(
|
||||
"TMP",
|
||||
std::env::var("TMP").unwrap_or_else(|_| "C:\\tmp".to_string()),
|
||||
)
|
||||
.env("USERPROFILE", crate::USERPROFILE_ENV.as_str())
|
||||
.env(
|
||||
"APPDATA",
|
||||
std::env::var("APPDATA")
|
||||
.unwrap_or_else(|_| format!("{}\\AppData\\Roaming", HOME_ENV.as_str())),
|
||||
)
|
||||
.env(
|
||||
"ProgramFiles",
|
||||
std::env::var("ProgramFiles").unwrap_or_else(|_| String::from("C:\\Program Files")),
|
||||
)
|
||||
.env(
|
||||
"LOCALAPPDATA",
|
||||
std::env::var("LOCALAPPDATA")
|
||||
.unwrap_or_else(|_| format!("{}\\AppData\\Local", HOME_ENV.as_str())),
|
||||
);
|
||||
}
|
||||
|
||||
let build_cs_process = start_child_process(build_cs_cmd, DOTNET_PATH.as_str()).await?;
|
||||
handle_child(
|
||||
@@ -374,6 +322,7 @@ async fn build_cs_proj(
|
||||
)
|
||||
.await?;
|
||||
append_logs(job_id, w_id, "\n\n", db).await;
|
||||
|
||||
if let Err(e) = std::fs::remove_file(Path::new(job_dir).join("nuget.config")) {
|
||||
if e.kind() != io::ErrorKind::NotFound {
|
||||
Err(anyhow!("Error erasing nuget.config: {}", e))?;
|
||||
@@ -381,15 +330,11 @@ async fn build_cs_proj(
|
||||
}
|
||||
|
||||
let bin_path = format!("{}/{hash}", CSHARP_CACHE_DIR);
|
||||
#[cfg(unix)]
|
||||
let target = format!("{job_dir}/Main");
|
||||
#[cfg(windows)]
|
||||
let target = format!("{job_dir}/Main.exe");
|
||||
|
||||
match save_cache(
|
||||
&bin_path,
|
||||
&format!("{CSHARP_OBJECT_STORE_PREFIX}{hash}"),
|
||||
&target,
|
||||
&format!("{job_dir}/Main"),
|
||||
)
|
||||
.await
|
||||
{
|
||||
@@ -463,16 +408,18 @@ pub async fn handle_csharp_job(
|
||||
let (cache, cache_logs) = windmill_common::worker::load_cache(&bin_path, &remote_path).await;
|
||||
|
||||
let cache_logs = if cache {
|
||||
let target = format!("{job_dir}/Main");
|
||||
|
||||
#[cfg(unix)]
|
||||
{
|
||||
let target = format!("{job_dir}/Main");
|
||||
let symlink = std::os::unix::fs::symlink(&bin_path, &target);
|
||||
symlink.map_err(|e| {
|
||||
Error::ExecutionErr(format!(
|
||||
"could not copy cached binary from {bin_path} to {job_dir}/Main: {e:?}"
|
||||
))
|
||||
})?;
|
||||
}
|
||||
let symlink = std::os::unix::fs::symlink(&bin_path, &target);
|
||||
#[cfg(windows)]
|
||||
let symlink = std::os::windows::fs::symlink_dir(&bin_path, &target);
|
||||
|
||||
symlink.map_err(|e| {
|
||||
Error::ExecutionErr(format!(
|
||||
"could not copy cached binary from {bin_path} to {job_dir}/main: {e:?}"
|
||||
))
|
||||
})?;
|
||||
|
||||
cache_logs
|
||||
} else {
|
||||
@@ -550,21 +497,10 @@ pub async fn handle_csharp_job(
|
||||
.args(vec!["--config", "run.config.proto", "--", "/tmp/main"])
|
||||
.stdout(Stdio::piped())
|
||||
.stderr(Stdio::piped());
|
||||
|
||||
#[cfg(windows)]
|
||||
nsjail_cmd.env("SystemRoot", SYSTEM_ROOT.as_str());
|
||||
|
||||
start_child_process(nsjail_cmd, NSJAIL_PATH.as_str()).await?
|
||||
} else {
|
||||
#[cfg(unix)]
|
||||
let compiled_executable_name = "./Main".to_string();
|
||||
#[cfg(windows)]
|
||||
let compiled_executable_name = if cache {
|
||||
bin_path.to_string()
|
||||
} else {
|
||||
format!("{job_dir}/Main.exe")
|
||||
};
|
||||
let mut run_csharp = Command::new(&compiled_executable_name);
|
||||
let compiled_executable_name = "./Main";
|
||||
let mut run_csharp = Command::new(compiled_executable_name);
|
||||
run_csharp
|
||||
.current_dir(job_dir)
|
||||
.env_clear()
|
||||
@@ -579,31 +515,8 @@ pub async fn handle_csharp_job(
|
||||
.env("HOME", HOME_ENV.as_str())
|
||||
.stdout(Stdio::piped())
|
||||
.stderr(Stdio::piped());
|
||||
#[cfg(windows)]
|
||||
run_csharp
|
||||
.env("SystemRoot", SYSTEM_ROOT.as_str())
|
||||
.env("SystemRoot", SYSTEM_ROOT.as_str())
|
||||
.env(
|
||||
"TMP",
|
||||
std::env::var("TMP").unwrap_or_else(|_| "C:\\tmp".to_string()),
|
||||
)
|
||||
.env("USERPROFILE", crate::USERPROFILE_ENV.as_str())
|
||||
.env(
|
||||
"APPDATA",
|
||||
std::env::var("APPDATA")
|
||||
.unwrap_or_else(|_| format!("{}\\AppData\\Roaming", HOME_ENV.as_str())),
|
||||
)
|
||||
.env(
|
||||
"ProgramFiles",
|
||||
std::env::var("ProgramFiles").unwrap_or_else(|_| String::from("C:\\Program Files")),
|
||||
)
|
||||
.env(
|
||||
"LOCALAPPDATA",
|
||||
std::env::var("LOCALAPPDATA")
|
||||
.unwrap_or_else(|_| format!("{}\\AppData\\Local", HOME_ENV.as_str())),
|
||||
);
|
||||
|
||||
start_child_process(run_csharp, &compiled_executable_name).await?
|
||||
start_child_process(run_csharp, compiled_executable_name).await?
|
||||
};
|
||||
|
||||
handle_child(
|
||||
|
||||
@@ -7,7 +7,6 @@ use std::{
|
||||
};
|
||||
|
||||
use anyhow::anyhow;
|
||||
use futures::lock::Mutex;
|
||||
use itertools::Itertools;
|
||||
use regex::Regex;
|
||||
use serde_json::value::RawValue;
|
||||
@@ -36,9 +35,6 @@ use windmill_common::variables::get_secret_value_as_admin;
|
||||
use windmill_queue::{append_logs, CanceledBy};
|
||||
|
||||
lazy_static::lazy_static! {
|
||||
|
||||
static ref BUSY_WITH_UV_INSTALL: Mutex<()> = Mutex::new(());
|
||||
|
||||
static ref PYTHON_PATH: String =
|
||||
std::env::var("PYTHON_PATH").unwrap_or_else(|_| "/usr/local/bin/python3".to_string());
|
||||
|
||||
@@ -1249,6 +1245,7 @@ async fn spawn_uv_install(
|
||||
"--target",
|
||||
venv_p,
|
||||
"--no-cache",
|
||||
"-q",
|
||||
]
|
||||
};
|
||||
|
||||
@@ -1357,7 +1354,6 @@ pub async fn handle_python_reqs(
|
||||
mut no_uv_install: bool,
|
||||
is_ansible: bool,
|
||||
) -> error::Result<Vec<String>> {
|
||||
let lock = BUSY_WITH_UV_INSTALL.lock().await;
|
||||
let counter_arc = Arc::new(tokio::sync::Mutex::new(0));
|
||||
// Append logs with line like this:
|
||||
// [9/21] + requests==2.32.3 << (S3) | in 57ms
|
||||
@@ -1488,6 +1484,7 @@ pub async fn handle_python_reqs(
|
||||
req.replace(' ', "").replace('/', "").replace(':', "")
|
||||
);
|
||||
if metadata(&venv_p).await.is_ok() {
|
||||
// If dir exists skip installation and push path to output
|
||||
req_paths.push(venv_p);
|
||||
in_cache.push(req.to_string());
|
||||
} else {
|
||||
@@ -1521,12 +1518,6 @@ pub async fn handle_python_reqs(
|
||||
let pids = Arc::new(tokio::sync::Mutex::new(vec![None; total_to_install]));
|
||||
let mem_peak_thread_safe = Arc::new(tokio::sync::Mutex::new(0));
|
||||
{
|
||||
// when we cancel the job, it has up to 1 second window before actually getting cancelled
|
||||
// Thus the directory with wheel in windmill's cache cleaned only after that.
|
||||
// If we manage to start new job during that period windmill might see that wanted wheel is already there (because we have not cleaned it yet)
|
||||
// and write it to installed wheels, meanwhile previous job will clean that wheel.
|
||||
// To fix that we create lock, which will pipeline all uv installs on worker
|
||||
let _lock = lock;
|
||||
let pids = pids.clone();
|
||||
let mem_peak_thread_safe = mem_peak_thread_safe.clone();
|
||||
tokio::spawn(async move {
|
||||
@@ -1769,12 +1760,10 @@ pub async fn handle_python_reqs(
|
||||
}
|
||||
};
|
||||
|
||||
let mut stderr_buf = String::new();
|
||||
let mut stderr_pipe = uv_install_proccess
|
||||
let mut stderr = uv_install_proccess
|
||||
.stderr
|
||||
.take()
|
||||
.ok_or(anyhow!("Cannot take stderr from uv_install_proccess"))?;
|
||||
let stderr_future = stderr_pipe.read_to_string(&mut stderr_buf);
|
||||
|
||||
if let Some(pid) = pids.lock().await.get_mut(i) {
|
||||
*pid = uv_install_proccess.id();
|
||||
@@ -1791,12 +1780,9 @@ pub async fn handle_python_reqs(
|
||||
uv_install_proccess.kill().await?;
|
||||
pids.lock().await.get_mut(i).and_then(|e| e.take());
|
||||
return Err(anyhow::anyhow!("uv pip install was canceled"));
|
||||
},
|
||||
(_, exitstatus) = async {
|
||||
// See tokio::process::Child::wait_with_output() for more context
|
||||
// Sometimes uv_install_proccess.wait() is not exiting if stderr is not awaited before it :/
|
||||
(stderr_future.await, uv_install_proccess.wait().await)
|
||||
} => match exitstatus {
|
||||
}
|
||||
// Finished
|
||||
exitstatus = uv_install_proccess.wait() => match exitstatus {
|
||||
Ok(status) => if !status.success() {
|
||||
tracing::warn!(
|
||||
workspace_id = %w_id,
|
||||
@@ -1805,18 +1791,24 @@ pub async fn handle_python_reqs(
|
||||
status.code()
|
||||
);
|
||||
|
||||
let mut buf = String::new();
|
||||
stderr.read_to_string(&mut buf).await.unwrap_or_else(|_|{
|
||||
buf = "Cannot read stderr to string".to_owned();
|
||||
0
|
||||
});
|
||||
|
||||
append_logs(
|
||||
&job_id,
|
||||
w_id,
|
||||
format!(
|
||||
"\nError while installing {}:\n{stderr_buf}",
|
||||
"\nError while installing {}:\n{buf}",
|
||||
&req
|
||||
),
|
||||
db,
|
||||
)
|
||||
.await;
|
||||
pids.lock().await.get_mut(i).and_then(|e| e.take());
|
||||
return Err(anyhow!(stderr_buf));
|
||||
return Err(anyhow!(buf));
|
||||
},
|
||||
Err(e) => {
|
||||
tracing::error!(
|
||||
|
||||
@@ -331,12 +331,6 @@ lazy_static::lazy_static! {
|
||||
pub static ref WORKER_EXECUTION_DURATION: Arc<RwLock<HashMap<String, prometheus::Histogram>>> = Arc::new(RwLock::new(HashMap::new()));
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
const DOTNET_DEFAULT_PATH: &str = "C:\\Program Files\\dotnet\\dotnet.exe";
|
||||
#[cfg(unix)]
|
||||
const DOTNET_DEFAULT_PATH: &str = "/usr/bin/dotnet";
|
||||
|
||||
|
||||
lazy_static::lazy_static! {
|
||||
|
||||
pub static ref JOB_TOKEN: Option<String> = std::env::var("JOB_TOKEN").ok();
|
||||
@@ -391,7 +385,7 @@ lazy_static::lazy_static! {
|
||||
pub static ref POWERSHELL_PATH: String = std::env::var("POWERSHELL_PATH").unwrap_or_else(|_| "/usr/bin/pwsh".to_string());
|
||||
pub static ref PHP_PATH: String = std::env::var("PHP_PATH").unwrap_or_else(|_| "/usr/bin/php".to_string());
|
||||
pub static ref COMPOSER_PATH: String = std::env::var("COMPOSER_PATH").unwrap_or_else(|_| "/usr/bin/composer".to_string());
|
||||
pub static ref DOTNET_PATH: String = std::env::var("DOTNET_PATH").unwrap_or_else(|_| DOTNET_DEFAULT_PATH.to_string());
|
||||
pub static ref DOTNET_PATH: String = std::env::var("DOTNET_PATH").unwrap_or_else(|_| "/usr/bin/dotnet".to_string());
|
||||
pub static ref NSJAIL_PATH: String = std::env::var("NSJAIL_PATH").unwrap_or_else(|_| "nsjail".to_string());
|
||||
pub static ref PATH_ENV: String = std::env::var("PATH").unwrap_or_else(|_| String::new());
|
||||
pub static ref HOME_ENV: String = std::env::var("HOME").unwrap_or_else(|_| "/tmp".to_string());
|
||||
|
||||
@@ -2,7 +2,7 @@ import { sleep } from "https://deno.land/x/sleep@v1.2.1/mod.ts";
|
||||
import * as windmill from "https://deno.land/x/windmill@v1.174.0/mod.ts";
|
||||
import * as api from "https://deno.land/x/windmill@v1.174.0/windmill-api/index.ts";
|
||||
|
||||
export const VERSION = "v1.441.2";
|
||||
export const VERSION = "v1.441.0";
|
||||
|
||||
export async function login(email: string, password: string): Promise<string> {
|
||||
return await windmill.UserService.login({
|
||||
|
||||
@@ -60,7 +60,7 @@ export {
|
||||
// }
|
||||
// });
|
||||
|
||||
export const VERSION = "1.441.2";
|
||||
export const VERSION = "1.441.0";
|
||||
|
||||
const command = new Command()
|
||||
.name("wmill")
|
||||
|
||||
4
frontend/package-lock.json
generated
4
frontend/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "windmill-components",
|
||||
"version": "1.441.2",
|
||||
"version": "1.441.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "windmill-components",
|
||||
"version": "1.441.2",
|
||||
"version": "1.441.0",
|
||||
"license": "AGPL-3.0",
|
||||
"dependencies": {
|
||||
"@anthropic-ai/sdk": "^0.32.1",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "windmill-components",
|
||||
"version": "1.441.2",
|
||||
"version": "1.441.0",
|
||||
"scripts": {
|
||||
"dev": "vite dev",
|
||||
"build": "vite build",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<script lang="ts">
|
||||
<script lang="typescript">
|
||||
import { enterpriseLicense } from '$lib/stores'
|
||||
import { Alert, Button, Tab, Tabs } from './common'
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<script lang="ts">
|
||||
<script lang="typescript">
|
||||
import { isCloudHosted } from '$lib/cloud'
|
||||
import { enterpriseLicense, isCriticalAlertsUIOpen } from '$lib/stores'
|
||||
import {
|
||||
@@ -184,7 +184,7 @@
|
||||
<SimpleEditor
|
||||
autoHeight
|
||||
class="editor"
|
||||
lang={setting.codeAreaLang ?? 'txt'}
|
||||
lang={setting.codeAreaLang ?? "txt"}
|
||||
bind:code={$values[setting.key]}
|
||||
fixedOverflowWidgets={false}
|
||||
/>
|
||||
|
||||
@@ -148,21 +148,14 @@
|
||||
}
|
||||
|
||||
async function loadLogins() {
|
||||
try {
|
||||
const allLogins = await OauthService.listOauthLogins()
|
||||
logins = allLogins.oauth.map((login) => ({
|
||||
type: login.type,
|
||||
displayName: login.display_name || login.type
|
||||
}))
|
||||
saml = allLogins.saml
|
||||
const allLogins = await OauthService.listOauthLogins()
|
||||
logins = allLogins.oauth.map((login) => ({
|
||||
type: login.type,
|
||||
displayName: login.display_name || login.type
|
||||
}))
|
||||
saml = allLogins.saml
|
||||
|
||||
showPassword = (logins.length == 0 && !saml) || (email != undefined && email.length > 0)
|
||||
} catch (e) {
|
||||
logins = []
|
||||
saml = undefined
|
||||
showPassword = true
|
||||
console.error('Could not load logins', e)
|
||||
}
|
||||
showPassword = (logins.length == 0 && !saml) || (email != undefined && email.length > 0)
|
||||
}
|
||||
|
||||
loadLogins()
|
||||
|
||||
@@ -1464,7 +1464,7 @@
|
||||
<FlowProgressBar {job} class="py-4" />
|
||||
<div class="w-full mt-10 mb-20">
|
||||
<FlowStatusViewer
|
||||
jobId={job?.id ?? ''}
|
||||
jobId={job.id}
|
||||
on:jobsLoaded={({ detail }) => {
|
||||
job = detail
|
||||
}}
|
||||
|
||||
@@ -912,7 +912,7 @@
|
||||
/>
|
||||
<div class="w-full mt-10">
|
||||
<FlowStatusViewer
|
||||
jobId={job?.id ?? ''}
|
||||
jobId={job.id}
|
||||
on:jobsLoaded={({ detail }) => {
|
||||
job = detail
|
||||
}}
|
||||
|
||||
@@ -1,19 +1,9 @@
|
||||
FROM python:3.11-slim as python-base
|
||||
FROM node:19-slim as node-base
|
||||
|
||||
FROM python-base
|
||||
COPY --from=node-base /usr/local /usr/local
|
||||
|
||||
ENV PATH="/usr/local/bin:${PATH}"
|
||||
FROM nikolaik/python-nodejs:python3.11-nodejs19-slim
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y shellcheck wget \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& pip install pipenv
|
||||
|
||||
RUN npm install -g diagnostic-languageserver pyright
|
||||
|
||||
&& apt-get install -y shellcheck
|
||||
RUN yarn global add diagnostic-languageserver
|
||||
RUN yarn global add pyright
|
||||
RUN set -eux; \
|
||||
arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \
|
||||
url=; \
|
||||
@@ -34,7 +24,6 @@ RUN set -eux; \
|
||||
ENV PATH="${PATH}:/usr/local/go/bin"
|
||||
ENV GOBIN=/usr/local/go/bin
|
||||
RUN /usr/local/go/bin/go install -v golang.org/x/tools/gopls@latest
|
||||
|
||||
RUN pip3 install tornado python-lsp-jsonrpc ruff-lsp
|
||||
|
||||
COPY --from=denoland/deno:2.1.2 --chmod=755 /usr/bin/deno /usr/bin/deno
|
||||
@@ -50,8 +39,10 @@ RUN pipenv install
|
||||
COPY pyls_launcher.py .
|
||||
|
||||
RUN mkdir -p /tmp/monaco && chmod -R 777 /tmp/monaco
|
||||
RUN cd /tmp/monaco && npm install --save-dev windmill-client
|
||||
|
||||
RUN cd /tmp/monaco && yarn add -D windmill-client
|
||||
|
||||
EXPOSE 3001
|
||||
|
||||
CMD ["python3", "pyls_launcher.py"]
|
||||
CMD ["python3" ,"pyls_launcher.py"]
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@ verify_ssl = true
|
||||
name = "pypi"
|
||||
|
||||
[packages]
|
||||
wmill = ">=1.441.2"
|
||||
wmill_pg = ">=1.441.2"
|
||||
wmill = ">=1.441.0"
|
||||
wmill_pg = ">=1.441.0"
|
||||
sendgrid = "*"
|
||||
mysql-connector-python = "*"
|
||||
pymongo = "*"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
openapi: "3.0.3"
|
||||
|
||||
info:
|
||||
version: 1.441.2
|
||||
version: 1.441.0
|
||||
title: OpenFlow Spec
|
||||
contact:
|
||||
name: Ruben Fiszel
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
RootModule = 'WindmillClient.psm1'
|
||||
|
||||
# Version number of this module.
|
||||
ModuleVersion = '1.441.2'
|
||||
ModuleVersion = '1.441.0'
|
||||
|
||||
# Supported PSEditions
|
||||
# CompatiblePSEditions = @()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "wmill"
|
||||
version = "1.441.2"
|
||||
version = "1.441.0"
|
||||
description = "A client library for accessing Windmill server wrapping the Windmill client API"
|
||||
license = "Apache-2.0"
|
||||
homepage = "https://windmill.dev"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "wmill-pg"
|
||||
version = "1.441.2"
|
||||
version = "1.441.0"
|
||||
description = "An extension client for the wmill client library focused on pg"
|
||||
license = "Apache-2.0"
|
||||
homepage = "https://windmill.dev"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@windmill/windmill",
|
||||
"version": "1.441.2",
|
||||
"version": "1.441.0",
|
||||
"exports": "./src/index.ts",
|
||||
"publish": {
|
||||
"exclude": ["!src", "./s3Types.ts", "./client.ts"]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "windmill-client",
|
||||
"description": "Windmill SDK client for browsers and Node.js",
|
||||
"version": "1.441.2",
|
||||
"version": "1.441.0",
|
||||
"author": "Ruben Fiszel",
|
||||
"license": "Apache 2.0",
|
||||
"devDependencies": {
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.441.2
|
||||
1.441.0
|
||||
|
||||
Reference in New Issue
Block a user