We define BACKEND=tpp in the default environment profille. We make this readonly, as it shouldn't be changed to something else.
This works fine when running stuff in a shell.
However, we do not pass this env var explicitly through to job-runner and airlock.
So they have relied on it being defined in ~opensafely/config/03_backend.env, as they do load that env file.
However, if it is in there then the load-env script fails to load them, because with set -a it tries to set them, which it can't do with BACKEND as it is read only.
We should probably explicitly pass BACKEND env var through in the docker-compose yaml.
For the systemd units, we may need to add /etc/profile.d/opensafely.sh as a sourced env file config
We define BACKEND=tpp in the default environment profille. We make this readonly, as it shouldn't be changed to something else.
This works fine when running stuff in a shell.
However, we do not pass this env var explicitly through to job-runner and airlock.
So they have relied on it being defined in ~opensafely/config/03_backend.env, as they do load that env file.
However, if it is in there then the
load-env
script fails to load them, because withset -a
it tries to set them, which it can't do with BACKEND as it is read only.We should probably explicitly pass BACKEND env var through in the docker-compose yaml.
For the systemd units, we may need to add /etc/profile.d/opensafely.sh as a sourced env file config
Associated Slack conversation: https://bennettoxford.slack.com/archives/C02GL3A9THD/p1731000367418999