Skip to content

update-builder and update-buildpack treat every URI as a docker image #358

@rwos

Description

@rwos

package.toml (same with builder.toml) may contain non-docker-registry dependencies, say:

[buildpack]
  uri = "./"

[[dependencies]]
  uri = "https://www.example.com/my-buildpack.cnb"

[[dependencies]]
  uri = "./a/local/directory"

[[dependencies]]
  uri = "some/local/file.cnb"

The docs say (https://buildpacks.io/docs/reference/config/package-config/):

uri: A URL or path to an archive, a packaged buildpack (saved as a .cnb file), or a directory. If path is relative, it must be relative to the package.toml.

and that all works brilliantly with pack - jam gets confused though.

Expected Behavior

for the above package.toml, jam update-buildpack exits successfully without doing anything

for a builder.toml with similar [[buildpacks]] entries, jam update-builder exists successfully without doing anything

Current Behavior

jam update-buildpack treats everything as a docker image reference and tries to get manifests ("failed to execute: failed to get buildpackage ID for ...")

jam update-builder treats everything as a docker image reference and tries to get tags ("failed to execute: failed to list tags: GET ... [map[Action:pull Class: Name:some/local/file.cnb Type:repository]]")

Possible Solution

parse uri as a URI and only contact a docker registry if it's a urn:cnb:registry:... or a docker:// URL

Steps to Reproduce

  • add a non-docker [[dependencies]] entry to a package.toml and run jam update-buildpack
  • add a non-docker [[buildpacks]] entry to a builder.toml and run jam update-builder

Motivations

we're trying to use jam on builders/buildpacks that don't necessarily have every part coming in via a docker registry

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions