mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-21 08:02:26 +00:00
resolve Windows build warnings treated as errors (#7870)
* fix: resolve Windows build warnings treated as errors - Gate UV_PATH import behind #[cfg(unix)] in python_versions.rs - Remove unused tokio::time::sleep import in worker.rs (use fully qualified path) - Fix unused `file` variable warnings in ansible_executor.rs on Windows Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * ci: add Windows cargo check workflow Runs cargo check with ee_windows features on push to backend/** using the blacksmith-16vcpu-windows-2025 runner. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * ci: add cargo check step to Windows build, remove separate check workflow Add a cargo check step with -D warnings before the full build to fail fast on any warnings. Remove the separate windows-check.yml workflow. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -40,6 +40,15 @@ jobs:
|
||||
run: |
|
||||
./backend/substitute_ee_code.sh --copy --dir ./windmill-ee-private
|
||||
|
||||
- name: Cargo check (fail fast on warnings)
|
||||
timeout-minutes: 60
|
||||
env:
|
||||
RUSTFLAGS: "-D warnings"
|
||||
run: |
|
||||
mkdir frontend/build && cd backend
|
||||
New-Item -Path . -Name "windmill-api/openapi-deref.yaml" -ItemType "File" -Force
|
||||
cargo check --features=ee_windows
|
||||
|
||||
- name: Cargo build dynamic libraries windows
|
||||
timeout-minutes: 180
|
||||
run: |
|
||||
@@ -54,8 +63,7 @@ jobs:
|
||||
vcpkg.exe integrate install
|
||||
$env:VCPKGRS_DYNAMIC=1
|
||||
$env:OPENSSL_DIR="${Env:VCPKG_INSTALLATION_ROOT}\installed\x64-windows-static"
|
||||
mkdir frontend/build && cd backend
|
||||
New-Item -Path . -Name "windmill-api/openapi-deref.yaml" -ItemType "File" -Force
|
||||
cd backend
|
||||
cargo build --release --features=ee_windows
|
||||
- name: Rename binary with corresponding architecture
|
||||
run: |
|
||||
|
||||
@@ -752,10 +752,12 @@ pub async fn get_git_ssh_cmd(
|
||||
})?;
|
||||
content.push_str("\n");
|
||||
|
||||
let file = write_file(job_dir, &id_file_name, &content)?;
|
||||
#[cfg(not(unix))]
|
||||
let _ = write_file(job_dir, &id_file_name, &content)?;
|
||||
|
||||
#[cfg(unix)]
|
||||
{
|
||||
let file = write_file(job_dir, &id_file_name, &content)?;
|
||||
let perm = std::os::unix::fs::PermissionsExt::from_mode(0o600);
|
||||
file.set_permissions(perm)?;
|
||||
}
|
||||
@@ -1218,10 +1220,10 @@ fi
|
||||
ANSIBLE_PLAYBOOK_PATH.as_str()
|
||||
);
|
||||
|
||||
let file = write_file(job_dir, "wrapper.sh", &wrapper)?;
|
||||
let _file = write_file(job_dir, "wrapper.sh", &wrapper)?;
|
||||
|
||||
#[cfg(unix)]
|
||||
file.metadata()?.permissions().set_mode(0o777);
|
||||
_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
|
||||
|
||||
@@ -21,10 +21,12 @@ use windmill_queue::append_logs;
|
||||
use crate::{
|
||||
common::{start_child_process, OccupancyMetrics},
|
||||
handle_child::handle_child,
|
||||
python_executor::{INDEX_CERT, NATIVE_CERT, PYTHON_PATH, UV_PATH},
|
||||
python_executor::{INDEX_CERT, NATIVE_CERT, PYTHON_PATH},
|
||||
HOME_ENV, INSTANCE_PYTHON_VERSION, PATH_ENV, PROXY_ENVS, PY_INSTALL_DIR, UV_CACHE_DIR,
|
||||
WIN_ENVS,
|
||||
};
|
||||
#[cfg(unix)]
|
||||
use crate::python_executor::UV_PATH;
|
||||
|
||||
impl From<PyV> for PyVAlias {
|
||||
fn from(value: PyV) -> Self {
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
use anyhow::anyhow;
|
||||
use futures::TryFutureExt;
|
||||
use tokio::sync::Mutex;
|
||||
use tokio::time::sleep;
|
||||
use tokio::time::timeout;
|
||||
use windmill_common::client::AuthedClient;
|
||||
use windmill_common::jobs::WorkerInternalServerInlineUtils;
|
||||
@@ -3064,7 +3063,7 @@ pub async fn handle_queued_job(
|
||||
.flatten()
|
||||
{
|
||||
tracing::debug!("Debug: {} going to sleep for {}", job.id, dbg_djob_sleep);
|
||||
sleep(std::time::Duration::from_secs(dbg_djob_sleep as u64)).await;
|
||||
tokio::time::sleep(std::time::Duration::from_secs(dbg_djob_sleep as u64)).await;
|
||||
}
|
||||
|
||||
tracing::debug!(
|
||||
|
||||
Reference in New Issue
Block a user