gitlab runner 执行任务偶发问题

k8s helm 安装的 gitlabgitlab runner
runner 执行任务时有时候会失败失败日志如下:

ERROR: Error cleaning up secrets: resource name may not be empty job=xxxx project=xx runner=xxxxx
ERROR: Job failed (system failure): prepare environment: setting up build pod: error setting ownerReferences: Operation cannot be fulfilled on secrets "runner-xxxx-project-xx-concurrent-xxxx": the object has been modified; please apply your changes to the latest version and try again. Check https://docs.gitlab.com/runner/shells/index.html#shell-profile-loading for more information duration_s=0.235827503 job=xxxx project=xx runner=xxxxx

重试后成功

当前您使用的 gitlab-runner 是哪个版本?当前最方便的方式是升级 gitlab-runner 看下效果。

您好,
使用的 helm chart 版本是 gitlab:6.6.2
内部的gitlab-runner 镜像是 registry.gitlab.com/gitlab-org/gitlab-runner:alpine-v15.6.0

以下是完整日志

ERROR: Error cleaning up secrets: resource name may not be empty job=xxxxx project=xx runner=xxxxx
ERROR: Job failed (system failure): prepare environment: setting up build pod: error setting ownerReferences: Operation cannot be fulfilled on secrets "runner-xxxxx-project-xx-concurrent-0vmlbm": the object has been modified; please apply your changes to the latest version and try again. Check https://docs.gitlab.com/runner/shells/index.html#shell-profile-loading for more information duration_s=0.258591668 job=xxxxx project=xx runner=xxxxx
Appending trace to coordinator...ok code=202 job=xxxxx job-log=0-1036 job-status=running runner=xxxxx sent-log=0-1035 status=202 Accepted update-interval=1m0s
Updating job... bytesize=1036 checksum=crc32:03ae88bb job=xxxxx runner=xxxxx
Submitting job to coordinator...accepted, but not yet completed bytesize=1036 checksum=crc32:03ae88bb code=202 job=xxxxx job-status= runner=xxxxx update-interval=1s
Updating job... bytesize=1036 checksum=crc32:03ae88bb job=xxxxx runner=xxxxx
Submitting job to coordinator...ok bytesize=1036 checksum=crc32:03ae88bb code=200 job=xxxxx job-status= runner=xxxxx update-interval=0s
WARNING: Failed to process runner builds=0 error=prepare environment: setting up build pod: error setting ownerReferences: Operation cannot be fulfilled on secrets "runner-xxxxx-project-xx-concurrent-0vmlbm": the object has been modified; please apply your changes to the latest version and try again. Check https://docs.gitlab.com/runner/shells/index.html#shell-profile-loading for more information executor=kubernetes runner=xxxxx