Skip to content

Define the isolation guarantee for installed-wheel CI #3016

Description

@rwgk

Installed-wheel CI installs wheels, then runs tests from a checkout that may still contain package sources. There is an obvious trap: an import check run from the repository root can find the installed wheel, while a later test run from inside a package directory may import checkout code. A green job could then tell us less about the wheel than we think. We have not identified a false pass; this is a preventive question.

#2892 explored skipping source-dependent tests when package sources are removed.

#2949 explored python -I -m pytest with an import-origin check inside each pytest process. -I keeps the working directory and PYTHONPATH off Python’s initial import path, addressing the most direct way checkout code can shadow a wheel while leaving source-tree tests available. However, this still falls short of isolation:

  • pytest can alter sys.path after Python starts,
  • tests can load checkout files directly, and
  • child processes do not automatically inherit -I.

What should an installed-wheel job guarantee, and are import checks sufficient, or should package sources be made unavailable during those tests?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CI/CDCI/CD infrastructure

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions