API: Releases fails with `null value in column "released_at" violates not-null constraint`
Summary
Trying to create a release using the API, but I get the following error message
{"message":"PG::NotNullViolation: ERROR: null value in column \"released_at\" violates not-null constraint\nDETAIL: Failing row contains (848680, v0.0.2, See below for changelog\n\n# Changelog\n\u003ca name=\"v0.0.2\"\u003e\u003c/a\u003e\n## [v..., 12311250, 2019-07-04 21:01:57.257612, 2019-07-04 21:01:57.257612, \u003cp data-sourcepos=\"1:1-1:23\" dir=\"auto\"\u003eSee below for changelog\u003c..., 1048576, 3618854, Version - v0.0.2 of \"gitlab-ce\", a45b8426887da687287d721ee7d89a1b237582d9, null).\n: INSERT INTO \"releases\" (\"tag\", \"description\", \"project_id\", \"created_at\", \"updated_at\", \"description_html\", \"cached_markdown_version\", \"author_id\", \"name\", \"sha\") VALUES ('v0.0.2', 'See below for changelog\n\n# Changelog\n\u003ca name=\"v0.0.2\"\u003e\u003c/a\u003e\n## [v0.0.2](/../compare/v0.0.1...v0.0.2) (2019-07-04)\n\n# Assets\n- [agent-linux-amd64](/uploads/ada58fa7a85d997eb60ab6401e8c45d2/agent-linux-amd64)\n', 12311250, '2019-07-04 21:01:57.257612', '2019-07-04 21:01:57.257612', '\u003cp data-sourcepos=\"1:1-1:23\" dir=\"auto\"\u003eSee below for changelog\u003c/p\u003e\n\u003ch1 data-sourcepos=\"3:1-3:11\" dir=\"auto\"\u003e\n\u003ca id=\"user-content-changelog\" class=\"anchor\" href=\"#changelog\" aria-hidden=\"true\"\u003e\u003c/a\u003eChangelog\u003c/h1\u003e\n\u003cp data-sourcepos=\"4:1-4:21\" dir=\"auto\"\u003e\u003ca name=\"v0.0.2\"\u003e\u003c/a\u003e\u003c/p\u003e\n\u003ch2 data-sourcepos=\"5:1-5:53\" dir=\"auto\"\u003e\n\u003ca id=\"user-content-v002-2019-07-04\" class=\"anchor\" href=\"#v002-2019-07-04\" aria-hidden=\"true\"\u003e\u003c/a\u003e\u003ca href=\"/../compare/v0.0.1...v0.0.2\"\u003ev0.0.2\u003c/a\u003e (2019-07-04)\u003c/h2\u003e\n\u003ch1 data-sourcepos=\"7:1-7:8\" dir=\"auto\"\u003e\n\u003ca id=\"user-content-assets\" class=\"anchor\" href=\"#assets\" aria-hidden=\"true\"\u003e\u003c/a\u003eAssets\u003c/h1\u003e\n\u003cul data-sourcepos=\"8:1-8:82\" dir=\"auto\"\u003e\n\u003cli data-sourcepos=\"8:1-8:82\"\u003e\u003ca href=\"/uploads/ada58fa7a85d997eb60ab6401e8c45d2/agent-linux-amd64\"\u003eagent-linux-amd64\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e', 1048576, 3618854, 'Version - v0.0.2 of \"gitlab-ce\"', 'a45b8426887da687287d721ee7d89a1b237582d9') RETURNING \"id\""}
I know it has worked flawless previously.
Steps to reproduce
Try to create a projects release using the API.
Example Project
Currently using my simple release container , which is has preciously worked on - no changes in code only a test file - https://gitlab.com/deviosec/containers/release/-/jobs/245795852
What is the current bug behavior?
Nothing, database constraints
What is the expected correct behavior?
A release.
Relevant logs and/or screenshots
(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's tough to read otherwise.)
Output of checks
(If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com)
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:env:info
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)