Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relocated bundles should also relocate the original tag #2670

Open
1 task
Tracked by #2671 ...
carolynvs opened this issue Mar 30, 2023 · 0 comments
Open
1 task
Tracked by #2671 ...

Relocated bundles should also relocate the original tag #2670

carolynvs opened this issue Mar 30, 2023 · 0 comments
Labels
pep003-advanced-dependencies Implementation of the Advanced Dependencies proposal placeholder Tracks work that has not yet be fully designed

Comments

@carolynvs
Copy link
Member

carolynvs commented Mar 30, 2023

When we publish a bundle from an archive as part of #2669, we should also copy over the tag instead of only preserving and relocating the digest. This is necessary because porter uses the tag to determine the bundle version

For example,

# porter.yaml
dependencies:
  requires:
    - name: mysql
      bundle:
        reference: example.com/mysql:v1.2.3
        version: 1.2.x

After that bundle is relocated the porter.yaml looks like this

# porter.yaml
dependencies:
  requires:
    - name: mysql
      bundle:
        reference: example.com/mysql@sha256:REPOSTIORY_DIGEST
        version: 1.2.x

In order to evaluate the version constraint on the dependency, and allow the user to always select the most recent dependency that satisfies the constraints, we need to also push the tags for that bundle. (out of scope: if they are replicating or copying bundles using other tools such as skopeo it's on them to preserve the tags)

As a test, we should be able to publish two versions of a bundle (one with mysql version v1.2.3 and another with mysql v1.2.4 as a dependency) with a dependency to registry 1, relocate it across an airgap to registry 2. Then you should be able to install the version of the bundle that relies on v1.2.3 of mysql, and when configured to select the highest matching version, it should locate the v1.2.4 version of mysql (even though the default bundle is set to 1.2.3). This demonstrates that when we relocate, porter can still use the tags to find the latest version of a dependency.

Questions

  • Where is the tag stored after we resolve the digest? We need a way to determine the tag so that we can retag it on the other side of an airgap

Dependencies

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pep003-advanced-dependencies Implementation of the Advanced Dependencies proposal placeholder Tracks work that has not yet be fully designed
Projects
None yet
Development

No branches or pull requests

1 participant