refactor: pull cache server management out of runner #1373
No reviewers
Labels
No labels
FreeBSD
Kind/Breaking
Kind/Bug
Kind/Chore
Kind/DependencyUpdate
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
Windows
linux-powerpc64le
linux-riscv64
linux-s390x
run-end-to-end-tests
run-forgejo-tests
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo/runner!1373
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "mfenniak/forgejo-runner:multiconnection-cache-server"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When
NewRunneris invoked, it creates aRunnerwhich does client-specific configuration -- environment variablesGITHUB_SERVER_URL,ACTIONS_RUNTIME_URL, andACTIONS_RESULTS_URLare all different based upon the connection address to the remote client. If we're going to support multiple connections to different servers, we're going to need multiple runners with these different environments.NewRunneralso creates the cache server.This PR pulls the cache server creation out of
NewRunnerso that multiple runners could be created.refactor: pull cache server mgmt out of runnerto refactor: pull cache server management out of runnerb86773193ccedd332924cedd3329245252141855@ -76,2 +73,2 @@} else {cacheProxy = nilif cacheProxy != nil {envs["ACTIONS_CACHE_URL"] = cacheProxy.ExternalURL()Is there an advantage to passing the entire handler to
NewRunnerif only the external URL is necessary? I see that typing is better (unless you can passnet.URL), but it needs a mock during testing.The URL isn't the only usage -- the
cacheProxyis stored on the runner, and it is used to register new runs with the proxy when they start.Sometimes, I don't see things that stare me in the face 🤦
cascading-pr updated at actions/setup-forgejo#885