Skip to content

Self-hosted runners: log lookup, proxy and cache problems #331

Open

Description

@dhensby

These only show on self-hosted runners or unusual setups, but they make failures harder to diagnose or fix.

  • Logs are searched only on C:. gatherSummaryFiles() and the ERRORLOG fallback in gatherErrorLogs() use the literal path C:/Program Files/Microsoft SQL Server/... (src/utils.ts#L386, L396, L432). Setup writes these logs under %ProgramFiles%, so on a runner with Windows on another drive the action finds no Summary.txt or Detail.txt. It still finds the ERRORLOG through the instance's registry entry, but not through the fallback.
  • Detail.txt is chosen by sorting full paths. The version folder (150, 160, 170) comes before the date folder in the path, so when logs from another SQL Server version exist, the log of the highest version wins even if it is older. A failed 2022 install can then print an old 2025 Detail.txt.
  • The CU page fetch ignores the proxy. fetchUpdatePage() uses Node's fetch (src/utils.ts#L326). In Node 24, fetch ignores HTTPS_PROXY unless NODE_USE_ENV_PROXY=1 is set, but the downloads through @actions/tool-cache use the proxy. Behind a proxy, the media downloads work, the CU page fetch fails, and the action continues without the CU.
  • The cache key ignores the URL. Cached media is found by tool name, version and (for the MSIs) architecture, never by URL (src/tool-cache.ts#L33-L35). When the action changes a download URL, for example to update the ODBC builds in ODBC and Native Client installer fixes #330, a self-hosted runner keeps using the old cached file. The README mentions this only for cumulative updates (README.md#L78-L86).

Suggested fix:

  • Build the log paths from process.env.ProgramFiles.
  • Choose Detail.txt by its date folder rather than by the full path, or search only the folder of the version being installed.
  • Use @actions/http-client for the CU page fetch, so that it uses the same proxy settings as the downloads.
  • Include a short hash of the URL in the cache version, or document how to clear the cache for every tool.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions