Use Patch instead of Update by nikola-jokic · Pull Request #4533 · actions/actions-runner-controller · GitHub
Skip to content

Use Patch instead of Update#4533

Open
nikola-jokic wants to merge 15 commits into
masterfrom
nikola-jokic/update-to-patch-request
Open

Use Patch instead of Update#4533
nikola-jokic wants to merge 15 commits into
masterfrom
nikola-jokic/update-to-patch-request

Conversation

@nikola-jokic

Copy link
Copy Markdown
Collaborator

Depends on #4528

Copilot AI review requested due to automatic review settings June 18, 2026 22:43
@github-actions

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the controller and related manifests to prefer Kubernetes Patch operations over Update, and adjusts CRD/type optionality to support patching without schema/validation issues (per the dependency on #4528). It also includes a runner version bump and several integrity-hash/metadata propagation adjustments.

Changes:

  • Replace multiple Update/Status().Update calls with Patch(..., client.MergeFrom(...)), and update RBAC to allow patch where needed.
  • Refine integrity-hash and metadata propagation logic (filter/merge annotations/labels; update listener in-place rather than delete/recreate).
  • Update API types/CRDs (optional fields, printcolumns, proxy field rename UrlURL) and bump runner version to 2.335.1.

Reviewed changes

Copilot reviewed 37 out of 37 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
test/e2e/e2e_test.go Bumps e2e runner version constant.
runner/VERSION Bumps runner version used for images/builds.
runner/Makefile Bumps runner version default for runner image build.
Makefile Bumps runner version default at repo root.
controllers/actions.github.com/utils.go Adds mustJSON helper for structured spec logging.
controllers/actions.github.com/secretresolver/secret_resolver.go Renames proxy config field usage UrlURL.
controllers/actions.github.com/resourcebuilder.go Exports integrity-hash annotation key, refactors label/annotation merge, adds integrity hash helper.
controllers/actions.github.com/resourcebuilder_test.go Updates tests for new annotation key name.
controllers/actions.github.com/ephemeralrunnerset_controller.go Switches integrity-hash annotation writes from Update to Patch; refactors status patching.
controllers/actions.github.com/ephemeralrunnerset_controller_test.go Updates e2e-style controller tests to use Patch and URL field name.
controllers/actions.github.com/ephemeralrunner_controller_test.go Updates tests to patch status/pod updates instead of Update; uses deep copies for MergeFrom.
controllers/actions.github.com/autoscalingrunnerset_controller.go Uses spec-hash helpers and patch-based updates; updates listener in-place instead of delete/recreate.
controllers/actions.github.com/autoscalingrunnerset_controller_test.go Adjusts expectations for in-place updates and integrity-hash behavior; formatting tweaks.
controllers/actions.github.com/autoscalinglistener_controller.go Updates RBAC markers for patch; patches dependent resources; logs spec diffs when recreating pod.
controllers/actions.github.com/autoscalinglistener_controller_test.go Updates tests to patch pod status; UrlURL.
config/rbac/role.yaml Adjusts ClusterRole verbs to use patch for secrets/serviceaccounts and roles/rolebindings.
config/crd/bases/actions.github.com_ephemeralrunnersets.yaml CRD schema/printcolumns updates (phase column, optionality, minimums, proxy url required).
config/crd/bases/actions.github.com_ephemeralrunners.yaml CRD schema/printcolumns updates (Phase column name, TLS/proxy required subfields).
config/crd/bases/actions.github.com_autoscalingrunnersets.yaml CRD schema/printcolumns updates (phase column, failed runners column, minimums, doc text).
config/crd/bases/actions.github.com_autoscalinglisteners.yaml CRD schema updates (required descriptions removed, proxy url required, runnerScaleSetId minimum).
charts/gha-runner-scale-set/tests/template_test.go Updates chart test for proxy field rename UrlURL.
charts/gha-runner-scale-set/templates/manager_role.yaml Adds patch/update verbs in chart role template.
charts/gha-runner-scale-set-experimental/templates/manager_role.yaml Adds patch/update verbs in experimental chart role template.
charts/gha-runner-scale-set-experimental/templates/_mode_kubernetes.tpl Renders custom volume mounts and integrates them with GitHub server TLS mount helper.
charts/gha-runner-scale-set-controller/crds/actions.github.com_ephemeralrunnersets.yaml Vendored CRD copy updated to match base CRD changes.
charts/gha-runner-scale-set-controller/crds/actions.github.com_ephemeralrunners.yaml Vendored CRD copy updated to match base CRD changes.
charts/gha-runner-scale-set-controller/crds/actions.github.com_autoscalingrunnersets.yaml Vendored CRD copy updated to match base CRD changes.
charts/gha-runner-scale-set-controller/crds/actions.github.com_autoscalinglisteners.yaml Vendored CRD copy updated to match base CRD changes.
charts/gha-runner-scale-set-controller-experimental/crds/actions.github.com_ephemeralrunnersets.yaml Vendored experimental CRD copy updated to match base CRD changes.
charts/gha-runner-scale-set-controller-experimental/crds/actions.github.com_ephemeralrunners.yaml Vendored experimental CRD copy updated to match base CRD changes.
charts/gha-runner-scale-set-controller-experimental/crds/actions.github.com_autoscalingrunnersets.yaml Vendored experimental CRD copy updated to match base CRD changes.
charts/gha-runner-scale-set-controller-experimental/crds/actions.github.com_autoscalinglisteners.yaml Vendored experimental CRD copy updated to match base CRD changes.
apis/actions.github.com/v1alpha1/proxy_config_test.go Updates API tests for UrlURL.
apis/actions.github.com/v1alpha1/ephemeralrunnerset_types.go Marks fields optional and adds minimum validations / printcolumn updates.
apis/actions.github.com/v1alpha1/ephemeralrunner_types.go Adjusts printcolumn name and optional markers; makes spec fields optional for patching.
apis/actions.github.com/v1alpha1/autoscalingrunnerset_types.go Updates status printcolumns and validations; renames proxy field; removes AutoscalingRunnerSet.Hash().
apis/actions.github.com/v1alpha1/autoscalinglistener_types.go Marks spec fields optional; adds/adjusts validations; minor list type documentation tweak.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread controllers/actions.github.com/resourcebuilder.go
Comment thread controllers/actions.github.com/utils.go
Comment on lines 130 to 134
assert.Equal(t, labelValueKubernetesPartOf, listener.Labels[LabelKeyKubernetesPartOf])
assert.Equal(t, "runner-scale-set-listener", listener.Labels[LabelKeyKubernetesComponent])
assert.Equal(t, autoscalingRunnerSet.Labels[LabelKeyKubernetesVersion], listener.Labels[LabelKeyKubernetesVersion])
assert.NotEmpty(t, ephemeralRunnerSet.Annotations[annotationKeyIntegrityHash])
assert.NotEmpty(t, ephemeralRunnerSet.Annotations[AnnotationKeyIntegrityHash])
assert.Equal(t, autoscalingRunnerSet.Name, listener.Labels[LabelKeyGitHubScaleSetName])
Comment thread apis/actions.github.com/v1alpha1/autoscalinglistener_types.go
Comment thread apis/actions.github.com/v1alpha1/autoscalinglistener_types.go Outdated
Comment on lines +293 to 297
@nikola-jokic nikola-jokic force-pushed the nikola-jokic/update-to-patch-request branch from 77b79db to 094078c Compare June 21, 2026 23:13
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.

2 participants