Skip to content

Commit

Permalink
fix: fix go and python cache resolution conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenfiszel committed Jul 4, 2023
1 parent 499dd5b commit 54c6aed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions backend/windmill-worker/src/go_executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ pub async fn install_go_dependencies(
} else {
"".to_string()
};
let hash = format!("go-{}", hash);

let mut skip_tidy = has_sum;

Expand Down
4 changes: 2 additions & 2 deletions backend/windmill-worker/src/python_executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,15 @@ pub async fn pip_compile(
} else {
requirements.to_string()
};
let req_hash = calculate_hash(&requirements);
let req_hash = format!("go-{}", calculate_hash(&requirements));
if let Some(cached) = sqlx::query_scalar!(
"SELECT lockfile FROM pip_resolution_cache WHERE hash = $1",
req_hash
)
.fetch_optional(db)
.await?
{
logs.push_str(&format!("\nfound cached resolution"));
logs.push_str(&format!("\nfound cached resolution:\n{cached}"));
return Ok(cached);
}
let file = "requirements.in";
Expand Down

0 comments on commit 54c6aed

Please sign in to comment.