vmware-labs / webassembly-language-runtimes

Wasm Language Runtimes provides popular language runtimes (Ruby, Python, …) precompiled to WebAssembly that are tested for compatibility and kept up to date when new versions of upstream languages are released
Apache License 2.0
327 stars 27 forks source link

config layer for python references wasmedge when it shouldn't #97

Closed codefromthecrypt closed 1 year ago

codefromthecrypt commented 1 year ago

Describe the bug

ghcr.io/vmware-labs/python-wasm:3.11.1 includes 2 zip layers and a config layer. The description fields reference WasmEdge, and I think they shouldn't as it isn't dependent on that anymore.

Reproduction steps

look at the config layer json. e.g.

{
  "architecture": "wasi",
  "config": {
    "Env": [
      "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
    ],
    "Entrypoint": [
      "python.wasm"
    ],
    "WorkingDir": "/",
    "Labels": {
      "app.kubernetes.io/name": "python-wasm",
      "description": "CPython built for WASI+Wasmedge, by WasmLabs @ VMware OCTO",
      "org.opencontainers.artifact.description": "CPython built for WASI+Wasmedge, by WasmLabs @ VMware OCTO",
      "org.opencontainers.image.description": "CPython built for WASI+Wasmedge, by WasmLabs @ VMware OCTO",
      "org.opencontainers.image.source": "https://github.com/vmware-labs/webassembly-language-runtimes",
      "org.opencontainers.image.title": "python-wasm",
      "org.opencontainers.image.vendor": "wasmlabs.dev"
    },
    "OnBuild": null
  },
  "created": "2023-02-17T12:03:38.667420792Z",
  "history": [
    {
      "created": "2023-02-17T12:03:38.521164149Z",
      "created_by": "ARG NAME",
      "comment": "buildkit.dockerfile.v0",
      "empty_layer": true
    },
    {
      "created": "2023-02-17T12:03:38.521164149Z",
      "created_by": "ARG SUMMARY",
      "comment": "buildkit.dockerfile.v0",
      "empty_layer": true
    },
    {
      "created": "2023-02-17T12:03:38.521164149Z",
      "created_by": "LABEL description=CPython built for WASI+Wasmedge, by WasmLabs @ VMware OCTO app.kubernetes.io/name=python-wasm org.opencontainers.image.title=python-wasm org.opencontainers.image.vendor=wasmlabs.dev org.opencontainers.image.description=CPython built for WASI+Wasmedge, by WasmLabs @ VMware OCTO org.opencontainers.image.source=https://github.com/vmware-labs/webassembly-language-runtimes org.opencontainers.artifact.description=CPython built for WASI+Wasmedge, by WasmLabs @ VMware OCTO",
      "comment": "buildkit.dockerfile.v0",
      "empty_layer": true
    },
    {
      "created": "2023-02-17T12:03:38.521164149Z",
      "created_by": "ARG ARTIFACTS_BASE_DIR",
      "comment": "buildkit.dockerfile.v0",
      "empty_layer": true
    },
    {
      "created": "2023-02-17T12:03:38.521164149Z",
      "created_by": "ARG PYTHON_BINARY",
      "comment": "buildkit.dockerfile.v0",
      "empty_layer": true
    },
    {
      "created": "2023-02-17T12:03:38.521164149Z",
      "created_by": "COPY build-output/python/v3.11.1/bin/python.wasm /python.wasm # buildkit",
      "comment": "buildkit.dockerfile.v0"
    },
    {
      "created": "2023-02-17T12:03:38.667420792Z",
      "created_by": "COPY build-output/python/v3.11.1/usr/ /usr # buildkit",
      "comment": "buildkit.dockerfile.v0"
    },
    {
      "created": "2023-02-17T12:03:38.667420792Z",
      "created_by": "ENTRYPOINT [\"python.wasm\"]",
      "comment": "buildkit.dockerfile.v0",
      "empty_layer": true
    }
  ],
  "moby.buildkit.buildinfo.v1": "eyJmcm9udGVuZCI6ImRvY2tlcmZpbGUudjAifQ==",
  "os": "wasm32",
  "rootfs": {
    "type": "layers",
    "diff_ids": [
      "sha256:5064594c5704a870d91ace9717221e52a6ff632f9422cea328c6ca856bd8da5e",
      "sha256:a78de7ee8d32d04fb03d9ffba2aa611b0c77b8df92775e08ed586c307b5d8148"
    ]
  }
}

Expected behavior

None of the fields should say wasmedge in them, as it is confusing because it isn't dependent on that.

Additional context

No response

assambar commented 1 year ago

Thanks @codefromthecrypt. Another good catch!

assambar commented 1 year ago

This was fixed and the 3.11.1 image was republished. https://github.com/vmware-labs/webassembly-language-runtimes/pkgs/container/python-wasm/88255340?tag=3.11.1