Skip to content

recc/actionbuilder.cpp: Add symlinks to merkle tree

Jürg Billeter requested to merge juerg/recc/symlinks into master

Before raising this MR, consider whether the following are required, and complete if so:

  • Unit tests
  • Metrics
  • Documentation update(s)

Description

recc currently simply follows symlinks of dependencies and constructs the merkle tree without any symlinks. This is sufficient in many cases but not in all. E.g., if a path component is a symlink to a directory but that symlink is part of the base image used by the action, the input tree fails to be staged due to the conflict between the symlink from the base image and the directory from the input tree.

This changes the logic to add the symlinks as symlinks, in addition to adding the symlink targets as files or directories. This only works if path rewriting is disabled but there should also be no conflicts with the base image if path rewriting is enabled.

Validation

A regression test has been added to the test suite.

Merge request reports