Skip to content

Conversation

@nikola-jokic
Copy link
Collaborator

Fixes #4331

Copilot AI review requested due to automatic review settings December 4, 2025 11:05
@nikola-jokic nikola-jokic added the gha-runner-scale-set Related to the gha-runner-scale-set mode label Dec 4, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 4, 2025

Hello! Thank you for your contribution.

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

Copilot finished reviewing on behalf of nikola-jokic December 4, 2025 11:09
Copy link
Contributor

Copilot AI left a comment

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 adds logic to restart listener pods when they are evicted or OOMKilled, addressing issue #4331. The changes refactor the pod termination handling by extracting common deletion logic into a reusable deleteListenerPod() helper function and add two new switch cases to explicitly handle "Evicted" and "OOMKilled" pod statuses.

Key Changes:

  • Added explicit handling for evicted and OOMKilled pods in the reconciliation loop
  • Refactored pod deletion logic into a dedicated deleteListenerPod() function to eliminate code duplication
  • Added comprehensive test coverage for both eviction and OOMKilled scenarios

Reviewed changes

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

File Description
controllers/actions.github.com/autoscalinglistener_controller.go Added new switch cases for "Evicted" and "OOMKilled" pod status reasons before container status checks; extracted common pod deletion logic into a deleteListenerPod() helper function that handles metric publishing, pod deletion, and config secret cleanup
controllers/actions.github.com/autoscalinglistener_controller_test.go Added two new test cases to verify pod recreation behavior for evicted pods and OOMKilled pods, following the existing test pattern for pod interruptions

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

@nikola-jokic nikola-jokic changed the title Restart the listener if pod is evicted or OOMKilled is set on the pod Restart the listener if pod is evicted Dec 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gha-runner-scale-set Related to the gha-runner-scale-set mode

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AutoscalingListener pod not recreated after eviction, causing scaling downtime

2 participants