TT Lab
Blog

한국어 English 日本語 中文

Get started
Blog

Blog

Reading KubeVirt Source Code 8: Introduction to Contributing — Reading Reviews, Picking a First PR, and Running Tests

Status: Draft (2026-10-17), repository documentation + file inspection. Based on KubeVirt v1.9.0(commit 79d34c17)'s CONTRIBUTING.md, docs/reviewer-guide.md, docs/getting-started.md, OWNERS files, and PR template. Tests and builds were not executed.

Reading KubeVirt Source Code 8: Introduction to Contributing

Table of Contents

1. Intuition: Human Judgment and Bot Labels

A KubeVirt PR requires the judgment of two people to be merged. A reviewer says "the code is good" and an/lgtm), approver says "it is acceptable to bring into this repository" (/approve). Who the reviewers and approvers are is determined by the OWNERS files in the directories touched by the PR, and their statements are made via slash commands in PR comments. Translating those statements into labels, running test lanes, and merging when all conditions are met is handled by a collection of bots called prow . Because it is the same approach as Kubernetes, learning it in one place allows you to use it in the other.

2. Diagram

PR 하나가 main 에 들어가기까지 (prow) 코드 글꼴은 사람이 터미널이나 PR 댓글에 치는 명령 git commit -s DCO: Signed-off-by 줄이 없으면 막힌다 PR 열기 — 템플릿 · release-note 블록 첫 기여면 needs-ok-to-test 라벨 /ok-to-test 조직 멤버가 달면 시험 레인이 돈다 prow 레인: 단위 · 린트 · 기능 시험 실패하면 /retest 또는 /test <레인> 리뷰어 자동 배정 바뀐 폴더의 OWNERS → reviewers · approvers /lgtm reviewer 가 「코드가 좋다」 → lgtm 라벨 /approve OWNERS 의 approver 가 「들여도 된다」 → approved tide 가 병합 두 라벨 · 시험 통과 · /hold 없음 실측(v1.9.0): OWNERS 파일 141개 · 저장소 전체 approvers 24명 pkg/virt-controller/watch/vm 의 OWNERS 는 sig-compute 별칭을 쓴다
Diagram: Commands and labels until a single PR enters main

3. Re-examining the Map via OWNERS

In v1.9.0, there are 141 OWNERS files (measured). The root OWNERS sets the default reviewers and approvers for all files to the alias code-reviewers·approvers , while build files (such asBUILD.bazel, Makefile ) are handled separately by sig-buildsystem . Directory-level OWNERS narrow this down further. For example, pkg/virt-controller/watch/vm/OWNERS from Part 3 is like this.

reviewers:
  - sig-compute-reviewers
approvers:
  - sig-compute-approvers
labels:
  - area/controller
  - sig/compute

Source: kubevirt/kubevirt v1.9.0 pkg/virt-controller/watch/vm/OWNERS(excluding comment lines, Apache-2.0). PRs touching this directory receive the sig/compute·area/controller label from Prow and select reviewers from sig-compute. The actual names behind the aliases are in OWNERS_ALIASES . Counting the personnel yields this (v1.9.0, measured).

Alias Personnel Alias Personnel
approvers (total) 24 code-reviewers 11
sig-compute-approvers 8 sig-compute-reviewers 7
sig-storage-approvers 4 sig-storage-reviewers 6
sig-network-approvers 3 sig-network-reviewers 4
sig-buildsystem-approvers 3 sig-control-plane-reviewers 7

This table is essentially another face of the code map. Network code from Parts 4 and 5 (pkg/network, converter/network) is handled by sig-network, storage code from Part 6 (pkg/storage) by sig-storage, and most of the rest by sig-compute. If you want faster reviews, it is best to keep your PR within the folders of a single SIG. Touching multiple SIGs requires multiple approvers.

4. Commands and Labels

Command Who Effect
/ok-to-test Organization member Removes the needs-ok-to-test on a first-time contributor's PR to allow test lanes to run (CONTRIBUTING.md , line 67)
/test <레인> · /retest Member / Author Reruns a specific test lane / reruns failed test lanes
/lgtm reviewer lgtm label. Usually dropped when a new commit is pushed
/approve Approver of that directory approved label. Required for each OWNERS area touched
/hold · /unhold Anyone Temporarily blocks merging
/cc @이름 · /assign Anyone Summons a person

Merging is not done by a human clicking a button, but by tide . Once both labels and passing tests are in place and there are no blocking labels (do-not-merge/…, /hold), it enters the queue. Draft PRs do not run CI and are not assigned reviewers, so opening a PR as a draft is polite when you want to ask about direction.

Three things are mandatory in a PR:

  1. All commits must have a Signed-off-by: — DCO. Attached via git commit -s . Without it, the DCO check will block the PR.
  2. The release-note block in the PR template — A single line if it is a user-visible change, or NONEotherwise. Release notes are generated from this block.
  3. Tests — The baseline in the review guide is "Unit tests for new code, and at least one e2e test for new features and bug fixes" (reviewer-guide.md:103 vicinity).

Commit messages follow Kubernetes conventions (docs/commit-message-guidelines.md). The subject should be around 50 characters, imperative, with no period; the body should wrap at 72 characters, explain what and whyin the body, and put keywords like Fixes #123 in the PR description rather than the commit message. There are examples in the documentation of prefixing areas like net, vmi: . Also, the PR template checklist for v1.9.0 includes an item asking whether you complied with the KubeVirt AI Contribution Policy. If your PR was written with the help of tools, read that policy first.

5. What the Review Guide Tells You to Watch For

docs/reviewer-guide.md provides a brief backward explanation of why the designs seen in the previous seven parts are structured the way they are, letting you anticipate feedback during reviews.

6. Good Spots for a First Contribution

Based on the map in this series, starting with a spot touching only a single file and its testis recommended.

7. How to Run Tests and Required Tools

We did not run tests while writing this article, nor did we install the tools below. Only the necessary items are listed.

Unit tests. The most reliable path is the builder container designated by the repository.

make test                                    # Bazel 로 전체(빌더 컨테이너 안)
make go-test WHAT=./pkg/virt-controller/...  # Bazel 없이 go test (역시 컨테이너 안)

Required are Docker or Podman, rsync, and the builder image downloaded once at the start (quay.io/kubevirt/builder:<판>, hack/dockerized , line 19). To run go test directly outside a container, you need the Go version matching go.mod 's go 1.26.0 and the libvirt development headers used via cgo by the virt-launcher package (libvirt.org/go/libvirt). We did not verify this time how far package execution extends outside a container since that requires tracing imports (unverified). Containers are convenient to start with. Since unit tests also use Ginkgo, you pass -ginkgo.focus='문자열' when running a single test.

Functional tests. make cluster-up kubevirtci creates a cluster running nodes as VMs, make cluster-sync uploads your build, and make functest runs tests/ . To run only a subset, use FUNC_TEST_ARGS='--focus-file=…' (docs/getting-started.md , line 221). Required are a Linux machine supporting nested virtualization(difficult on a Mac), ample memory, and the node images downloaded by kubevirtci. Since Prow test lanes run these tests on your behalf for PRs, you can start by running only unit tests on your local machine and reading the test lane results for functional tests.

8. Limitations

Tidbit from Tito. The smaller your first PR, the better. One file, one test, one paragraph explaining why you changed it! And review comments aren't attacks—they're filling in the blanks on the map. Just say thanks and fix them one by one!

References

All accessed on 2026-10-17.

Sign in to like

Comments

No comments yet.

Sign in to leave a comment