Skip to content

Remote execution of integration tests #8113

Closed
@Eric-Arellano

Description

@Eric-Arellano

#7649 and #8051 added support for remote execution of unit tests in CI. Now, we want to have remote execution of integration tests, which is where we spend the bulk of our CI time.

This will be harder because integration tests (naively) depend on the entire pants.pex and not just individual files like we have for unit tests.

One of the main decisions is whether we have every integration tests depend on the entire Pants codebase, or only the actual parts possible. Likely in the beginning, we will take the naive approach of depending on the entire pants.pex as a first prototype. The downside is that anytime anyone makes a change to any file, the cache will be invalidated for all integration tests. As a followup, we could de-monotholize Pants to work around this.

Possible steps to land this:

  • Run all tests with --chroot, which will catch several issues with implicit dependencies on being in the actual buildroot and better reflects how V2 works. migrate python tests in the pants repo to work with --chroot, --no-fast #7281 and Run contrib unit tests with --chroot #8084.
  • Figure out how to get integration tests to depend on having pants.pex available to them. This may be tricky because that is a generated file. Some prior art is how we depend on native_engine.so, which is also a generated file:
    resources(
    name='native_engine_shared_library',
    sources=['native_engine.so']
    • How should we ensure that this file is not out of date? Especially when testing locally, this is a likely issue, that the integration test is using an outdated version of pants.pex. This may also make local integration testing much happier if it's going to require regenerating the PEX every time!
  • Get integration tests working for tests/python/pants_test/help:help_integration, both locally with V2 and with remoting.

We will almost certainly use a whitelist approach to remoting tests in CI. Even if we can only remote 1-5 integration tests in CI at first, we should land that because it establishes the infrastructure needed to port more tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions