Secret environment variable not passed through to app

I had an app running with a secret, and that was fine. Now I have changed the path in the repository. As one cannot change the path of the app entry point, I have created a new app for that. There I have also added this secret:


In my program I have this function to retrieve the key:

def get_api_key() -> str:
    var_name = "CRYPTOCOMPARE_API_KEY"
    key = os.environ.get(var_name, None)
    if key is not None:
        return key
        config = configuration.load_config()
        return config["cryptocompare"]["api_key"]

This now crashes there, because it doesn’t fit the environment variable and also it cannot find a configuration file in this deployment. I don’t understand why the environment variable cannot be found any more.

My app is available here.

What could I do to debug this issue?