actions / runner

The Runner for GitHub Actions :rocket:
https://github.com/features/actions
MIT License
4.64k stars 892 forks source link

For Scaled Sets, config.sh remove should just read from JitConfig( .runner/.credentials) or pass the runner token #3330

Open jaswanthikolla opened 2 weeks ago

jaswanthikolla commented 2 weeks ago

Describe the bug In ARSS/scaled sets, ACTIONS_RUNNER_INPUT_JITCONFIG env variable is set and RUNNER_TOKEN env variable is not set. JitConfig is used to register the runner, but the same flow doesn't make user of .runner and .credentials files ( or just ACTIONS_RUNNER_INPUT_JITCONFIG). So, Either of the following needs to be done to fix this.

To Reproduce Steps to reproduce the behavior:

  1. Launch a ARSS runner, it creates a runner with just-in-time registration, it launches ./run.sh with JITCONFIG Env variable
  2. run config.sh remove script, and it says Enter runner remove token

Expected behavior Either Use JitConfig to do the remove runner or pass Runner token as env variable.

Runner Version and Platform

Version of your runner? v2.317.0

OS of the machine running the runner? OSX/Windows/Linux/... Ubuntu 22

What's not working?

RUNNER 2024-06-11 21:01:54Z INFO ConfigurationStore] IsServiceConfigured()
[RUNNER 2024-06-11 21:01:54Z INFO ConfigurationStore] IsServiceConfigured: False
[RUNNER 2024-06-11 21:01:54Z INFO ConfigurationStore] IsConfigured()
[RUNNER 2024-06-11 21:01:54Z INFO ConfigurationStore] IsConfigured: True
[RUNNER 2024-06-11 21:01:54Z INFO ConfigurationStore] HasCredentials()
[RUNNER 2024-06-11 21:01:54Z INFO ConfigurationStore] stored True
[RUNNER 2024-06-11 21:01:54Z INFO ConfigurationStore] Read setting file: 396 chars
[RUNNER 2024-06-11 21:01:54Z INFO CommandSettings] Arg 'token': ''
[RUNNER 2024-06-11 21:01:54Z INFO CommandSettings] Flag 'unattended': 'False'
[RUNNER 2024-06-11 21:01:54Z INFO PromptManager] ReadValue
[RUNNER 2024-06-11 21:01:54Z INFO Terminal] WRITE: Enter runner remove token: 
Enter runner remove token: [RUNNER 2024-06-11 21:01:54Z INFO Terminal] READ SECRET

Job Log Output

NA

Runner and Worker's Diagnostic Logs

already added in what's not working.