Hybrid
Hybrid•15mo ago

Issues with Golang on selfhosted environment

Hi, I just installed the selfhosted version a few hours ago, and I currently can't request any variables/resources as I'm getting an Unauthorized access from the API with Golang. The issue is not present with Python and Bash. After some digging, it looks like the env WM_WORKSPACE is not populated, and it does not output a correct URI as seen from the logs : uri=/api/w//variables/get/u%2Fredacteduser%2Fredactedvariable?decrypt_secret=true On Windmill cloud, the os.Environ() function returns a list of WM_* env but not on the selfhosted version. The setup is pretty standard and I only changed the Postgres default password in the .env file, and the caddy container port. Any ideas ? Thanks
No description
3 Replies
Hybrid
Hybrid•15mo ago
With the code :
package inner

import "os"

func main() (interface{}, error) {
envs := os.Environ()
return envs, nil
}
package inner

import "os"

func main() (interface{}, error) {
envs := os.Environ()
return envs, nil
}
rubenf
rubenf•15mo ago
It looks like a bug I should be able to easily fix, sorry about that I will give it a try tonight fixed on latest will be pushed in a few mins
Hybrid
Hybrid•15mo ago
Thank you for the quick fix ! 🙂