这是indexloc提供的服务,不要输入任何密码
Skip to content

feat: Add K8s-bench presubmit workflow for task evaluation #326

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

prasad89
Copy link
Contributor

@prasad89 prasad89 commented Jun 9, 2025

This PR adds a K8s-bench presubmit GitHub Actions workflow that automatically runs evaluations when tasks are added or modified under k8s-bench/tasks.

@prasad89
Copy link
Contributor Author

prasad89 commented Jun 9, 2025

cc: @noahlwest

run-eval:
needs: detect-changed-tasks
if: needs.detect-changed-tasks.outputs.task_dirs != ''
runs-on: ubuntu-latest
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it possible here to run on multiple envs, like ubuntu and windows? Not sure that this is something we want now, I'm just curious if possible and what it would look like.

Copy link
Contributor Author

@prasad89 prasad89 Jun 10, 2025

Choose a reason for hiding this comment

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

Yes, it's possible to support multiple environments, such as Linux, Windows, and macOS.
However, my understanding is that the goal here is to run the modified task as a presubmit job.
This setup is also capable of running multiple jobs, depending on what has been modified.

@droot can confirm

Copy link
Collaborator

@noahlwest noahlwest left a comment

Choose a reason for hiding this comment

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

LGTM

@mikebz mikebz requested a review from Copilot June 14, 2025 02:45
Copy link

@Copilot 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 a GitHub Actions presubmit workflow to automatically detect changed K8s-bench tasks and run evaluations on them.

  • Introduce detect-changed-tasks job to list modified task directories.
  • Use a matrix in run-eval job to spin up a Kind cluster and execute per-task evaluations.
  • Append evaluation results to the GitHub Actions step summary.
Comments suppressed due to low confidence (2)

.github/workflows/presubmit-evals.yaml:47

  • The matrix construction wraps the entire comma-separated list in a single JSON string, resulting in one matrix entry instead of one per task. Consider splitting the output into individual JSON elements, for example:
matrix:
  task: ${{ fromJson('[' + needs.detect-changed-tasks.outputs.task_dirs.replaceAll(',', '\\",\\"') + ']') }}
task: ${{ fromJson('["' + needs.detect-changed-tasks.outputs.task_dirs + '"]') }}

.github/workflows/presubmit-evals.yaml:36

  • [nitpick] The job is named run-eval but processes multiple tasks in parallel; consider renaming it to run-evals for clarity and consistency.
run-eval:

@prasad89
Copy link
Contributor Author

Please let me know if there's anything else needed from my side to get this merged.
/cc @droot @noahlwest

@droot
Copy link
Member

droot commented Jun 20, 2025

Please let me know if there's anything else needed from my side to get this merged. /cc @droot @noahlwest

I don't think anything is needed from your side, we just need a way to test this out. We will look into it next week. Thank you.

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.

3 participants