mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-08 00:03:07 +00:00
Merge remote-tracking branch 'origin/license-app-only-implicit-promotion' into guest-jwt-app-entry
# Conflicts: # backend/ee-repo-ref.txt # backend/windmill-api-users/src/users.rs # frontend/src/routes/(root)/(logged)/workspace_settings/+page.svelte
This commit is contained in:
@@ -12,6 +12,7 @@ use windmill_api_auth::{
|
||||
};
|
||||
use windmill_api_users::users::WorkspaceInvite;
|
||||
use windmill_common::email_oss::send_email_if_possible;
|
||||
use windmill_dep_map::lock_hash::record_lock_hashes_for_workspace;
|
||||
use windmill_common::usernames::{get_instance_username_or_create_pending, VALID_USERNAME};
|
||||
use windmill_common::webhook::WebhookShared;
|
||||
use windmill_common::{BASE_URL, DB};
|
||||
@@ -7274,7 +7275,16 @@ async fn clone_workspace_runnable_dependencies(
|
||||
.execute(&mut **tx)
|
||||
.await?;
|
||||
|
||||
// Clone dependency_map to preserve import relationships
|
||||
// Recorded so the clone's own relocks have something to match; with no row they record NULL
|
||||
// and nothing in it ever skips. Hashed from the locks the clone holds rather than copied from
|
||||
// the source's rows, which are only as current as the last write to them: one left stale by a
|
||||
// supplied lock deployed before this was recorded names a lock the clone no longer has, and an
|
||||
// importer that resolved against the real one would then skip a relock it needed.
|
||||
record_lock_hashes_for_workspace(tx, target_workspace_id).await?;
|
||||
|
||||
// Deliberately without `imported_lockfile_hash`: it records what an importer resolved against
|
||||
// when it was last locked, which nothing here can establish for the version the clone got.
|
||||
// Left NULL, every importer relocks once and re-anchors both sides to what the clone holds.
|
||||
sqlx::query!(
|
||||
"INSERT INTO dependency_map (workspace_id, importer_path, importer_kind, imported_path, importer_node_id)
|
||||
SELECT $1, importer_path, importer_kind, imported_path, importer_node_id
|
||||
|
||||
Reference in New Issue
Block a user