Commit Graph
1875 Commits
Author SHA1 Message Date
Nikola JokicandCopilot App 32ed938405 Fix syntax error and normalize ephemeralrunners resource casing
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-09-12 23:37:31 +02:00
Nikola JokicandCopilot App 0c17a55075 Guard Running phase transition with optimistic locking
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-09-12 23:37:31 +02:00
Nikola JokicandCopilot Autofix powered by AI 839272075a Change resource name to lowercase 'ephemeralrunners'
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-09-12 23:37:31 +02:00
Nikola JokicandCopilot App 03a2cdbdec Let the listener own the EphemeralRunner Running phase transition
The controller derived Status.Phase directly from the pod phase, so a runner
became Running as soon as its pod started, whether or not it had picked up a
job. That made Running mean "the pod is up" instead of "the runner is busy",
and it left the EphemeralRunnerSet scale-down path unable to tell an idle
runner from one that is executing a job.

The listener already knows when a job is assigned to a specific runner, so
move the transition there. HandleJobStarted now reads the runner first and
only promotes it to Running when it is not terminal (Failed, Succeeded or
Outdated) and not being deleted, then patches the phase alongside the job
fields it already writes. The listener role gains "get" on ephemeralrunners
for that read.

On the controller side updateRunStatusFromPod keeps publishing the initial
Pending phase while the pod is starting, and no longer promotes to Running.
Runners waiting for work now stay Pending, so scale-down picks them before
runners that are actually executing a job.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-09-12 23:37:31 +02:00
Nikola JokicandCopilot App 9b4c03e312 Do not generate a mock for the deepCopyObject constraint
lazycopy.go introduces deepCopyObject, a generic type constraint rather
than a collaborator, and the package's "all: true" mockery config picks
it up and emits a large mock that nothing can use. Switch the package to
an explicit include/exclude regex pair so every other interface is still
discovered automatically while deepCopyObject is skipped.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-09-12 23:28:18 +02:00
Nikola JokicandCopilot App 6b62a10639 Take the reconcile snapshot lazily, right before the first mutation
Reconcilers deep copied the object they had just fetched on every single
reconcile, purely so a merge patch could be computed on the rare pass
that actually changes something. The copy is a full recursive walk and
allocation of the object, and the overwhelming majority of reconciles
throw it away untouched.

Introduce lazyCopy, which takes the snapshot on the first call to
Mutate and hands back the live object. Because Mutate is the only way
to reach the object, the snapshot cannot be taken after the mutation it
is supposed to be diffed against, which is the way this optimization is
usually gotten wrong.

Apply it to the four Reconcile entry points, and move the two
EphemeralRunnerSet status copies inside the branch that patches, so they
are only paid for when the status really changed.

While here, drop the short circuit in the EphemeralRunner finalizer
block: `addedFinalizers || AddFinalizer(...)` skipped adding the actions
finalizer whenever the first finalizer was added.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-09-12 23:28:18 +02:00
Nikola JokicandCopilot App 854c0517a7 Make the Outdated phase revision-aware
An EphemeralRunner that exits as Outdated marks its EphemeralRunnerSet
Outdated, and the AutoscalingRunnerSet then stops scaling it. Without a way
to tell which runner spec an Outdated report refers to, a report from a
runner built before the spec was updated keeps the set switched off after
the update that was supposed to fix it.

Stamp each runner with the actionable revision it was built from, and judge
Outdated reports against the revision the set has applied:

  - A runner whose revision is older than the applied one is reporting on a
    spec that has already been replaced. It is deleted and rebuilt from the
    current spec, and it does not hold the set Outdated.
  - A runner whose revision is current is reporting on the live spec, so the
    set stays Outdated. It is deliberately not delete-and-replaced: a fresh
    runner at the same revision would report Outdated again, forever.

Runners without the annotation parse to revision 0, which matches the zero
value of Status.AppliedActionableRevision, so existing runners keep their
current behaviour across an upgrade.

The phase is derived inside patchAppliedActionableRevisionStatus, from a
list read through the same authoritative reader as the set itself, because
the optimistic lock on that patch covers the EphemeralRunnerSet object only
and cannot vouch for a separately-read list. The runners are classified
against the live applied revision rather than the revision this call was
asked to apply: the caller reads the spec from the cache while this function
re-reads the status from the API server, so a lagging reconcile can arrive
with a target behind the live marker, and judging against it would flip a
set that has already moved on back to Outdated.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-09-12 23:18:26 +02:00
Nikola JokicandCopilot App 03328aa14f Remove the integrity hash annotation (#4643)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-09-11 18:27:55 +02:00
484564e6d6 Defer scale up until the listener publishes a state that accounts for finished runners (#4642)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-09-11 15:29:02 +02:00
6f89d057c0 Track runner spec updates with an actionable revision (#4638)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-09-11 12:44:03 +00:00
Nikola JokicandCopilot App 5581cd0c54 Track AutoscalingRunnerSet updates with metadata.generation (#4636)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-09-11 14:38:30 +02:00
dependabot[bot] db5702bb71 Bump the actions group across 1 directory with 8 updates (#4623) 2026-09-10 23:15:31 +02:00
Nikola JokicandCopilot App 0cfedfbb2c Detect listener pod drift by comparing the pod, not a hash (#4635)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-09-10 22:56:43 +02:00
c475023e28 Fix EphemeralRunnerSet metadata drift check comparing against the wrong value (#4634)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-09-10 11:52:08 +02:00
Nikola JokicandCopilot App 22046a2718 Validate and coerce listener metadata at render time (#4640)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-09-10 09:14:48 +00:00
Nikola JokicandCopilot App adf7d0026e Validate label and annotation metadata at chart render time (#4639)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-09-10 11:12:10 +02:00
b0e69a37bd Render label and annotation values as strings (#4637)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-09-10 10:22:05 +02:00
KR Ravindra 5e540b6c71 Add default and per-controller max-concurrent-reconciles flags (#4626)
Signed-off-by: KR Ravindra <42912207+KR-Ravindra@users.noreply.github.com>
2026-09-09 09:50:13 +02:00
Nikola Jokic 7c68e1d318 Set listener qps and burst (#4558) 2026-09-08 15:49:58 +02:00
Nikola Jokic bc677d306c Add @actions/actions-runtime to codeowners (#4631) 2026-09-08 15:47:46 +02:00
Nikola Jokic f0d0b1d439 Add guards on timings so we don't publish incorrect metrics (#4621) 2026-09-08 14:32:24 +02:00
Nikola Jokic c3dfb396d3 Fix nil ResourceCache panic in stale scale set tests (#4628) 2026-09-08 12:34:45 +02:00
Nikola Jokic 54147cfa5e Introduce cache for lookups of desired resource state, to reduce the amount of allocations in the controller (#4568) 2026-09-07 13:49:28 +02:00
Junya Okabe 87592be6d3 Remove orphaned testserver package (#4620) 2026-09-07 10:40:28 +02:00
dependabot[bot] a4ac89e2a7 Bump golang.org/x/crypto from 0.51.0 to 0.52.0 (#4562)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-03 16:45:00 +01:00
Diogo Torres 3cfdcf59fe Re-register the runner scale set when it is gone from the Actions service (#4571) 2026-09-03 08:16:06 +01:00
github-actions[bot] 438440e92a Updates: runner to v2.337.0 (#4613)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-08-31 16:53:02 +01:00
github-actions[bot] a035c5a393 Updates: runner to v2.336.0 (#4578)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-07-21 15:51:06 +02:00
dependabot[bot]andNikola Jokic 252eb51766 Bump the actions group across 1 directory with 6 updates (#4559)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nikola Jokic <jokicnikola07@gmail.com>
2026-07-15 14:44:09 +02:00
Nikola Jokic 03463c051c Fix deprecated calls (#4570) 2026-07-14 19:34:13 +02:00
Nikola Jokic f6a3d738de Use metrics to display runner statuses instead of status field for EphemeralRunnerSet and AutoscalingRunnerSet (#4557) 2026-07-14 19:31:11 +02:00
Nikola Jokic 368e2f28b8 Use Patch instead of Update (#4533) 2026-07-10 12:34:40 +02:00
Nikola Jokic 2fa72b510f Tag fields with optional allowing patches without issues (#4528) 2026-07-10 12:28:10 +02:00
Junya Okabe 68c0a86188 Mark generated files as linguist-generated (#4536) 2026-07-09 14:22:46 +02:00
Junya Okabe e06294f5de Make controller terminationGracePeriodSeconds configurable and align it with graceful shutdown timeout (#4556) 2026-07-07 00:28:57 +02:00
Junya Okabe 2ee6b3b8e8 Increase e2e wait timeouts to reduce flakiness (#4545) 2026-06-30 15:05:58 +02:00
dependabot[bot] 24686a974e Bump the actions group across 1 directory with 2 updates (#4539)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-27 18:30:32 +02:00
dependabot[bot] c7005c3696 Bump the gomod group across 1 directory with 11 updates (#4529)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-19 13:08:17 +02:00
Nikola Jokic 9c50514160 Fix typo and rename status to phase (#4506) 2026-06-15 12:51:13 +02:00
github-actions[bot] 391bc57773 Updates: runner to v2.335.1 (#4523)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-12 16:28:17 +02:00
Nikola Jokic 767e58e4b1 Upgrade resources in-place, causing 1-1 mapping between autoscaling runner set and ephemeral runner set (#4516) 2026-06-09 13:52:37 +02:00
dependabot[bot] 0acef229e2 Bump the actions group across 1 directory with 6 updates (#4518)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-09 10:50:43 +02:00
dependabot[bot]andJiaren Wu 0dc5f8a0c2 Bump the gomod group across 1 directory with 9 updates (#4508)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jiaren Wu <jiaren-wu@github.com>
2026-05-30 00:55:53 +02:00
Junya Okabe 631f39bb2a Add context: . to the docker/build-push-action (#4501) 2026-05-25 17:57:05 +02:00
Nikola Jokic 30879de182 Fix patch on autoscaling runner set when creating a runner scale set (#4502) 2026-05-22 17:51:47 +02:00
Nikola Jokic 5ca85bde2d Do not use EqualFold when checking u.Host (#4496) 2026-05-22 17:01:37 +02:00
Francesco RenziandCopilot 9bb16ae49d Prepare 0.14.2 release (#4503)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
gha-runner-scale-set-0.14.2
2026-05-22 12:07:13 +02:00
Nikola Jokic 7638475e3c Bump Go to 1.26.3 (#4504) 2026-05-22 12:04:06 +02:00
Nikola Jokic 8ecfbc63bf Revert "Fix typo and rename status to phase" (#4505) 2026-05-22 11:58:48 +02:00
Nikola Jokic 79ddd38442 Port rate limiter to experimental charts (#4478) 2026-05-22 11:45:09 +02:00