docs: document hack/ci/ci.sh lima workflow in test/README.md#29033
docs: document hack/ci/ci.sh lima workflow in test/README.md#29033mvanhorn wants to merge 1 commit into
Conversation
Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Honny1
left a comment
There was a problem hiding this comment.
I have some comments also please add fixes to the commit message.
PTAL @Luap99 @timcoding1988
| hack/ci/ci.sh sys remote rootless fedora-current | ||
| ``` | ||
|
|
||
| Some parts of the test suite cannot run inside the VM. |
There was a problem hiding this comment.
Which of them? I would list them.
There was a problem hiding this comment.
any CI job that is called / lima is run inside the VM and can thus be run here, anything else can not be run in the VM, i.e machine tests, windows/macos...
| `TEST` is the suite, one of `build`, `apiv2`, `bindings`, `bud`, `compose_v2`, | ||
| `docker_py`, `unit`, `upgrade`, `int`, `sys`, or `machine`. `MODE` is `local` | ||
| or `remote` and defaults to `local`. `PRIV` is `root` or `rootless` and defaults | ||
| to `rootless`. `DISTRO` must be one of `fedora-current`, `fedora-prior`, | ||
| `fedora-rawhide`, or `debian-sid`. |
There was a problem hiding this comment.
I don't like this style listing. I would use a proper list, for example:
TEST is the suite, one of:
buildbuilds somethingunitruns unit tests- ...
| go test -v -run TestMyFunction ./pkg/specgen/ | ||
| ``` | ||
|
|
||
| ## Reproducing CI failures locally with lima |
There was a problem hiding this comment.
I would move this to the end of the file, it is normally not needed by most users as running a test directly on the system is faster as it does not need to pull these huge qcow images.
| The invocation is positional and takes 2 to 4 arguments: | ||
|
|
||
| ```bash | ||
| hack/ci/ci.sh TEST DISTRO | ||
| hack/ci/ci.sh TEST PRIV DISTRO | ||
| hack/ci/ci.sh TEST MODE PRIV DISTRO | ||
| ``` | ||
|
|
||
| `TEST` is the suite, one of `build`, `apiv2`, `bindings`, `bud`, `compose_v2`, | ||
| `docker_py`, `unit`, `upgrade`, `int`, `sys`, or `machine`. `MODE` is `local` | ||
| or `remote` and defaults to `local`. `PRIV` is `root` or `rootless` and defaults | ||
| to `rootless`. `DISTRO` must be one of `fedora-current`, `fedora-prior`, | ||
| `fedora-rawhide`, or `debian-sid`. |
There was a problem hiding this comment.
While that is fine it misses the main point, the CI task names are design to follow this exact pattern so for a specific CI failure a user just has to copy paste the name, i.e. the part before / lima
| hack/ci/ci.sh sys remote rootless fedora-current | ||
| ``` | ||
|
|
||
| Some parts of the test suite cannot run inside the VM. |
There was a problem hiding this comment.
any CI job that is called / lima is run inside the VM and can thus be run here, anything else can not be run in the VM, i.e machine tests, windows/macos...
| ## Reproducing CI failures locally with lima | ||
|
|
||
| `hack/ci/ci.sh` runs a CI test suite inside the same lima VM image used by | ||
| upstream CI. The script requires `limactl`, starts a nested-virtualization VM |
There was a problem hiding this comment.
This should link to lima https://lima-vm.io/docs/installation/
Summary
Adds a short "Reproducing CI failures locally with lima" section to
test/README.mddocumentinghack/ci/ci.sh. It covers the lima prerequisite, the 2-to-4 positional argument forms (TEST [MODE] [PRIV] DISTRO), the accepted values for each argument, thesys remote rootless fedora-currentexample, and the caveat that some test parts cannot run inside the VM. I readhack/ci/ci.sh,hack/ci/lib.sh, andhack/ci/runner.shto make sure the documented argument order and accepted values match the actual scripts, including the detail that theupgradesuite reuses theMODEslot to pass the version to upgrade from.hack/ci/ci.shruns the suites in the same lima VM image that CI uses, so it is the supported way to reproduce a CI failure locally regardless of host distro. Until nowtest/README.mdonly documented themaketargets and never mentioned this script or the lima workflow.Fixes #28947
Checklist
Ensure you have completed the following checklist for your pull request to be reviewed:
commits. (
git commit -s). (If needed, usegit commit -s --amend). The author email must matchthe sign-off email address. See CONTRIBUTING.md
for more information.
Fixes: #00000in commit message (if applicable)make validatepr(format/lint checks)Noneif no user-facing changes)Does this PR introduce a user-facing change?
AI was used for assistance.