Skip to content

feat: dependency version pinning for reproducible builds #6862

@youtalk

Description

@youtalk

Checklist

  • I've read the contribution guidelines.
  • I've searched other issues and no duplicate issues were found.
  • I've agreed with the maintainers that I can plan this task.

Description

Introduce lock file-based dependency version pinning for both native and Docker setups to ensure reproducible builds. Currently, ROS APT packages, system APT packages, Python packages, Docker base images, and ROS 2 APT source versions are resolved dynamically at build time, making builds non-reproducible across different dates.

The approach adds an opt-in --locked flag to setup-dev-env.sh (and USE_LOCKFILE=true build arg for Docker) that loads pre-generated lock files containing exact package versions. Default behavior remains unchanged.

Design proposal: https://github.com/orgs/autowarefoundation/discussions/6861

Purpose

  • Enable reproducible release builds: same commit always produces the same build environment
  • Support reliable release management and regression debugging
  • Maintain developer flexibility (latest packages by default, locked versions opt-in)

Possible approaches

See the design proposal for the full comparison. The selected approach is lock file method for both native (Ansible lock files) and Docker (lock files + base image digest pinning), chosen for its low implementation/operational cost and high compatibility with existing infrastructure.

Definition of done

  • Phase 1: Add --locked option to setup-dev-env.sh, create lock file generation/validation scripts, and generate initial template lock files
  • Phase 2: Modify all Ansible roles to conditionally install locked versions when use_locked_versions is set, with snapshots.ros.org support for ROS packages
  • Phase 3: Add USE_LOCKFILE support to Dockerfiles, pin base image digests, and add --locked flag to docker/build.sh
  • Phase 4: Create lock file generation workflow (monthly + manual) and validation workflow (on PR)

Metadata

Metadata

Assignees

Labels

type:buildTooling and infrastructure around building the Autoware.type:installationIssues or improvements related to the installation process of the software.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions