Skip to content

Build the shipped container binary without test features (#2482 subissue 9) #2670

Closed

Description

@josecelano

Subissue 9 of sub-EPIC #2482 (Reorganize test support code shared between workspace packages), itself a sub-EPIC of EPIC #1669 (Overhaul: Packages). Required: rule A.5 of the ADR docs/adrs/20261021190318_share_workspace_test_support_through_testing_features.md says a shipped artifact is built by an invocation of its own, with explicit features, and a check fails if a testing feature reaches it.

Goal

Build the container image's shipped binaries (torrust-tracker and http_health_check) by cargo build invocations of their own with explicit features, and fail CI if a workspace testing feature is ever enabled in a shipped binary's dependency tree, before rows 3 to 7 add the first testing features.

Why

The release image's binaries are copied out of the test archive built by cargo nextest archive --tests --all-features --release. --tests and --all-features enable dev-dependency features and every feature, so every testing feature (and its optional dependencies, such as mockall) would ship once rows 3 to 7 land. Nothing is wrong today because no testing feature exists yet, which is why this row runs first.

Tasks

  • T1: re-verify the audit of shipped-artifact build commands; record a test count and build time baseline.
  • T2: add a TORRUST_TRACKER_BINARY override to the native-tracker tests (test first), so the container tests run the shipped binary.
  • T3: add a Rust dev-tool check over cargo tree -e normal,build that fails on a workspace testing feature in a shipped package's tree (test first, with a scratch-workspace red case).
  • T4: run the check as a job in testing.yaml.
  • T5: add the shipped cook and build stages to the Containerfile for the release and debug images.
  • T6: amend ADR 20260603 and update docs/containers.md.

The full specification is in the spec PR that follows.

Activity

  1. added 4 commits that reference this issue on Oct 27, 2026
  2. self-assigned this
    on Oct 27, 2026
  3. added 9 commits that reference this issue on Oct 27, 2026
  4. added 9 commits that reference this issue on Oct 28, 2026
  5. added a commit that references this issue on Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions