You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if !retained_components.contains(&chaining_target){
273
+
if chaining_target == "*"{
274
+
bail!("Component selected with '--component {}' cannot use wildcard service chaining: allowed_outbound_hosts = [\"http://*.spin.internal\"]", component.id());
275
+
}
276
+
bail!(
277
+
"Component selected with '--component {}' cannot use service chaining to unselected component: allowed_outbound_hosts = [\"http://{}.spin.internal\"]",
278
+
component.id(), chaining_target
279
+
);
280
+
}
281
+
}
282
+
}
283
+
}
284
+
}
285
+
anyhow::Ok(())
286
+
})?;
287
+
288
+
Ok(())
289
+
}
290
+
291
+
/// Validates that all components specified to be retained actually exist in the app
292
+
fnvalidate_retained_components_exist(
293
+
app:&spin_app::App,
294
+
retained_components:&[String],
295
+
) -> Result<()>{
296
+
let app_components = app
297
+
.components()
298
+
.map(|c| c.id().to_string())
299
+
.collect::<HashSet<_>>();
300
+
for c in retained_components {
301
+
if !app_components.contains(c){
302
+
bail!("Specified component \"{c}\" not found in application");
0 commit comments