https://flyte.org logo
#ask-the-community
Title
# ask-the-community
t

Taoufik Dachraoui

02/28/2023, 12:12 PM
Hi, is it possible to, from the task code, get the hostname of the executing pod?
f

Fabio Grätz

02/28/2023, 1:47 PM
The environment variable
$HOSTNAME
should contain it 🙂
Can you please try whether this works?
t

Taoufik Dachraoui

02/28/2023, 2:09 PM
yes it works, thanks
os.environ.get(“HOSTNAME”) returns the hostname of the running task
k

Ketan (kumare3)

02/28/2023, 3:06 PM
We are thinking of adding this to debugging info in Ui, but not make it confusing
f

Franco Bocci

02/28/2023, 3:09 PM
Maybe adding it to the execution context or smth like that? So in case that for example the env var is changed, nothing tied to that breaks
f

Felix Ruess

02/28/2023, 5:13 PM
Adding that to the UI for each task would be nice, my collegues also asked for that
f

Fabio Grätz

02/28/2023, 5:36 PM
I always go to stackdriver logs and copy it from the query.
Could be quicker though if directly in console
2 Views