27 Feb 2024 |
Alyssa Ross | Oh I use that out of tree | 19:46:03 |
Alyssa Ross | ah but it's literally just removing the need to wrap the start command in a dict? | 19:46:26 |
Alyssa Ross | sgtm, but would we want a deprecation period with a warning? I don't mind myself, but maybe I'm not the only one using it out of tree. | 19:47:12 |
K900 ⚡️ | As long as you're just passing in a start command, it's fine | 19:48:01 |
K900 ⚡️ | But stuff like {"hda": ..., "cdrom": ...} will not work | 19:48:26 |
Alyssa Ross | Oh I didn't even remember you could do that. | 19:48:43 |
K900 ⚡️ | I don't know about the deprecation period, because the old way of generating startcommands was deprecated, with a warning, for YEARS | 19:48:52 |
K900 ⚡️ | * I don't know about the deprecation period, because the old way of generating startcommands was deprecated, with a warning, for YEARS now | 19:48:53 |
K900 ⚡️ | And just removing the outer dict layer is a trivial change that will be caught by mypy | 19:49:15 |
Alyssa Ross | Do you mean the deprecation that I undid a year ago, or a different one? https://github.com/nixos/nixpkgs/commit/845576aac4c067b816886d5ef55aaec82ea37c17 | 19:50:59 |
K900 ⚡️ | https://github.com/NixOS/nixpkgs/blob/b5c956262d950cd2accccbe6a1e7fe768d5efaad/nixos/lib/test-driver/test_driver/machine.py#L382-L386 | 19:54:04 |
K900 ⚡️ | This one | 19:54:05 |
K900 ⚡️ | Which is still there and 3 years old | 19:54:21 |
Alyssa Ross | oh, so is it already possible to get equivalent functionality without passing a dict with startCommand? | 19:55:47 |
K900 ⚡️ | Not quite | 19:57:15 |
K900 ⚡️ | It's stupid | 19:57:19 |
K900 ⚡️ | It takes a dict | 19:57:21 |
K900 ⚡️ | Always | 19:57:23 |
K900 ⚡️ | But if the dict has startCommand , it'll use that | 19:57:33 |
K900 ⚡️ | And if it has anything else, it'll use THAT THING | 19:57:41 |
Alyssa Ross | Then I'm not sure this deprecation warning counts? If there was no possible way to get that functionality without using startCommand… | 19:58:18 |
Alyssa Ross | What I mean is that, I don't think we can expect users to have followed an unactionable deprecation warning. | 19:58:46 |
K900 ⚡️ | No | 19:59:40 |
K900 ⚡️ | I mean | 19:59:43 |
K900 ⚡️ | If you do create_machine({"startCommand": "..."}) | 19:59:52 |
K900 ⚡️ | You don't get the warning | 19:59:55 |
K900 ⚡️ | And you get the right thing done | 20:00:01 |
Alyssa Ross | Oh, I see. | 20:00:15 |
K900 ⚡️ | And after my PR you just need to change that to create_machine(start_command="...") now | 20:00:20 |
Alyssa Ross | That makes more sense —-I thought I'd have seen the warning. | 20:00:26 |