Skip to content

docs: document hack/ci/ci.sh lima workflow in test/README.md#29033

Open
mvanhorn wants to merge 1 commit into
podman-container-tools:mainfrom
mvanhorn:docs/28947-document-hack-ci-lima
Open

docs: document hack/ci/ci.sh lima workflow in test/README.md#29033
mvanhorn wants to merge 1 commit into
podman-container-tools:mainfrom
mvanhorn:docs/28947-document-hack-ci-lima

Conversation

@mvanhorn

Copy link
Copy Markdown
Contributor

Summary

Adds a short "Reproducing CI failures locally with lima" section to test/README.md documenting hack/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, the sys remote rootless fedora-current example, and the caveat that some test parts cannot run inside the VM. I read hack/ci/ci.sh, hack/ci/lib.sh, and hack/ci/runner.sh to make sure the documented argument order and accepted values match the actual scripts, including the detail that the upgrade suite reuses the MODE slot to pass the version to upgrade from.

hack/ci/ci.sh runs 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 now test/README.md only documented the make targets 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:

  • Certify you wrote the patch or otherwise have the right to pass it on as an open-source patch by signing all
    commits. (git commit -s). (If needed, use git commit -s --amend). The author email must match
    the sign-off email address. See CONTRIBUTING.md
    for more information.
  • Referenced issues using Fixes: #00000 in commit message (if applicable)
  • Tests have been added/updated (or no tests are needed)
  • Documentation has been updated (or no documentation changes are needed)
  • All commits pass make validatepr (format/lint checks)
  • Release note entered in the section below (or None if no user-facing changes)

Does this PR introduce a user-facing change?

None

AI was used for assistance.

Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>

@Honny1 Honny1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I have some comments also please add fixes to the commit message.

PTAL @Luap99 @timcoding1988

Comment thread test/README.md
hack/ci/ci.sh sys remote rootless fedora-current
```

Some parts of the test suite cannot run inside the VM.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Which of them? I would list them.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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...

Comment thread test/README.md
Comment on lines +60 to +64
`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`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't like this style listing. I would use a proper list, for example:

TEST is the suite, one of:

  • build builds something
  • unit runs unit tests
  • ...

Comment thread test/README.md
go test -v -run TestMyFunction ./pkg/specgen/
```

## Reproducing CI failures locally with lima

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

Comment thread test/README.md
Comment on lines +52 to +64
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`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

Comment thread test/README.md
hack/ci/ci.sh sys remote rootless fedora-current
```

Some parts of the test suite cannot run inside the VM.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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...

Comment thread test/README.md
## 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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should link to lima https://lima-vm.io/docs/installation/

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.

Document hack/ci/ci.sh for running tests in a local VM via lima

3 participants