Make merge_user_args idempotent (#438)
authorSaj Goonatilleke <saj@discourse.org>
Tue, 6 Aug 2019 23:07:36 +0000 (09:07 +1000)
committerSam <sam.saffron@gmail.com>
Tue, 6 Aug 2019 23:07:36 +0000 (09:07 +1000)
commit47890a9a7d069b35322754bb24d0ad10b79fd87c
treecd1419df9fbdff52d6b8a75133a4ff6ed17201b2
parent7440820f554b3db7d8ab5c2970debe64b3a70d57
Make merge_user_args idempotent (#438)

The `merge_user_args` function may be called more than once within a
single `launcher` process.  e.g.: on `launcher rebuild ...`:

```
[main] -> rebuild -> run_bootstrap -> set_template_info -> merge_user_args
[main] -> rebuild -> run_start     -> set_template_info -> merge_user_args
```

If the user had included a `docker_args` map key in their container
YAML, the `user_args` global would be incorrectly populated with
duplicate docker CLI flags.

https://meta.discourse.org/t/-/123696

Fixes a regression introduced in https://meta.discourse.org/t/-/49401/9
launcher