Release creation fails if a component has empty `spec:` header
Summary
Unable to create a release of one of our projects.
Steps to reproduce
Have a component configuration starting with an empty spec:
section:
spec:
---
# rest of the config
This should cause the error.
Example Project
The project in question is project id 51821624 (https://gitlab.com/grouptalk/ci_components for us). When testing on other projects, it works fine.
What is the current bug behavior?
When trying to create a new release, either through the CI/CD script in the project, or manually through the web interface, we're getting
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
What is the expected correct behavior?
A new release is created because an empty spec:
is still considered valid and needs to be handled gracefully.
Relevant logs and/or screenshots
See above.
Output of checks
We're running off of gitlab.com
Edited by Fabio Pitino