Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to optionally skip self-update #1444

Closed
wants to merge 1 commit into from

Conversation

fgalind1
Copy link

When using infrastructure as code, containers and recipes, pinning versions for reproducibility is a good practice. Usually docker container images contain static tools and binaries and the docker image
is tagged with a specific version.

Constructing a docker image of a runner with a specific runner version and then self-updating itself doesn't seem that natural, instead the docker image should use whatever that binary was built/tagged to.

Additionally to this - this concept doesn't play well when using ephemeral runners and kuberentes (e.g. https://github.com/actions-runner-controller/actions-runner-controller). First of all, we need to pay the price of downloading/self-updating every single ephemeral pod for every single
job which causes delays in execution. Secondly this doesn't work well and containers may get stuck

Related issues that will be solved with this:

This will optionally skip self update logic if runner the environment variable GITHUB_ACTIONS_SKIP_SELF_UPDATE is set to a truly value

When using infrastructure as code, containers and recipes, pinning
versions for reproducibility is a good practice. Usually docker
container images contain static tools and binaries and the docker image
is tagged with a specific version.

Constructing a docker image of a runner with a specific runner version
and then self-updating itself doesn't seem that natural, instead the
docker image should use whatever that binary was built/tagged to.

Additionally to this - this concept doesn't play well when using
ephemeral runners and kuberentes. First of all, we need to pay the price
of downloading/self-updating every single ephemeral pod for every single
job which causes delays in execution. Secondly this doesn't work well
and containers may get stuck

Related issues that will be solved with this:
- actions#1396
- actions#246
- actions#485
- actions#422
- actions#442
@fgalind1 fgalind1 requested a review from a team as a code owner October 28, 2021 23:20
@ethomson ethomson self-assigned this Nov 4, 2021
@ChristopherHX
Copy link
Contributor

I doubt this PR solves #422, you don't apply the update which leads to #422.

I noticed this scenario

  • github actions service assigned an outdated runner a job
  • github actions service send a ( force ) update message
  • runner ignores the ( force ) update message
  • job is still assigned, but the service won't send the job unless you have applied the update
  • you now have a stuck runner and job

An unsupported scenario to avoid #422

@gmambro
Copy link

gmambro commented Nov 19, 2021

I cannot see how the hack with the fake runnerversion can be any better than this change. The hack will get the same behaviour but will make life harder in getting the real version in logs, is not configurable and as soon as GH release the real 3.0.1 will break too.
On the other hand the PR is a completely opt-in behaviour and will solve many of the issues reported by people that run a containerised runner. If you really want to discourage that then ask for a different variable name like GITHUB_ACTIONS_UNSUPPORTED_SKIP_SELF_UPDATE

@ChristopherHX
Copy link
Contributor

The hack will get the same behaviour

Not for me :/, otherwise this change would be perfect for this usecase.
I get this, while my runner is connected. I just compiled this PR without pulling runner updates.

Found online and idle self-hosted runner in the current repository that matches the required labels: 'self-hosted'
Waiting for the runner to pick up this job...
Job was not picked up by the preferred runner, try requesting additional runners to run this job
Waiting for a self-hosted runner to pickup this job...

Runner version 2.283.3 ( + this PR ) becomes a zombie. And this is only a minor update to 2.284.0

[2021-11-19 15:04:25Z INFO HostContext] No proxy settings were found based on environmental variables (http_proxy/https_proxy/HTTP_PROXY/HTTPS_PROXY)
[2021-11-19 15:04:25Z INFO HostContext] Well known directory 'Bin': '/home/christopher/fgalind1/_layout/bin'
[2021-11-19 15:04:25Z INFO HostContext] Well known directory 'Root': '/home/christopher/fgalind1/_layout'
[2021-11-19 15:04:25Z INFO HostContext] Well known config file 'Credentials': '/home/christopher/fgalind1/_layout/.credentials'
[2021-11-19 15:04:25Z INFO Listener] Runner is built for Linux (X64) - linux-x64.
[2021-11-19 15:04:25Z INFO Listener] RuntimeInformation: Linux 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021.
[2021-11-19 15:04:25Z VERB Terminal] Entering Initialize
[2021-11-19 15:04:25Z INFO Listener] Version: 2.283.3
[2021-11-19 15:04:25Z INFO Listener] Commit: 05f27652d017e79b7795263df6e91c17ea4ad756
[2021-11-19 15:04:25Z INFO Listener] Culture:
[2021-11-19 15:04:25Z INFO Listener] UI Culture:
[2021-11-19 15:04:25Z INFO HostContext] Well known directory 'Bin': '/home/christopher/fgalind1/_layout/bin'
[2021-11-19 15:04:25Z INFO HostContext] Well known directory 'Root': '/home/christopher/fgalind1/_layout'
[2021-11-19 15:04:25Z INFO Listener] Validating directory permissions for: '/home/christopher/fgalind1/_layout'
[2021-11-19 15:04:25Z VERB PromptManager] Entering Initialize
[2021-11-19 15:04:25Z INFO CommandLineParser] Parse
[2021-11-19 15:04:25Z INFO CommandLineParser] Parsing 1 args
[2021-11-19 15:04:25Z INFO CommandLineParser] parsing argument
[2021-11-19 15:04:25Z INFO CommandLineParser] HasArgs: False
[2021-11-19 15:04:25Z INFO CommandLineParser] Adding Command: run
[2021-11-19 15:04:25Z VERB CommandLineParser] done parsing arguments
[2021-11-19 15:04:25Z VERB CommandLineParser] Exiting parse
[2021-11-19 15:04:25Z INFO Listener] Arguments parsed
[2021-11-19 15:04:25Z VERB Runner] Entering Initialize
[2021-11-19 15:04:25Z INFO Runner] ExecuteCommand
[2021-11-19 15:04:25Z VERB ConfigurationManager] Entering Initialize
[2021-11-19 15:04:25Z VERB RunnerServer] Entering Initialize
[2021-11-19 15:04:25Z VERB ConfigurationManager] Creating _store
[2021-11-19 15:04:25Z VERB ConfigurationStore] Entering Initialize
[2021-11-19 15:04:25Z INFO ConfigurationStore] currentAssemblyLocation: /home/christopher/fgalind1/_layout/bin/Runner.Listener.dll
[2021-11-19 15:04:25Z INFO HostContext] Well known directory 'Bin': '/home/christopher/fgalind1/_layout/bin'
[2021-11-19 15:04:25Z INFO ConfigurationStore] binPath: /home/christopher/fgalind1/_layout/bin
[2021-11-19 15:04:25Z INFO HostContext] Well known directory 'Bin': '/home/christopher/fgalind1/_layout/bin'
[2021-11-19 15:04:25Z INFO HostContext] Well known directory 'Root': '/home/christopher/fgalind1/_layout'
[2021-11-19 15:04:25Z INFO ConfigurationStore] RootFolder: /home/christopher/fgalind1/_layout
[2021-11-19 15:04:25Z INFO HostContext] Well known directory 'Bin': '/home/christopher/fgalind1/_layout/bin'
[2021-11-19 15:04:25Z INFO HostContext] Well known directory 'Root': '/home/christopher/fgalind1/_layout'
[2021-11-19 15:04:25Z INFO HostContext] Well known config file 'Runner': '/home/christopher/fgalind1/_layout/.runner'
[2021-11-19 15:04:25Z INFO ConfigurationStore] ConfigFilePath: /home/christopher/fgalind1/_layout/.runner
[2021-11-19 15:04:25Z INFO HostContext] Well known directory 'Bin': '/home/christopher/fgalind1/_layout/bin'
[2021-11-19 15:04:25Z INFO HostContext] Well known directory 'Root': '/home/christopher/fgalind1/_layout'
[2021-11-19 15:04:25Z INFO HostContext] Well known config file 'Credentials': '/home/christopher/fgalind1/_layout/.credentials'
[2021-11-19 15:04:25Z INFO ConfigurationStore] CredFilePath: /home/christopher/fgalind1/_layout/.credentials
[2021-11-19 15:04:25Z INFO HostContext] Well known directory 'Bin': '/home/christopher/fgalind1/_layout/bin'
[2021-11-19 15:04:25Z INFO HostContext] Well known directory 'Root': '/home/christopher/fgalind1/_layout'
[2021-11-19 15:04:25Z INFO HostContext] Well known config file 'MigratedCredentials': '/home/christopher/fgalind1/_layout/.credentials_migrated'
[2021-11-19 15:04:25Z INFO ConfigurationStore] MigratedCredFilePath: /home/christopher/fgalind1/_layout/.credentials_migrated
[2021-11-19 15:04:25Z INFO HostContext] Well known directory 'Bin': '/home/christopher/fgalind1/_layout/bin'
[2021-11-19 15:04:25Z INFO HostContext] Well known directory 'Root': '/home/christopher/fgalind1/_layout'
[2021-11-19 15:04:25Z INFO HostContext] Well known config file 'Service': '/home/christopher/fgalind1/_layout/.service'
[2021-11-19 15:04:25Z INFO ConfigurationStore] ServiceConfigFilePath: /home/christopher/fgalind1/_layout/.service
[2021-11-19 15:04:25Z VERB ConfigurationManager] store created
[2021-11-19 15:04:25Z INFO CommandSettings] Flag 'help': 'False'
[2021-11-19 15:04:25Z INFO CommandSettings] Flag 'version': 'False'
[2021-11-19 15:04:25Z INFO CommandSettings] Flag 'commit': 'False'
[2021-11-19 15:04:25Z INFO CommandSettings] Flag 'check': 'False'
[2021-11-19 15:04:25Z INFO CommandSettings] Command 'configure': 'False'
[2021-11-19 15:04:25Z INFO CommandSettings] Command 'remove': 'False'
[2021-11-19 15:04:25Z INFO CommandSettings] Command 'warmup': 'False'
[2021-11-19 15:04:25Z INFO ConfigurationManager] LoadSettings
[2021-11-19 15:04:25Z INFO ConfigurationStore] IsConfigured()
[2021-11-19 15:04:25Z INFO ConfigurationStore] IsConfigured: True
[2021-11-19 15:04:25Z INFO ConfigurationManager] Is configured: True
[2021-11-19 15:04:25Z INFO ConfigurationStore] Read setting file: 283 chars
[2021-11-19 15:04:25Z INFO ConfigurationManager] Settings Loaded
[2021-11-19 15:04:25Z INFO ConfigurationStore] IsServiceConfigured()
[2021-11-19 15:04:25Z INFO ConfigurationStore] IsServiceConfigured: False
[2021-11-19 15:04:25Z INFO CommandSettings] Command 'run': 'True'
[2021-11-19 15:04:25Z INFO ConfigurationStore] IsConfigured()
[2021-11-19 15:04:25Z INFO ConfigurationStore] IsConfigured: True
[2021-11-19 15:04:25Z INFO ConfigurationManager] Is configured: True
[2021-11-19 15:04:25Z VERB Runner] Configured as service: 'False'
[2021-11-19 15:04:25Z INFO Runner] Could not parse the argument value '' for StartupType. Defaulting to Manual
[2021-11-19 15:04:25Z INFO Runner] Set runner startup type - Manual
[2021-11-19 15:04:25Z INFO CommandSettings] Flag 'once': 'False'
[2021-11-19 15:04:25Z INFO CommandSettings] Flag 'once': 'False'
[2021-11-19 15:04:25Z INFO Runner] RunAsync
[2021-11-19 15:04:25Z VERB MessageListener] Entering Initialize
[2021-11-19 15:04:25Z VERB MessageListener] Entering CreateSessionAsync
[2021-11-19 15:04:25Z INFO ConfigurationManager] LoadSettings
[2021-11-19 15:04:25Z INFO ConfigurationStore] IsConfigured()
[2021-11-19 15:04:25Z INFO ConfigurationStore] IsConfigured: True
[2021-11-19 15:04:25Z INFO ConfigurationManager] Is configured: True
[2021-11-19 15:04:25Z INFO ConfigurationManager] Settings Loaded
[2021-11-19 15:04:25Z INFO MessageListener] {
  "AgentId": 110,
  "AgentName": "test2",
  "PoolId": 1,
  "PoolName": "Default",
  "ServerUrl": "https://pipelines.actions.githubusercontent.com/hLKeOqFOx2P1UjB1fkIMEx7TiTzQehyUqQVc3IaM07pxeKHc49",
  "GitHubUrl": "https://github.com/ChristopherHX/ghat2",
  "WorkFolder": "_work"
}
[2021-11-19 15:04:25Z INFO MessageListener] Loading Credentials
[2021-11-19 15:04:25Z VERB CredentialManager] Entering Initialize
[2021-11-19 15:04:25Z INFO ConfigurationStore] HasCredentials()
[2021-11-19 15:04:25Z INFO ConfigurationStore] stored True
[2021-11-19 15:04:25Z INFO CredentialManager] GetCredentialProvider
[2021-11-19 15:04:25Z INFO CredentialManager] Creating type OAuth
[2021-11-19 15:04:25Z INFO CredentialManager] Creating credential type: OAuth
[2021-11-19 15:04:25Z VERB CredentialManager] Created credential type
[2021-11-19 15:04:25Z VERB RSAFileKeyManager] Entering Initialize
[2021-11-19 15:04:25Z INFO HostContext] Well known directory 'Bin': '/home/christopher/fgalind1/_layout/bin'
[2021-11-19 15:04:25Z INFO HostContext] Well known directory 'Root': '/home/christopher/fgalind1/_layout'
[2021-11-19 15:04:25Z INFO HostContext] Well known config file 'RSACredentials': '/home/christopher/fgalind1/_layout/.credentials_rsaparams'
[2021-11-19 15:04:25Z INFO RSAFileKeyManager] Loading RSA key parameters from file /home/christopher/fgalind1/_layout/.credentials_rsaparams
[2021-11-19 15:04:25Z INFO MessageListener] Attempt to create session.
[2021-11-19 15:04:25Z INFO MessageListener] Connecting to the Runner Server...
[2021-11-19 15:04:25Z INFO RunnerServer] Establish connection with 100 seconds timeout.
[2021-11-19 15:04:25Z INFO GitHubActionsService] Starting operation Location.GetConnectionData
[2021-11-19 15:04:25Z VERB GitHubActionsService] Started GET request to https://pipelines.actions.githubusercontent.com/hLKeOqFOx2P1UjB1fkIMEx7TiTzQehyUqQVc3IaM07pxeKHc49/_apis/connectionData?connectOptions=0&lastChangeId=4911105&lastChangeId64=4911105
[2021-11-19 15:04:25Z VERB GitHubActionsService] Created OAuth issued token provider instance 24412946 (Bearer)
[2021-11-19 15:04:25Z INFO RunnerServer] Establish connection with 60 seconds timeout.
[2021-11-19 15:04:25Z INFO GitHubActionsService] Starting operation Location.GetConnectionData
[2021-11-19 15:04:25Z VERB GitHubActionsService] Started GET request to https://pipelines.actions.githubusercontent.com/hLKeOqFOx2P1UjB1fkIMEx7TiTzQehyUqQVc3IaM07pxeKHc49/_apis/connectionData?connectOptions=0&lastChangeId=4911105&lastChangeId64=4911105
[2021-11-19 15:04:25Z INFO RunnerServer] Establish connection with 60 seconds timeout.
[2021-11-19 15:04:25Z INFO GitHubActionsService] Starting operation Location.GetConnectionData
[2021-11-19 15:04:25Z VERB GitHubActionsService] Started GET request to https://pipelines.actions.githubusercontent.com/hLKeOqFOx2P1UjB1fkIMEx7TiTzQehyUqQVc3IaM07pxeKHc49/_apis/connectionData?connectOptions=0&lastChangeId=4911105&lastChangeId64=4911105
[2021-11-19 15:04:25Z VERB GitHubActionsService] Finished GET request to https://pipelines.actions.githubusercontent.com/hLKeOqFOx2P1UjB1fkIMEx7TiTzQehyUqQVc3IaM07pxeKHc49/_apis/connectionData?connectOptions=0&lastChangeId=4911105&lastChangeId64=4911105 with status code 200
[2021-11-19 15:04:25Z INFO GitHubActionsService] Finished operation Location.GetConnectionData
[2021-11-19 15:04:25Z VERB GitHubActionsService] Finished GET request to https://pipelines.actions.githubusercontent.com/hLKeOqFOx2P1UjB1fkIMEx7TiTzQehyUqQVc3IaM07pxeKHc49/_apis/connectionData?connectOptions=0&lastChangeId=4911105&lastChangeId64=4911105 with status code 200
[2021-11-19 15:04:25Z INFO GitHubActionsService] Finished operation Location.GetConnectionData
[2021-11-19 15:04:26Z VERB GitHubActionsService] Finished GET request to https://pipelines.actions.githubusercontent.com/hLKeOqFOx2P1UjB1fkIMEx7TiTzQehyUqQVc3IaM07pxeKHc49/_apis/connectionData?connectOptions=0&lastChangeId=4911105&lastChangeId64=4911105 with status code 200
[2021-11-19 15:04:26Z INFO GitHubActionsService] Finished operation Location.GetConnectionData
[2021-11-19 15:04:26Z INFO MessageListener] VssConnection created
[2021-11-19 15:04:26Z INFO Terminal] WRITE LINE:
[2021-11-19 15:04:26Z INFO Terminal] WRITE LINE:
[2021-11-19 15:04:26Z VERB GitHubActionsService] Started POST request to https://pipelines.actions.githubusercontent.com/hLKeOqFOx2P1UjB1fkIMEx7TiTzQehyUqQVc3IaM07pxeKHc49/_apis/distributedtask/pools/1/sessions
[2021-11-19 15:04:26Z WARN GitHubActionsService] Authentication failed with status code 401.
WWW-Authenticate: Bearer
Strict-Transport-Security: max-age=2592000
X-TFS-ProcessId: b9ccf7c9-3df6-47b5-bcea-26387c8e1600
ActivityId: d0c0a27c-a087-4b25-99e6-de3878aefaee
X-TFS-Session: d905b343-b16b-4d57-bebd-e3b4864573e5
X-VSS-E2EID: 7fb95905-2c4c-4a88-b4a5-c64878a36e03
X-VSS-SenderDeploymentId: 2c974d96-2c30-cef5-eff2-3e0511a903a5
X-TFS-ServiceError: The+user+%27System%3aPublicAccess%3baaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa%27+is+not+authorized+to+access+this+resource.
X-VSS-S2STargetService: 0000005A-0000-8888-8000-000000000000/visualstudio.com
X-Cache: CONFIG_NOCACHE
X-MSEdge-Ref: Ref A: 8E6B5AE4623645E3A4784CA46FF94663 Ref B: FRAEDGE1115 Ref C: 2021-11-19T15:04:25Z
Date: Fri, 19 Nov 2021 15:04:26 GMT

[2021-11-19 15:04:26Z VERB GitHubActionsService] Started authentication
[2021-11-19 15:04:26Z VERB GitHubActionsService] OAuth issued token provider instance 24412946 is acquiring a token
[2021-11-19 15:04:26Z INFO RSAFileKeyManager] Loading RSA key parameters from file /home/christopher/fgalind1/_layout/.credentials_rsaparams
[2021-11-19 15:04:26Z INFO RSAFileKeyManager] Loading RSA key parameters from file /home/christopher/fgalind1/_layout/.credentials_rsaparams
[2021-11-19 15:04:26Z INFO GitHubActionsService] AAD Correlation ID for this token request: Unknown
[2021-11-19 15:04:26Z VERB GitHubActionsService] OAuth issued token provider instance 24412946 acquired new token instance 28972298
[2021-11-19 15:04:26Z VERB GitHubActionsService] Finished authentication
[2021-11-19 15:04:27Z VERB GitHubActionsService] OAuth issued token provider instance 24412946 validated token instance 28972298
[2021-11-19 15:04:27Z VERB GitHubActionsService] Finished POST request to https://pipelines.actions.githubusercontent.com/hLKeOqFOx2P1UjB1fkIMEx7TiTzQehyUqQVc3IaM07pxeKHc49/_apis/distributedtask/pools/1/sessions with status code 200
[2021-11-19 15:04:27Z INFO MessageListener] Session created.
[2021-11-19 15:04:27Z INFO Terminal] WRITE LINE: 2021-11-19 15:04:27Z: Listening for Jobs
[2021-11-19 15:04:27Z VERB JobNotification] Entering Initialize
[2021-11-19 15:04:27Z VERB JobDispatcher] Entering Initialize
[2021-11-19 15:04:27Z INFO JobDispatcher] Set runner/worker IPC timeout to 30 seconds.
[2021-11-19 15:04:27Z VERB MessageListener] Entering GetNextMessageAsync
[2021-11-19 15:04:27Z VERB GitHubActionsService] Started GET request to https://pipelines.actions.githubusercontent.com/hLKeOqFOx2P1UjB1fkIMEx7TiTzQehyUqQVc3IaM07pxeKHc49/_apis/distributedtask/pools/1/messages?sessionId=737a13f3-03ce-4339-8259-8a3ec2ed4c4d
[2021-11-19 15:04:29Z VERB GitHubActionsService] Finished GET request to https://pipelines.actions.githubusercontent.com/hLKeOqFOx2P1UjB1fkIMEx7TiTzQehyUqQVc3IaM07pxeKHc49/_apis/distributedtask/pools/1/messages?sessionId=737a13f3-03ce-4339-8259-8a3ec2ed4c4d with status code 200
[2021-11-19 15:04:29Z INFO RSAFileKeyManager] Loading RSA key parameters from file /home/christopher/fgalind1/_layout/.credentials_rsaparams
[2021-11-19 15:04:29Z INFO MessageListener] Message '2' received from session '737a13f3-03ce-4339-8259-8a3ec2ed4c4d'.
[2021-11-19 15:04:29Z VERB SelfUpdater] Entering Initialize
[2021-11-19 15:04:29Z VERB GitHubActionsService] Started GET request to https://pipelines.actions.githubusercontent.com/hLKeOqFOx2P1UjB1fkIMEx7TiTzQehyUqQVc3IaM07pxeKHc49/_apis/distributedtask/packages/agent/linux-x64/2.284.0?includeToken=True
[2021-11-19 15:04:29Z INFO Runner] Refresh message received, kick-off selfupdate background process.
[2021-11-19 15:04:29Z VERB MessageListener] Entering DeleteMessageAsync
[2021-11-19 15:04:29Z VERB GitHubActionsService] Started DELETE request to https://pipelines.actions.githubusercontent.com/hLKeOqFOx2P1UjB1fkIMEx7TiTzQehyUqQVc3IaM07pxeKHc49/_apis/distributedtask/pools/1/messages/2?sessionId=737a13f3-03ce-4339-8259-8a3ec2ed4c4d
[2021-11-19 15:04:29Z VERB GitHubActionsService] Finished GET request to https://pipelines.actions.githubusercontent.com/hLKeOqFOx2P1UjB1fkIMEx7TiTzQehyUqQVc3IaM07pxeKHc49/_apis/distributedtask/packages/agent/linux-x64/2.284.0?includeToken=True with status code 200
[2021-11-19 15:04:29Z INFO SelfUpdater] Version '2.284.0' of 'agent' package available in server.
[2021-11-19 15:04:29Z INFO SelfUpdater] Current running runner version is 2.283.3
[2021-11-19 15:04:29Z INFO SelfUpdater] An update is available, but it was chosen to skip the self-update.
[2021-11-19 15:04:30Z VERB GitHubActionsService] Finished DELETE request to https://pipelines.actions.githubusercontent.com/hLKeOqFOx2P1UjB1fkIMEx7TiTzQehyUqQVc3IaM07pxeKHc49/_apis/distributedtask/pools/1/messages/2?sessionId=737a13f3-03ce-4339-8259-8a3ec2ed4c4d with status code 200
[2021-11-19 15:04:30Z VERB MessageListener] Entering GetNextMessageAsync
[2021-11-19 15:04:30Z VERB GitHubActionsService] Started GET request to https://pipelines.actions.githubusercontent.com/hLKeOqFOx2P1UjB1fkIMEx7TiTzQehyUqQVc3IaM07pxeKHc49/_apis/distributedtask/pools/1/messages?sessionId=737a13f3-03ce-4339-8259-8a3ec2ed4c4d&lastMessageId=2
[2021-11-19 15:04:30Z VERB Runner] Auto update task running at backend, waiting for getNextMessage or selfUpdateTask to finish.
[2021-11-19 15:04:30Z INFO Runner] Auto update task finished at backend, there is no available runner update needs to apply, continue message queue looping.
[2021-11-19 15:05:21Z VERB GitHubActionsService] Finished GET request to https://pipelines.actions.githubusercontent.com/hLKeOqFOx2P1UjB1fkIMEx7TiTzQehyUqQVc3IaM07pxeKHc49/_apis/distributedtask/pools/1/messages?sessionId=737a13f3-03ce-4339-8259-8a3ec2ed4c4d&lastMessageId=2 with status code 202
[2021-11-19 15:05:21Z VERB MessageListener] No message retrieved from session '737a13f3-03ce-4339-8259-8a3ec2ed4c4d'.
[2021-11-19 15:05:21Z VERB GitHubActionsService] Started GET request to https://pipelines.actions.githubusercontent.com/hLKeOqFOx2P1UjB1fkIMEx7TiTzQehyUqQVc3IaM07pxeKHc49/_apis/distributedtask/pools/1/messages?sessionId=737a13f3-03ce-4339-8259-8a3ec2ed4c4d&lastMessageId=2
[2021-11-19 15:06:11Z VERB GitHubActionsService] Finished GET request to https://pipelines.actions.githubusercontent.com/hLKeOqFOx2P1UjB1fkIMEx7TiTzQehyUqQVc3IaM07pxeKHc49/_apis/distributedtask/pools/1/messages?sessionId=737a13f3-03ce-4339-8259-8a3ec2ed4c4d&lastMessageId=2 with status code 202
[2021-11-19 15:06:11Z VERB MessageListener] No message retrieved from session '737a13f3-03ce-4339-8259-8a3ec2ed4c4d'.
[2021-11-19 15:06:11Z VERB GitHubActionsService] Started GET request to https://pipelines.actions.githubusercontent.com/hLKeOqFOx2P1UjB1fkIMEx7TiTzQehyUqQVc3IaM07pxeKHc49/_apis/distributedtask/pools/1/messages?sessionId=737a13f3-03ce-4339-8259-8a3ec2ed4c4d&lastMessageId=2
[2021-11-19 15:07:01Z VERB GitHubActionsService] Finished GET request to https://pipelines.actions.githubusercontent.com/hLKeOqFOx2P1UjB1fkIMEx7TiTzQehyUqQVc3IaM07pxeKHc49/_apis/distributedtask/pools/1/messages?sessionId=737a13f3-03ce-4339-8259-8a3ec2ed4c4d&lastMessageId=2 with status code 202
[2021-11-19 15:07:01Z VERB MessageListener] No message retrieved from session '737a13f3-03ce-4339-8259-8a3ec2ed4c4d'.
[2021-11-19 15:07:01Z VERB GitHubActionsService] Started GET request to https://pipelines.actions.githubusercontent.com/hLKeOqFOx2P1UjB1fkIMEx7TiTzQehyUqQVc3IaM07pxeKHc49/_apis/distributedtask/pools/1/messages?sessionId=737a13f3-03ce-4339-8259-8a3ec2ed4c4d&lastMessageId=2
[2021-11-19 15:07:18Z INFO Terminal] WRITE LINE: Exiting...
[2021-11-19 15:07:18Z INFO ConfigurationStore] IsServiceConfigured()
[2021-11-19 15:07:18Z INFO ConfigurationStore] IsServiceConfigured: False
[2021-11-19 15:07:18Z INFO HostContext] Runner will be shutdown for UserCancelled
[2021-11-19 15:07:18Z WARN GitHubActionsService] GET request to https://pipelines.actions.githubusercontent.com/hLKeOqFOx2P1UjB1fkIMEx7TiTzQehyUqQVc3IaM07pxeKHc49/_apis/distributedtask/pools/1/messages?sessionId=737a13f3-03ce-4339-8259-8a3ec2ed4c4d&lastMessageId=2 has been cancelled.
[2021-11-19 15:07:18Z INFO MessageListener] Get next message has been cancelled.
[2021-11-19 15:07:18Z INFO JobDispatcher] Shutting down JobDispatcher. Make sure all WorkerDispatcher has finished.
[2021-11-19 15:07:18Z VERB GitHubActionsService] Started DELETE request to https://pipelines.actions.githubusercontent.com/hLKeOqFOx2P1UjB1fkIMEx7TiTzQehyUqQVc3IaM07pxeKHc49/_apis/distributedtask/pools/1/sessions/737a13f3-03ce-4339-8259-8a3ec2ed4c4d
[2021-11-19 15:07:18Z VERB GitHubActionsService] Finished DELETE request to https://pipelines.actions.githubusercontent.com/hLKeOqFOx2P1UjB1fkIMEx7TiTzQehyUqQVc3IaM07pxeKHc49/_apis/distributedtask/pools/1/sessions/737a13f3-03ce-4339-8259-8a3ec2ed4c4d with status code 200
[2021-11-19 15:07:18Z INFO Listener] Runner execution been cancelled.

@gmambro
Copy link

gmambro commented Nov 19, 2021

See your point. Is the one with the hack hanging because there is some API version check which fails as the fake client version is higher than the server (e.g 3.0.0 > 2.284.0)?

@ChristopherHX
Copy link
Contributor

The logs are about the proposed change of this Pull Request without changing the runner version at all.
I mean this PR is hanging for me, because 2.283.3 < 2.284.0 and github seem to forbid outdated runners to run jobs.

Changing the runner version to 3.0.0 doesn't hang for me
Please try it yourself.

@gmambro
Copy link

gmambro commented Nov 19, 2021

@ChristopherHX Now I see, thanks

@tyrken
Copy link

tyrken commented Nov 19, 2021

FWIW I'm using the "lie about runner version as 3.0.0" trick (thanks @ChristopherHX ) to run my forked runner, and it works well with GitHub Enterprise also.

I put the file-override hack into the Dockerfile I use to build my custom image - so I don't have rebase clashes when syncing with upstream changing the version number properly.

@ethomson
Copy link
Contributor

ethomson commented Dec 1, 2021

Thanks for the PR @fgalind1 - as @ChristopherHX noted, the service will still not queue jobs on outdated runners, so we'll need to make some changes to the service to support this fully.

I outlined our plans to support you in this issue: #1396 (comment)

We've started this work and I look forward to adding this support.

@fgalind1
Copy link
Author

fgalind1 commented Dec 1, 2021

Thanks for the PR @fgalind1 - as @ChristopherHX noted, the service will still not queue jobs on outdated runners, so we'll need to make some changes to the service to support this fully.

I outlined our plans to support you in this issue: #1396 (comment)

We've started this work and I look forward to adding this support.

thanks for helping on this 👍 ! I'm closing this PR

@fgalind1 fgalind1 closed this Dec 1, 2021
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants