Skip to content

Input packages for oci_image_build are not included as dependencies for the target #79

@jgranstrom

Description

@jgranstrom

oci_image_build targets do not include their input/packages targets as dependencies.

Example:

oci_image_build(
    name="image",
    args=[
        "-jar",
        "/src.app1/app1Jar.jar",
    ],
    base=[":arm64"],
    entrypoint="java",
    packages=[":app1Jar"],
    tag="latest",
)
❯ pants dependencies src/app1:image
src/app1:arm64

They are only visible in packages_raw. Only base images are part of dependencies.

❯ pants peek src/app1:image
[
  {
    "address": "src/app1:image",
    "target_type": "oci_image_build",
    "args": [
      "-jar",
      "/src.app1/app1Jar.jar"
    ],
    "base": [
      ":arm64"
    ],
    "commands": null,
    "dependencies": [
      "src/app1:arm64"
    ],
    "description": null,
    "entrypoint": "java",
    "env": null,
    "layers_raw": null,
    "output_path": null,
    "packages_raw": [
      ":app1Jar"
    ],
    "repository": null,
    "tag": "latest",
    "tags": null,
    "terminal": false
  }
]

Is this intended? It makes it difficult for anything targeting the oci_image to know when it needs to run.

Metadata

Metadata

Assignees

No one assigned

    Labels

    t: bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions