Skip to content

Fix ephemeral runner set status update#4528

Open
nikola-jokic wants to merge 2 commits into
masterfrom
nikola-jokic/fix-ephemeral-runner-set-status
Open

Fix ephemeral runner set status update#4528
nikola-jokic wants to merge 2 commits into
masterfrom
nikola-jokic/fix-ephemeral-runner-set-status

Conversation

@nikola-jokic

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings June 12, 2026 21:23
@github-actions

Copy link
Copy Markdown
Contributor

Hello! Thank you for your contribution.

Please review our contribution guidelines to understand the project's testing and code conventions.

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 adjusts the EphemeralRunnerSet controller’s status write path to reliably persist status updates, and tightens CRD validation for several status “count” fields (ensuring they are non-negative). It also updates the experimental scale-set chart to properly incorporate user-provided volumeMounts while avoiding TLS mount duplication.

Changes:

  • Switch EphemeralRunnerSet status persistence from Status().Patch(MergeFrom(...)) to Status().Update(...).
  • Add Minimum=0 validation to several status counter fields in Go types and generated CRDs.
  • In the experimental chart’s Kubernetes mode, render user runner.container.volumeMounts and pass them into the TLS mount helper for duplicate detection.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
controllers/actions.github.com/ephemeralrunnerset_controller.go Updates the status write mechanism to use Status().Update when status changes.
apis/actions.github.com/v1alpha1/ephemeralrunnerset_types.go Adds Minimum=0 validation markers to EphemeralRunnerSet status counters.
apis/actions.github.com/v1alpha1/autoscalingrunnerset_types.go Adds Minimum=0 validation marker to CurrentRunners in AutoscalingRunnerSet status.
config/crd/bases/actions.github.com_ephemeralrunnersets.yaml Propagates minimum: 0 constraints into the generated EphemeralRunnerSet CRD schema.
config/crd/bases/actions.github.com_autoscalingrunnersets.yaml Propagates minimum: 0 constraint for currentRunners into the generated AutoscalingRunnerSet CRD schema.
charts/gha-runner-scale-set-experimental/templates/_mode_kubernetes.tpl Renders user-defined runner volumeMounts and passes them to TLS mount helper to prevent duplicate mounts.
charts/gha-runner-scale-set-controller/crds/actions.github.com_ephemeralrunnersets.yaml Updates packaged CRD with minimum: 0 for EphemeralRunnerSet status counters.
charts/gha-runner-scale-set-controller/crds/actions.github.com_autoscalingrunnersets.yaml Updates packaged CRD with minimum: 0 for AutoscalingRunnerSet currentRunners.
charts/gha-runner-scale-set-controller-experimental/crds/actions.github.com_ephemeralrunnersets.yaml Updates packaged CRD with minimum: 0 for EphemeralRunnerSet status counters.
charts/gha-runner-scale-set-controller-experimental/crds/actions.github.com_autoscalingrunnersets.yaml Updates packaged CRD with minimum: 0 for AutoscalingRunnerSet currentRunners.

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

Comment thread charts/gha-runner-scale-set-experimental/templates/_mode_kubernetes.tpl Outdated
Comment on lines 317 to 321
// +optional
// +kubebuilder:validation:Minimum=0
CurrentRunners int `json:"currentRunners"`

// +optional
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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