Skip to content

fix(packaging): improve Docker package build compatibility#136

Merged
Nauyix merged 2 commits into
mainfrom
fix/packaging-docker-agent-install
Jun 4, 2026
Merged

fix(packaging): improve Docker package build compatibility#136
Nauyix merged 2 commits into
mainfrom
fix/packaging-docker-agent-install

Conversation

@Nauyix

@Nauyix Nauyix commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

Pull Request Checklist

Please ensure your PR meets the following requirements:

  • Code follows the style guidelines
  • Tests pass locally (make test or make docker-test)
  • Code is formatted (make format)
  • Documentation updated if needed
  • Commit messages follow conventional commits
  • PR description is complete and clear

Summary

This PR improves Docker/deb package build compatibility across host shells, proxy setups, Ubuntu mirrors, and Docker package failure propagation. It also prevents shared objects from being installed with axon-agent example robot configs.


Motivation

  • The package scripts used Bash features and string expansion that are not compatible with older Bash environments such as macOS Bash 3.
  • Docker proxy fallback from docker info can inject unwanted proxy settings and should be controllable.
  • Ubuntu focal backports mirror handling needs to account for non-amd64 ports mirrors.
  • build-in-docker.sh all should return nonzero when a child distro/plugin package build fails.
  • Installed axon-agent examples should not include locally built .so artifacts.

Changes

Modified Files

  • Makefile - Runs package-all sequentially on Darwin and keeps parallel Docker builds on other hosts.
  • packaging/deb/scripts/build-all-in-docker-parallel.sh - Replaces associative arrays with indexed arrays for Bash 3 compatibility and adds optional Docker-info proxy fallback control.
  • packaging/deb/scripts/build-in-docker.sh - Adds optional Docker-info proxy fallback control and makes all propagate sub-build failures through the final exit status.
  • packaging/deb/scripts/build-all.sh - Avoids Bash capitalization expansion so the script works with older Bash.
  • docker/scripts/setup-apt-mirror.sh - Adds apt retry/timeout config and derives Ubuntu ports mirrors explicitly.
  • docker/Dockerfile.package-ros1 - Uses the correct focal-backports mirror for ports architectures.
  • docker/Dockerfile.package-standalone-focal - Uses the correct focal-backports mirror for ports architectures.
  • apps/axon_agent/CMakeLists.txt - Excludes *.so files from installed example robot configs.

Added Files

N/A

Deleted Files

N/A


Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update (documentation changes only)
  • Refactoring (code improvement without functional changes)
  • Performance improvement (code changes that improve performance)
  • Test changes (adding, modifying, or removing tests)

Impact Analysis

Breaking Changes

None.

Backward Compatibility

  • Existing package commands keep their current entry points.
  • AXON_PACKAGE_USE_DOCKER_INFO_PROXY defaults to auto, preserving Docker-info proxy fallback on non-Darwin hosts while allowing it to be disabled with 0/false.
  • Package builds now fail more visibly when any sub-build fails in build-in-docker.sh all.

Testing

Test Environment

  • ROS Distribution: ROS 2 Jazzy on host; Docker package validation used standalone focal build image
  • OS: Ubuntu 24.04.4 LTS, Linux 6.17.0-29-generic, x86_64
  • Build Type: existing local build directory plus Docker deb package build
  • Base: origin/main at e347f0aff25b315d4ba34c6ed5ed1d194b2a6a4b
  • Head tested/pushed: 2efdb2deaebb2c19d21732a8ee54f7c86280dab7

Test Cases

  • Unit tests pass locally
  • Integration tests pass locally
  • E2E tests pass (if applicable)
  • Manual testing completed

Manual Testing Steps

Focused validation run locally:

  1. git diff origin/main..fix/packaging-docker-agent-install --check - passed.
  2. bash -n packaging/deb/scripts/build-all-in-docker-parallel.sh packaging/deb/scripts/build-all.sh packaging/deb/scripts/build-in-docker.sh - passed.
  3. sh -n docker/scripts/setup-apt-mirror.sh - passed.
  4. cmake --build build --target axon_agent -j8 - passed.
  5. env -u HTTP_PROXY -u http_proxy -u HTTPS_PROXY -u https_proxy -u ALL_PROXY -u all_proxy AXON_PACKAGE_APT_MIRROR=default AXON_PACKAGE_USE_DOCKER_INFO_PROXY=0 packaging/deb/scripts/build-in-docker.sh standalone-focal - passed.
  6. Verified generated focal debs under packaging/deb/output/focal: axon-agent-focal, axon-all-focal, axon-config-focal, axon-dispatcher-focal, axon-panel-focal, axon-recorder-focal, axon-system-focal, and axon-transfer-focal.

Full ./scripts/ci-all-local.sh, WS RPC client E2E, format/reuse, Zenoh, and full ROS/E2E CI matrix were not run locally for this draft PR.

Test Coverage

  • New tests added
  • Existing tests updated
  • Coverage maintained or improved through shell syntax checks, target build, and Docker package build validation

Screenshots / Recordings

N/A


Performance Impact

  • Memory usage: No change.
  • CPU usage: No change at runtime.
  • Recording throughput: No change.
  • Lock contention: No change.
  • Build behavior: package-all runs sequentially on Darwin to avoid compatibility issues; non-Darwin hosts keep the parallel package build path.

Documentation


Related Issues

N/A


Additional Notes

This is intentionally opened as a draft because only focused local validation and a standalone focal package build have been run, not the full remote-equivalent CI gate required for ready-for-review.


Reviewers

N/A


Notes for Reviewers

  • Please review the Bash 3 compatibility changes in packaging/deb/scripts/build-all-in-docker-parallel.sh.
  • Please review Docker proxy fallback behavior and the AXON_PACKAGE_USE_DOCKER_INFO_PROXY mode handling.
  • Please review focal backports mirror derivation for non-amd64/ports architectures.
  • Please review the build-in-docker.sh all failure propagation behavior.

Checklist for Reviewers

  • Code changes are correct and well-implemented
  • Tests are adequate and pass
  • Documentation is updated and accurate
  • No unintended side effects
  • Performance impact is acceptable
  • Backward compatibility maintained (if applicable)

@Nauyix Nauyix marked this pull request as ready for review June 4, 2026 10:24

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@Nauyix Nauyix merged commit 0504964 into main Jun 4, 2026
19 of 24 checks passed
@Nauyix Nauyix deleted the fix/packaging-docker-agent-install branch June 4, 2026 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant