Closed vtnate closed 1 year ago
@nllong I have a couple questions:
rm
compound command works as expected when I manually use it in the terminal, but in the code as written it fails with unknown shorthand flag: 'a' in -a
when I use it. Am I not understanding how subprocess.run()
works? I've confirmed that the split transforms to a list as expected.@nllong I have a couple questions:
- Is this functionality even necessary/valuable?
- The
rm
compound command works as expected when I manually use it in the terminal, but in the code as written it fails withunknown shorthand flag: 'a' in -a
when I use it. Am I not understanding howsubprocess.run()
works? I've confirmed that the split transforms to a list as expected.
I think I just experienced this myself, so yes to 1.
Any background context you want to provide?
When running tests developers often
ctrl-c
to cancel a test midway through a long-running simulation. The container is then left alive unnecessarily which is a resource drain.What does this PR accomplish?
Catch KeyboardInterrupt while simulating and
kill
all containers from thegmt-om-runner
imageHow should this be manually tested?
tests/GMT_Lib/test_gmt_lib.py::test_simulate_cooling_plant
ctrl-c
once the simulation beginsdocker ps -a
to check that containers from the image are removedWhat are the relevant tickets?
Resolves #384