Fix ephemeral runner set status update#4528
Open
nikola-jokic wants to merge 2 commits into
Open
Conversation
Contributor
|
Hello! Thank you for your contribution. Please review our contribution guidelines to understand the project's testing and code conventions. |
Contributor
There was a problem hiding this comment.
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(...))toStatus().Update(...). - Add
Minimum=0validation to several status counter fields in Go types and generated CRDs. - In the experimental chart’s Kubernetes mode, render user
runner.container.volumeMountsand 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 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.