sigma icon indicating copy to clipboard operation
sigma copied to clipboard

阿里云流水线构建推送sigma后页面报错

Open zuonidelaowang opened this issue 10 months ago • 8 comments

报错日志 image

请求接口

/api/v1/namespaces/3/repositories/6/tags/?repository=private/panis-boot&limit=20&page=1&type=Image&type=ImageIndex&type=Chart&type=Sif

返回数据

{
    "total": 2,
    "items": [
        {
            "id": 9,
            "name": "flow-docker-build-cache",
            "pushed_at": "2025-01-11 12:50:50",
            "pull_times": 0,
            "artifact": {
                "id": 15,
                "digest": "sha256:25fed9c743a22c2e171c7bc488ae222843a96bddbf715e563a9dff4bc556aede",
                "media_type": "application/vnd.oci.image.index.v1+json",
                "raw": "{\"schemaVersion\":2,\"mediaType\":\"application/vnd.oci.image.index.v1+json\",\"manifests\":[{\"mediaType\":\"application/vnd.oci.image.layer.v1.tar+gzip\",\"digest\":\"sha256:00a74caad0ddb532dbbde37b4775f333a33ccdd256b0f50777d7ff83700dba70\",\"size\":93,\"annotations\":{\"buildkit/createdat\":\"2025-01-11T12:50:33.644423996Z\",\"containerd.io/uncompressed\":\"sha256:4ee5c407ff43db2d40e6f244f3e4743e9642e00793428ece0ba5a8dff18fac24\"}},{\"mediaType\":\"application/vnd.oci.image.layer.v1.tar+gzip\",\"digest\":\"sha256:0c1be8b52bd45200669923cbf9915ce7357bc19f935a8e2fd9b08b3f4650e1d3\",\"size\":53640529,\"annotations\":{\"buildkit/createdat\":\"2025-01-11T12:50:14.08547503Z\",\"containerd.io/uncompressed\":\"sha256:6682cf8be44d946897a9faded76066dba8209bb91a42ace6ece94d803d006e2f\"}},{\"mediaType\":\"application/vnd.oci.image.layer.v1.tar+gzip\",\"digest\":\"sha256:3ef2bc2675eef0c039c4cad1a2ba44e05bec8ac8f00079c44598ddb5fd8c909c\",\"size\":716,\"annotations\":{\"buildkit/createdat\":\"2025-01-11T12:50:14.096181793Z\",\"containerd.io/uncompressed\":\"sha256:89035d0a706a1f239b9826fc78268cda67a13c0d443a2e13f3a829ba0971d3e8\"}},{\"mediaType\":\"application/vnd.oci.image.layer.v1.tar+gzip\",\"digest\":\"sha256:63d23e9cf3a3a50104650ef5ced46aaea90097d347ea2de4ac6d383c714d6fe4\",\"size\":8537069,\"annotations\":{\"buildkit/createdat\":\"2025-01-11T12:50:14.071123593Z\",\"containerd.io/uncompressed\":\"sha256:b17fbf1eb129f30853e3dc2b07e0b992c4de84bd3513950f77585c7fb1c8af27\"}},{\"mediaType\":\"application/vnd.oci.image.layer.v1.tar+gzip\",\"digest\":\"sha256:b84a74cde5af5c5199bfc2ce2a8c8951a29a7716d17327e923f1a14c870a858b\",\"size\":3417332,\"annotations\":{\"buildkit/createdat\":\"2025-01-11T12:50:14.067054388Z\",\"containerd.io/uncompressed\":\"sha256:af9a70194aa4d12f967dbd4bcb1ce9c98ba42adb4ec05536080fd4560155e809\"}},{\"mediaType\":\"application/vnd.oci.image.layer.v1.tar+gzip\",\"digest\":\"sha256:c680deb827eb6fc4c324951efcc3f8de9c1983a4fd288b7ab73f52f82c653e56\",\"size\":85838453,\"annotations\":{\"buildkit/createdat\":\"2025-01-11T12:50:33.960490221Z\",\"containerd.io/uncompressed\":\"sha256:c83c96425f5480064770c775f40bd544e03866cb3bbf6590c67f2eacfcfd91b4\"}},{\"mediaType\":\"application/vnd.oci.image.layer.v1.tar+gzip\",\"digest\":\"sha256:f6ab8c173a5dd4111e946a85108baea6c50755a24b8245cf1bdf5bb4bff52f87\",\"size\":142,\"annotations\":{\"buildkit/createdat\":\"2025-01-11T12:50:14.091063355Z\",\"containerd.io/uncompressed\":\"sha256:e10dc3833a6766311c925d710021103c05addeae171dff23b0101aaad14ce256\"}},{\"mediaType\":\"application/vnd.oci.image.layer.v1.tar+gzip\",\"digest\":\"sha256:fb1096571fb3d004776b313f9e7ea39094434f65c311c4441755664c19857030\",\"size\":193,\"annotations\":{\"buildkit/createdat\":\"2025-01-11T12:50:30.998479156Z\",\"containerd.io/uncompressed\":\"sha256:2e3c00f1776fbf15dc3acc8a90485eba571c015ed50059cefae95ef641618352\"}},{\"mediaType\":\"application/vnd.buildkit.cacheconfig.v0\",\"digest\":\"sha256:6a4540e8068686c3625762496a8a7c60b3a67375ea6a5bfa005001e21e309501\",\"size\":1746}]}",
                "config_media_type": "",
                "config_raw": "",
                "type": "ImageIndex",
                "size": 2870,
                "blob_size": 151436273,
                "last_pull": "1970-01-01 00:00:00",
                "pushed_at": "2025-01-11 12:50:50",
                "pull_times": 0,
                "vulnerability": "",
                "sbom": "",
                "created_at": "2025-01-11 12:50:50",
                "updated_at": "2025-01-11 12:50:50"
            },
            "artifacts": null,
            "created_at": "2025-01-11 12:50:50",
            "updated_at": "2025-01-11 12:50:50"
        },
        {
            "id": 8,
            "name": "2025-01-11-20-49-16",
            "pushed_at": "2025-01-11 12:50:49",
            "pull_times": 0,
            "artifact": {
                "id": 14,
                "digest": "sha256:725a306fb437c75bbd09c3bbd2a5c2e510ad922ec549fd5a926b227e91d56f80",
                "media_type": "application/vnd.oci.image.index.v1+json",
                "raw": "{\n  \"schemaVersion\": 2,\n  \"mediaType\": \"application/vnd.oci.image.index.v1+json\",\n  \"manifests\": [\n    {\n      \"mediaType\": \"application/vnd.oci.image.manifest.v1+json\",\n      \"digest\": \"sha256:c224b3d964254e776050738b3201495288aaa37716116fda6dcbcb901efe9698\",\n      \"size\": 1810,\n      \"platform\": {\n        \"architecture\": \"amd64\",\n        \"os\": \"linux\"\n      }\n    },\n    {\n      \"mediaType\": \"application/vnd.oci.image.manifest.v1+json\",\n      \"digest\": \"sha256:2289f6df7e1b7be1cf8a0fec14441c14e8b035c54c85505383dced8b0d5daac5\",\n      \"size\": 566,\n      \"annotations\": {\n        \"vnd.docker.reference.digest\": \"sha256:c224b3d964254e776050738b3201495288aaa37716116fda6dcbcb901efe9698\",\n        \"vnd.docker.reference.type\": \"attestation-manifest\"\n      },\n      \"platform\": {\n        \"architecture\": \"unknown\",\n        \"os\": \"unknown\"\n      }\n    }\n  ]\n}",
                "config_media_type": "",
                "config_raw": "",
                "type": "ImageIndex",
                "size": 856,
                "blob_size": 2376,
                "last_pull": "1970-01-01 00:00:00",
                "pushed_at": "2025-01-11 12:50:49",
                "pull_times": 0,
                "vulnerability": "",
                "sbom": "",
                "created_at": "2025-01-11 12:50:49",
                "updated_at": "2025-01-11 12:50:49"
            },
            "artifacts": [
                {
                    "id": 12,
                    "digest": "sha256:c224b3d964254e776050738b3201495288aaa37716116fda6dcbcb901efe9698",
                    "media_type": "application/vnd.oci.image.manifest.v1+json",
                    "raw": "{\n  \"schemaVersion\": 2,\n  \"mediaType\": \"application/vnd.oci.image.manifest.v1+json\",\n  \"config\": {\n    \"mediaType\": \"application/vnd.oci.image.config.v1+json\",\n    \"digest\": \"sha256:b710630f37618287a9728ecf65929baec737fd1eee3b0011953778a4aa1034bd\",\n    \"size\": 5034\n  },\n  \"layers\": [\n    {\n      \"mediaType\": \"application/vnd.oci.image.layer.v1.tar+gzip\",\n      \"digest\": \"sha256:b84a74cde5af5c5199bfc2ce2a8c8951a29a7716d17327e923f1a14c870a858b\",\n      \"size\": 3417332\n    },\n    {\n      \"mediaType\": \"application/vnd.oci.image.layer.v1.tar+gzip\",\n      \"digest\": \"sha256:63d23e9cf3a3a50104650ef5ced46aaea90097d347ea2de4ac6d383c714d6fe4\",\n      \"size\": 8537069\n    },\n    {\n      \"mediaType\": \"application/vnd.oci.image.layer.v1.tar+gzip\",\n      \"digest\": \"sha256:0c1be8b52bd45200669923cbf9915ce7357bc19f935a8e2fd9b08b3f4650e1d3\",\n      \"size\": 53640529\n    },\n    {\n      \"mediaType\": \"application/vnd.oci.image.layer.v1.tar+gzip\",\n      \"digest\": \"sha256:f6ab8c173a5dd4111e946a85108baea6c50755a24b8245cf1bdf5bb4bff52f87\",\n      \"size\": 142\n    },\n    {\n      \"mediaType\": \"application/vnd.oci.image.layer.v1.tar+gzip\",\n      \"digest\": \"sha256:3ef2bc2675eef0c039c4cad1a2ba44e05bec8ac8f00079c44598ddb5fd8c909c\",\n      \"size\": 716\n    },\n    {\n      \"mediaType\": \"application/vnd.oci.image.layer.v1.tar+gzip\",\n      \"digest\": \"sha256:fb1096571fb3d004776b313f9e7ea39094434f65c311c4441755664c19857030\",\n      \"size\": 193\n    },\n    {\n      \"mediaType\": \"application/vnd.oci.image.layer.v1.tar+gzip\",\n      \"digest\": \"sha256:00a74caad0ddb532dbbde37b4775f333a33ccdd256b0f50777d7ff83700dba70\",\n      \"size\": 93\n    },\n    {\n      \"mediaType\": \"application/vnd.oci.image.layer.v1.tar+gzip\",\n      \"digest\": \"sha256:c680deb827eb6fc4c324951efcc3f8de9c1983a4fd288b7ab73f52f82c653e56\",\n      \"size\": 85838453\n    }\n  ]\n}",
                    "config_media_type": "application/vnd.oci.image.config.v1+json",
                    "config_raw": "{\"architecture\":\"amd64\",\"config\":{\"ExposedPorts\":{\"9999/tcp\":{}},\"Env\":[\"PATH=/opt/java/openjdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\",\"JAVA_HOME=/opt/java/openjdk\",\"LANG=en_US.UTF-8\",\"LANGUAGE=en_US:en\",\"LC_ALL=en_US.UTF-8\",\"JAVA_VERSION=jdk-21.0.3+9\",\"TZ=Asia/Shanghai\"],\"Entrypoint\":[\"java\",\"-jar\",\"app.jar\"],\"WorkingDir\":\"/app\",\"Labels\":{\"maintainer\":\"[email protected]\"}},\"created\":\"2025-01-11T12:50:33.960490221Z\",\"history\":[{\"created\":\"2024-06-20T20:17:04.243815501Z\",\"created_by\":\"/bin/sh -c #(nop) ADD file:fb066571462e703f86645131b43d211ff8531ffac77ea394456bfe569a6f17fe in / \"},{\"created\":\"2024-06-20T20:17:04.387043422Z\",\"created_by\":\"/bin/sh -c #(nop)  CMD [\\\"/bin/sh\\\"]\",\"empty_layer\":true},{\"created\":\"2024-04-23T20:51:38Z\",\"created_by\":\"ENV JAVA_HOME=/opt/java/openjdk\",\"comment\":\"buildkit.dockerfile.v0\",\"empty_layer\":true},{\"created\":\"2024-04-23T20:51:38Z\",\"created_by\":\"ENV PATH=/opt/java/openjdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\",\"comment\":\"buildkit.dockerfile.v0\",\"empty_layer\":true},{\"created\":\"2024-04-23T20:51:38Z\",\"created_by\":\"ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8\",\"comment\":\"buildkit.dockerfile.v0\",\"empty_layer\":true},{\"created\":\"2024-04-23T20:51:38Z\",\"created_by\":\"RUN /bin/sh -c set -eux;     apk add --no-cache         fontconfig ttf-dejavu         ca-certificates p11-kit-trust         musl-locales musl-locales-lang         tzdata     ;     rm -rf /var/cache/apk/* # buildkit\",\"comment\":\"buildkit.dockerfile.v0\"},{\"created\":\"2024-04-23T20:51:38Z\",\"created_by\":\"ENV JAVA_VERSION=jdk-21.0.3+9\",\"comment\":\"buildkit.dockerfile.v0\",\"empty_layer\":true},{\"created\":\"2024-04-23T20:51:38Z\",\"created_by\":\"RUN /bin/sh -c set -eux;     ARCH=\\\"$(apk --print-arch)\\\";     case \\\"${ARCH}\\\" in        aarch64|arm64)          ESUM='54e8618da373258654fe788d509f087d3612de9e080eb6831601069dbc8a4b2b';          BINARY_URL='https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.3%2B9/OpenJDK21U-jre_aarch64_alpine-linux_hotspot_21.0.3_9.tar.gz';          ;;        amd64|x86_64)          ESUM='b3e7170deab11a7089fe8e14f9f398424fd86db085f745dad212f6cfc4121df6';          BINARY_URL='https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.3%2B9/OpenJDK21U-jre_x64_alpine-linux_hotspot_21.0.3_9.tar.gz';          ;;        *)          echo \\\"Unsupported arch: ${ARCH}\\\";          exit 1;          ;;     esac;     wget -O /tmp/openjdk.tar.gz ${BINARY_URL};     echo \\\"${ESUM} */tmp/openjdk.tar.gz\\\" | sha256sum -c -;     mkdir -p \\\"$JAVA_HOME\\\";     tar --extract         --file /tmp/openjdk.tar.gz         --directory \\\"$JAVA_HOME\\\"         --strip-components 1         --no-same-owner     ;     rm -f /tmp/openjdk.tar.gz ${JAVA_HOME}/lib/src.zip; # buildkit\",\"comment\":\"buildkit.dockerfile.v0\"},{\"created\":\"2024-04-23T20:51:38Z\",\"created_by\":\"RUN /bin/sh -c set -eux;     echo \\\"Verifying install ...\\\";     echo \\\"java --version\\\"; java --version;     echo \\\"Complete.\\\" # buildkit\",\"comment\":\"buildkit.dockerfile.v0\"},{\"created\":\"2024-04-23T20:51:38Z\",\"created_by\":\"COPY entrypoint.sh /__cacert_entrypoint.sh # buildkit\",\"comment\":\"buildkit.dockerfile.v0\"},{\"created\":\"2024-04-23T20:51:38Z\",\"created_by\":\"ENTRYPOINT [\\\"/__cacert_entrypoint.sh\\\"]\",\"comment\":\"buildkit.dockerfile.v0\",\"empty_layer\":true},{\"created\":\"2025-01-11T12:50:30.998479156Z\",\"created_by\":\"LABEL [email protected]\",\"comment\":\"buildkit.dockerfile.v0\",\"empty_layer\":true},{\"created\":\"2025-01-11T12:50:30.998479156Z\",\"created_by\":\"ENV TZ=Asia/Shanghai\",\"comment\":\"buildkit.dockerfile.v0\",\"empty_layer\":true},{\"created\":\"2025-01-11T12:50:30.998479156Z\",\"created_by\":\"RUN /bin/sh -c ln -snf /usr/share/zoneinfo/\\\"$TZ\\\" /etc/localtime \\u0026\\u0026 echo \\\"$TZ\\\" \\u003e /etc/timezone # buildkit\",\"comment\":\"buildkit.dockerfile.v0\"},{\"created\":\"2025-01-11T12:50:33.644423996Z\",\"created_by\":\"WORKDIR /app\",\"comment\":\"buildkit.dockerfile.v0\"},{\"created\":\"2025-01-11T12:50:33.960490221Z\",\"created_by\":\"COPY target/panis-boot-admin-1.0.5-SNAPSHOT.jar app.jar # buildkit\",\"comment\":\"buildkit.dockerfile.v0\"},{\"created\":\"2025-01-11T12:50:33.960490221Z\",\"created_by\":\"EXPOSE map[9999/tcp:{}]\",\"comment\":\"buildkit.dockerfile.v0\",\"empty_layer\":true},{\"created\":\"2025-01-11T12:50:33.960490221Z\",\"created_by\":\"ENTRYPOINT [\\\"java\\\" \\\"-jar\\\" \\\"app.jar\\\"]\",\"comment\":\"buildkit.dockerfile.v0\",\"empty_layer\":true}],\"os\":\"linux\",\"rootfs\":{\"type\":\"layers\",\"diff_ids\":[\"sha256:af9a70194aa4d12f967dbd4bcb1ce9c98ba42adb4ec05536080fd4560155e809\",\"sha256:b17fbf1eb129f30853e3dc2b07e0b992c4de84bd3513950f77585c7fb1c8af27\",\"sha256:6682cf8be44d946897a9faded76066dba8209bb91a42ace6ece94d803d006e2f\",\"sha256:e10dc3833a6766311c925d710021103c05addeae171dff23b0101aaad14ce256\",\"sha256:89035d0a706a1f239b9826fc78268cda67a13c0d443a2e13f3a829ba0971d3e8\",\"sha256:2e3c00f1776fbf15dc3acc8a90485eba571c015ed50059cefae95ef641618352\",\"sha256:4ee5c407ff43db2d40e6f244f3e4743e9642e00793428ece0ba5a8dff18fac24\",\"sha256:c83c96425f5480064770c775f40bd544e03866cb3bbf6590c67f2eacfcfd91b4\"]}}",
                    "type": "Image",
                    "size": 1810,
                    "blob_size": 151439561,
                    "last_pull": "1970-01-01 00:00:00",
                    "pushed_at": "2025-01-11 12:50:47",
                    "pull_times": 0,
                    "vulnerability": "",
                    "sbom": "",
                    "created_at": "2025-01-11 12:50:47",
                    "updated_at": "2025-01-11 12:50:47"
                }
            ],
            "created_at": "2025-01-11 12:50:49",
            "updated_at": "2025-01-11 12:50:49"
        }
    ]
}

zuonidelaowang avatar Jan 11 '25 12:01 zuonidelaowang

我大概知道了,你推送的都是单架构的镜像么?第一个元素里少了 artifacts 字段,导致前端报错了。

tosone avatar Jan 13 '25 02:01 tosone

不对,"media_type": "application/vnd.oci.image.index.v1+json" 这种镜像是多架构镜像的 manifest list,但是没有对应的实体 artifact ,这就有点奇怪了。

tosone avatar Jan 13 '25 02:01 tosone

"name": "flow-docker-build-cache" 这个是一个什么镜像?

tosone avatar Jan 13 '25 02:01 tosone

"name": "flow-docker-build-cache" 这个是一个什么镜像?

阿里云流水线构建自动生成的,所以去不掉,这点比较麻烦

zuonidelaowang avatar Jan 15 '25 11:01 zuonidelaowang

2025-01-16 07:30:39 [INFO] ready to execute: docker buildx build --progress=plain -t sigma.xxxx.top:3000/private/panis-boot:2025-01-16-07-29-30 -f /root/workspace/__flow_work/__flow_builds/93bdf2a6-287d-462d-b03b-c437ea6dba26/workspace/panis-boot_MXE2/Dockerfile /root/workspace/__flow_work/__flow_builds/93bdf2a6-287d-462d-b03b-c437ea6dba26/workspace/panis-boot_MXE2/panis-boot-admin --push --cache-from sigma.xxxx.top:3000/private/panis-boot:flow-docker-build-cache --cache-to sigma.xxxxx.top:3000/private/panis-boot:flow-docker-build-cache

这个看着像是阿里云 流水线构建镜像的缓存。

zuonidelaowang avatar Jan 15 '25 23:01 zuonidelaowang

应该好了,我改了配置,之前上传的镜像,页面上看不到,是不是用API删除了?

zuonidelaowang avatar Jan 15 '25 23:01 zuonidelaowang

这里应该得兼容一下 docker buildx build --cache-to 的场景,之前没有测试过,讲道理这种 image.index 这种镜像如果没有子镜像就不再展示了。 应该也需要一个定时清理任务,把这种没有子镜像的 image.index 的镜像给删掉。

tosone avatar Jan 16 '25 03:01 tosone

这里应该得兼容一下 docker buildx build --cache-to 的场景,之前没有测试过,讲道理这种 image.index 这种镜像如果没有子镜像就不再展示了。 应该也需要一个定时清理任务,把这种没有子镜像的 image.index 的镜像给删掉。

是的,这个缓存,构建的时候,我们还是需要的。目前只是暂时去掉了构建缓存。

zuonidelaowang avatar Jan 16 '25 05:01 zuonidelaowang