getporter/porter

Dependency solver should use relocation file

Opened this issue · 0 comments

When a bundle is relocated (using archive -> publish --from-archive), this creates an entry in the relocation mapping file for each default implementation of its dependencies. See #2669 for details. When Porter solves a dependency graph, we should take into account the relocation mapping file so that we use the relocated bundle, and not the original location stored in porter.yaml.

Notes

It would be really helpful to have a function on pkg/cnab.ExtendedBundle that applies a relocation mapping file to a bundle definition so that we can relocate when the bundle definition is loaded from the cache (after pulling), so that we don't need to change as much code. Just apply the relocations, and use the bundle as usual.

Dependencies

ℹ️ Read PEP003 - Advanced Dependencies for context about how dependencies should work, design details, and notes about desired behavior.