Generate random system_id for run-single mode
What does this MR do?
Generate a new random system_id
for every gitlab-runner run-single
invocation, preventing a <nil>
dereference panic.
Alternative approaches
- Leave the
system_id
field blank, null or unspecified: discarded because it would require more code changes and might go against the purpose of #29390 (closed). - Try to load an existing
system_id
from the file system: discarded because thesystem_id
storage approach of !3758 (merged) uses paths relative toconfig.toml
but this file is irrelevant for thegitlab-runner run-single
command.
Why was this MR needed?
Closes #29592 (closed) and fixes the gitlab-runner run-single
command.
What's the best way to test this MR?
See #29592 (closed) for a minimal example, albeit it's a bit worrying to realize that automated testing doesn't cover this functionality.
What are the relevant issue numbers?
Edited by Helio Machado