actions / actions/runner

runsvc.sh is losing environment changes after autoupdate

Open
#4,177 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C#
Stars
6.3k
Forks
1.4k
Avg merge
1d 16h
Merged PRs (30d)
24

Description

Describe the bug
I don't recall this being an issue until the past year. Whenever the runner instance auto updates it is not preserving lines added in runsvc.sh after # insert anything to setup env when running as a service. We have a line here to source the .zshrc file so the proxy is setup correctly. Anytime a runner updates it ends up showing as offline because this line needs to be readded to our runsvc.sh

To Reproduce
Steps to reproduce the behavior:

  1. Set runner up for autoupdate
  2. Add some line after # insert anything to setup env when running as a service
  3. When the instance auto updates
  4. runsvc.sh is reset, no changes for environment setup are preserved.

Expected behavior
An auto update should restore this environment setup that is added by the user after # insert anything to setup env when running as a service

Runner Version and Platform

Version of your runner?
2.330.0

OS of the machine running the runner?
macOS 15

What's not working?

Environment changes made to runsvc.sh are wiped away on a runner update. I am not sure this always happened. Never had an issue with autoupdates until this past year. Not sure what version this broke in.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with runsvc.sh and the autoupdate reproduction described in the issue on macOS 15 with runner version 2.330.0. Inspect how the update replaces that script, especially content after the '# insert anything to setup env when running as a service' marker. Done means user-added environment setup survives an automatic update and the runner remains online.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, macos, shell
Domain
ci-cd, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.