rough-ice-18151
08/01/2025, 1:15 AMdocker stop
my workload and zpool export
the zpool before the instance gets shut down to reliably preserve data integrity.
So I'm trying to send diagnostic messages that identify which URN associates with which logical resource so I know which machine to SSH into. I've looked into custom providers to add this logic to the execution DAG, but felt that the workflow in golang was too complex, especially for distribution across my team since I need to manage multiple binary versions (one for my program and the other for the custom provider).
So when I send a diagnostic message like this:
ctx.Log.Debug(string(msg), &pulumi.LogArgs{
Resource: resource,
StreamID: 12345,
})
}
The message and resource urn get preserved in the resulting EngineEvent, but the streamID is always 0. Am I just doing this wrong or not understanding what streams are?rough-ice-18151
08/01/2025, 1:16 AMechoing-dinner-19531
08/01/2025, 6:53 AMrough-ice-18151
08/05/2025, 12:35 AMs, err := auto.UpsertStackInlineSource(
ctx,
d.Name,
pulumiProjectName,
runFunc,
auto.EnvVars(envVars), <--- here?
)
echoing-dinner-19531
08/05/2025, 7:16 AMA question though, when I read an environment variable from inside a hook running in a stack as part of the automation API, will that call return the value that I set when initialize the stack/workspace?Not for inline programs. They're running in the same process as your automation api program and so don't reinitialise the environment. But you can just share variables in scope rather than envvars to get a similar result.
rough-ice-18151
08/05/2025, 11:42 PM