Release-cli returns strange error: "status_code: 400 message: undefined method `[]' for nil:NilClass"

Hi, I have a small CI/CD components project we’re using internally, and recently the CI/CD pipeline started returning errors.

The pipeline is a simple one:

create-release:
  stage: deploy
  image: registry.gitlab.com/gitlab-org/release-cli:latest
  rules:
    - if: $CI_COMMIT_TAG =~ /^\d+[\.\d]+$/
  script: echo "Creating release $CI_COMMIT_TAG"
  release:
    tag_name: $CI_COMMIT_TAG
    description: "Release $CI_COMMIT_TAG of components repository $CI_PROJECT_PATH"

But now I’m getting this when tagging a release:

time="2023-11-23T14:18:01Z" level=info msg="Creating Release..." cli=release-cli command=create name= project-id=51821624 ref=d54ea1e373ee078e97c7c130eac23002d78048c8 server-url="https://gitlab.com" tag-message= tag-name=1.2 version=0.16.0
time="2023-11-23T14:18:02Z" level=fatal msg="run app" cli=release-cli error="failed to create release: API Error Response status_code: 400 message: undefined method `[]' for nil:NilClass" version=0.16.0

Anyone have a clue what has happened?

The same problem exist when trying to make a release manually in the web interface:

Which GitLab version is involved here – maybe an upgrade is needed for self-managed instances. If current, please report a bug. Thanks!

We’re using the cloud version, at https://gitlab.com. I reported a bug at Problem trying to create a new release, both through CI/CD script, and from web interface. (#432907) · Issues · GitLab.org / GitLab · GitLab. Thanks @dnsmichi

It seems it’s one particular project that has this problem, on other projects it works fine.