FNNDSC / pman

A process management system written in python
MIT License
22 stars 33 forks source link

Environment variable values cannot contain the character '=' #224

Open jennydaman opened 1 year ago

jennydaman commented 1 year ago

pman should allow for environment variable values to contain = characters, e.g.

body="$(cat << EOF
{
  "env": ["varname=varvalue=containsequals"],
  "jid": "example-123",
  "args": [
    "--saveinputmeta", "--saveoutputmeta",
    "--prefix", "hello_test_"
  ],
  "auid": "cube-test",
  "number_of_workers": "1",
  "cpu_limit": "1000",
  "memory_limit": "200",
  "gpu_limit": "0",
  "image": "ghcr.io/fnndsc/pl-simpledsapp:2.1.0",
  "entrypoint": ["simpledsapp"],
  "type": "ds"
}
EOF
)"

curl -H 'Accept: application/json' -H 'Content-Type: application/json' \
  --data "$body" -s http://localhost:5010/api/v1/

However this is not allowed:

https://github.com/FNNDSC/pman/blob/f6730da5a4384d1bfecda6e93ee96516f12dea70/pman/resources.py#L74