Skip to content

--parallel-builds can start an output before a local recipe its staging output needs is built #2976

Backlog

Description

@tomaionescu

Follow-up to #2492 / #2973, which fixes the build order for --recipe-dir but not the parallel queue.

With --parallel-builds, an output that inherits from a staging output can start before a local recipe that the staging output depends on has been built.

Reproduce

The recipes from #2492 (package_a has a staging output with host: [package_c], and package_c is another recipe in the same directory):

rattler-build build --recipe-dir . --parallel-builds 2

With the build from #2973 this still fails the way #2492 does:

Cannot solve the request because of: No candidates were found for package_c ==0.1.0.

Without --parallel-builds the same command builds package_c, then package_a and package_b.

Cause

The readiness check can_build in src/build_queue.rs goes through requirements.build and requirements.host of the output itself. The requirements of its staging caches (recipe.staging_caches) are not checked, so package_a counts as ready while package_c is still pending.

Expected

An output is ready only when the local outputs needed by its staging caches' build and host requirements are built too, the same rule the sequential order uses after #2973.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions