Skip to content

feat: prefer reading the build toml from current ref#1036

Merged
drbh merged 1 commit into
mainfrom
read-build-from-ref-v2
Jul 21, 2026
Merged

feat: prefer reading the build toml from current ref#1036
drbh merged 1 commit into
mainfrom
read-build-from-ref-v2

Conversation

@drbh

@drbh drbh commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Re-targets #982 at main. That PR was merged into kernel-bot-refactor, which had already been squash-merged and closed via #983 three weeks earlier — so the change never reached main.

The kernel bot checks out the default branch, so it read build.toml from main rather than from the PR. A kernel whose build.toml is added or whose backends change in the PR got the wrong workflow set — a new cuda-only kernel would still dispatch build-mac.yaml.

read_backends now takes an optional ref and reads via git show <ref>:<kernel>/build.toml. Empty ref keeps the working-tree read, so dry-run and local behavior are unchanged. pr-comment-build.yaml fetches the PR head at depth 1 so the blob is available.

Cherry-picked onto current main, which required reconciling with #1016: select_workflows there takes backends as a parameter so parse_kernel_arg can support inline overrides (relu[cuda,rocm]). Kept that design and threaded metadata_ref only through read_backends — applying the original version as-written would have bypassed the requested-backends filter. Tests rewritten from unittest to pytest to match main.

57 tests pass.

@github-actions github-actions Bot added the feature New functionality / capability label Jul 21, 2026
@drbh

drbh commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator Author

re merging as the original PR was approved and this branch just corrects where the changes are merged

@drbh
drbh merged commit 20a613c into main Jul 21, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New functionality / capability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant