Skip to content

Commit

Permalink
merge: #2982
Browse files Browse the repository at this point in the history
2982: Fix(dal): Make secrets work on workspace import r=vbustamante a=vbustamante

- Does not backup secrets themselves 

Co-authored-by: Victor Bustamante <[email protected]>
  • Loading branch information
si-bors-ng[bot] and vbustamante authored Nov 28, 2023
2 parents 23db00a + 2d34c39 commit 4902822
Showing 1 changed file with 22 additions and 7 deletions.
29 changes: 22 additions & 7 deletions lib/dal/src/pkg/import.rs
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,7 @@ async fn import_component(
skips.push(skip);
}
}

for attribute in component_spec.output_sockets()? {
if let Some(skip) = import_component_attribute(
ctx,
Expand Down Expand Up @@ -864,13 +865,27 @@ async fn update_prototype(
))?;

if let Some(ip_id) = get_ip_for_input(ctx, schema_variant_id, input).await? {
AttributePrototypeArgument::new_for_intra_component(
ctx,
*prototype.id(),
*func_arg.id(),
ip_id,
)
.await?;
match AttributePrototypeArgument::list_for_attribute_prototype(ctx, *prototype.id())
.await?
.iter()
.find(|apa| apa.func_argument_id() == *func_arg.id())
{
Some(apa) => {
if apa.internal_provider_id() != ip_id {
let mut apa = apa.to_owned();
apa.set_internal_provider_id(ctx, ip_id).await?;
}
}
None => {
AttributePrototypeArgument::new_for_intra_component(
ctx,
*prototype.id(),
*func_arg.id(),
ip_id,
)
.await?;
}
}
}
}
}
Expand Down

0 comments on commit 4902822

Please sign in to comment.