jupyterhub / chartpress

automate building and publishing images for helm charts
BSD 3-Clause "New" or "Revised" License
55 stars 24 forks source link

CI System broken #203

Closed consideRatio closed 1 year ago

consideRatio commented 1 year ago

Haven't investigated =/

consideRatio commented 1 year ago

I think there is a failure related to using docker-py the client that can be mitigated by pinning dependencies.

See https://github.com/docker/docker-py/issues/3113. I think they are struggling with maintaining that repo, so I suspect pinning a workaround is suitable.

consideRatio commented 1 year ago

The failure we observe is because docker buildx build --push is used by chartpress when --platform flags are passed. WHen buildx version 0.10.0 is used, it means --provenance=true by default, and that was released january 10.

In our test suite, we do this:

https://github.com/jupyterhub/chartpress/blob/f1ccf185bfbfb9a6a629a79dc33f26a5864887f5/tests/test_chartpress.py#L37-L46

But we error like this, because the manifest type is different than what we declare we accept:

{"errors":[{"code":"MANIFEST_UNKNOWN","message":"OCI index found, but accept header does not support OCI indexes"}]}
consideRatio commented 1 year ago

Response from oci index:

{
  "mediaType": "application/vnd.oci.image.index.v1+json",
  "schemaVersion": 2,
  "manifests": [
    {
      "mediaType": "application/vnd.oci.image.manifest.v1+json",
      "digest": "sha256:82c536ef63731e255c0613aa843c02e7b023d454c81d944f3a0666056945df5d",
      "size": 481,
      "platform": {
        "architecture": "amd64",
        "os": "linux"
      }
    },
    {
      "mediaType": "application/vnd.oci.image.manifest.v1+json",
      "digest": "sha256:3cbe8cbcbb837a6803166c788487f69bb3e42bda8879a4de4a95a72cc7611530",
      "size": 566,
      "annotations": {
        "vnd.docker.reference.digest": "sha256:82c536ef63731e255c0613aa843c02e7b023d454c81d944f3a0666056945df5d",
        "vnd.docker.reference.type": "attestation-manifest"
      },
      "platform": {
        "architecture": "unknown",
        "os": "unknown"
      }
    }
  ]
}

Previous typical response.

{
  "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
  "schemaVersion": 2,
  "config": {
    "mediaType": "application/vnd.docker.container.image.v1+json",
    "digest": "sha256:784b2ba8df3d1587941185e73182429e31f835b9f0a9d401d9fd2687843f6b4e",
    "size": 1514
  },
  "layers": [
    {
      "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
      "digest": "sha256:8a49fdb3b6a5ff2bd8ec6a86c05b2922a0f7454579ecc07637e94dfd1d0639b6",
      "size": 3397490
    }
  ]
}