mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-25 16:02:11 +00:00
feat(python): make S3 cache arch specific (#5196)
* add .minio-data to .gitignore
* feat(python): make S3 cache arch specific
Current schema:
S3-Bucket
├── python_311
│ ├── wheel==1.0
│ └── wheel2==1.0
└── python_312
├── wheel==1.0
└── wheel2==1.0
New schema:
S3-Bucket
├── linux_aarch64
│ └── ...
└── linux_x86_64
├── python_311
│ ├── wheel==1.0
│ └── wheel2==1.0
└── python_312
├── wheel==1.0
└── wheel2==1.0
* remove .minio-data from .gitignore
* remove unneeded tracing::error
This commit is contained in:
+1
-1
@@ -7,4 +7,4 @@ CaddyfileRemoteMalo
|
||||
*.swp
|
||||
**/.idea/
|
||||
.direnv
|
||||
.vscode
|
||||
.vscode
|
||||
|
||||
@@ -13,6 +13,9 @@ use windmill_common::error;
|
||||
#[cfg(all(feature = "enterprise", feature = "parquet", unix))]
|
||||
use std::sync::Arc;
|
||||
|
||||
#[cfg(all(feature = "enterprise", feature = "parquet"))]
|
||||
pub const TARGET: &str = const_format::concatcp!(std::env::consts::OS, "_", std::env::consts::ARCH);
|
||||
|
||||
#[cfg(all(feature = "enterprise", feature = "parquet", unix))]
|
||||
pub async fn build_tar_and_push(
|
||||
s3_client: Arc<dyn ObjectStore>,
|
||||
@@ -57,7 +60,7 @@ pub async fn build_tar_and_push(
|
||||
if let Err(e) = s3_client
|
||||
.put(
|
||||
&Path::from(format!(
|
||||
"/tar/{}/{folder_name}.tar",
|
||||
"/tar/{TARGET}/{}/{folder_name}.tar",
|
||||
if no_uv { "pip" } else { &python_xyz }
|
||||
)),
|
||||
std::fs::read(&tar_path)?.into(),
|
||||
@@ -100,7 +103,7 @@ pub async fn pull_from_tar(
|
||||
let start = Instant::now();
|
||||
|
||||
let tar_path = format!(
|
||||
"tar/{}/{folder_name}.tar",
|
||||
"tar/{TARGET}/{}/{folder_name}.tar",
|
||||
if no_uv { "pip".to_owned() } else { python_xyz }
|
||||
);
|
||||
let bytes = attempt_fetch_bytes(client, &tar_path).await?;
|
||||
|
||||
@@ -632,7 +632,7 @@ pub async fn uv_pip_compile(
|
||||
if *NATIVE_CERT {
|
||||
args.extend(["--native-tls"]);
|
||||
}
|
||||
tracing::error!("uv args: {:?}", args);
|
||||
tracing::debug!("uv args: {:?}", args);
|
||||
|
||||
#[cfg(windows)]
|
||||
let uv_cmd = "uv";
|
||||
|
||||
Reference in New Issue
Block a user