Skip to content

Commit

Permalink
Use HOSTNAME env as app id
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Levick <ryan.levick@fermyon.com>
  • Loading branch information
rylev committed Oct 8, 2024
1 parent 0c6943f commit b58afb3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion containerd-shim-spin/src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,10 @@ impl SpinEngine {

let mut futures_list = Vec::new();
let mut trigger_type_map = Vec::new();
// The `HOSTNAME` environment variable should contain the fully unique container name
let app_id = std::env::var("HOSTNAME").unwrap_or_else(|| "unknown".into());
for trigger_type in trigger_types.iter() {
let app = spin_app::App::new("TODO", app.clone());
let app = spin_app::App::new(&app_id, app.clone());
let f = match trigger_type.as_str() {
HTTP_TRIGGER_TYPE => {
let address_str = env::var(constants::SPIN_HTTP_LISTEN_ADDR_ENV)
Expand Down

0 comments on commit b58afb3

Please sign in to comment.