-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
An error occurred while running semantic-release: HTTPError: Response code 400 (Bad Request) #158
Comments
I'm getting the same error. I can't see much debug information to see what's happening. I note that the release does actually happen, although the assets look to be a very small subset of what I'd expect, so maybe it's related to that? |
I tried to get the error with a try catch with |
I use the github actions and meet the same problem. |
Just ran into this as well! Did a little investigation and found the root cause. This happens when {
"plugins": [
[
"@semantic-release/gitlab",
{
"assets": [
{ "path": "build/**/*", "label": "Compiled files" }
]
}
]
]
} GitLab's release links must have both a unique name and URL (within a given release). In the example above, An immediate workaround is to not use glob patterns in A more long-term solution would be to update this module to either:
I think #2 would be the more elegant solution. I'll look into this and open a PR if this seem doable. As a side note, I've put together an MR to add a note about release links' uniqueness constraints: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/48484/diffs. |
Actually, this module does already account for the validation issue I mentioned above - it just wasn't working quite right. I've submitted #179 which fixes this 👍 Now, if a |
Found another even simpler workaround: remove the |
Previously GitLab lables were just the basename for files uploaded as part of the release. This is problematic because GitLab doesn't allow conflicting labels -- a condition that could be caused by uploading a release with two files by the same name in different directories. This would generate a 409 Conflict error. This patches changes the labels for files uploaded as part of a release to the name relative to pkgRoot, or the package. A project may look like this pkg pkg \ foo \ baz pkg \ bar \ baz This used to creating two conflicting labels of 'baz'. Now you would have {"foo/baz", "bar/baz"} with no conflict. GitHub issues: semantic-release#263, semantic-release#158
Previously GitLab lables were just the basename for files uploaded as part of the release. This is problematic because GitLab doesn't allow conflicting labels -- a condition that could be caused by uploading a release with two files by the same name in different directories. This would generate a 409 Conflict error. This patches changes the labels for files uploaded as part of a release to the name relative to pkgRoot, or the package. A project may look like this pkg pkg \ foo \ baz pkg \ bar \ baz This used to creating two conflicting labels of 'baz'. Now you would have {"foo/baz", "bar/baz"} with no conflict. GitHub issues: semantic-release#263, semantic-release#158
Previously GitLab lables were just the basename for files uploaded as part of the release. This is problematic because GitLab doesn't allow conflicting labels -- a condition that could be caused by uploading a release with two files by the same name in different directories. This would generate a 409 Conflict error. This patches changes the labels for files uploaded as part of a release to the name relative to pkgRoot, or the package. A project may look like this pkg pkg \ foo \ baz pkg \ bar \ baz This used to creating two conflicting labels of 'baz'. Now you would have {"foo/baz", "bar/baz"} with no conflict. GitHub issues: semantic-release#263, semantic-release#158
Previously GitLab lables were just the basename for files uploaded as part of the release. This is problematic because GitLab doesn't allow conflicting labels -- a condition that could be caused by uploading a release with two files by the same name in different directories. This would generate a 409 Conflict error. This changes the labels for files uploaded as part of a release to the name relative to pkgRoot, or the package. A project may look like this pkg pkg \ foo \ baz pkg \ bar \ baz This would previously result in two conflicting labels of 'baz'. Now you would have {"foo/baz", "bar/baz"} with no conflict. GitHub issues: semantic-release#263, semantic-release#158
Previously GitLab lables were just the basename for files uploaded as part of the release. This is problematic because GitLab doesn't allow conflicting labels -- a condition that could be caused by uploading a release with two files by the same name in different directories. This would generate a 409 Conflict error. This changes the labels for files uploaded as part of a release to the name relative to pkgRoot, or the package. A project may look like this pkg pkg \ foo \ baz pkg \ bar \ baz This would previously result in two conflicting labels of 'baz'. Now you would have {"foo/baz", "bar/baz"} with no conflict. GitHub issues: semantic-release#265, semantic-release#158
Previously GitLab lables were just the basename for files uploaded as part of the release. This is problematic because GitLab doesn't allow conflicting labels -- a condition that could be caused by uploading a release with two files by the same name in different directories. This would generate a 409 Conflict error. This changes the labels for files uploaded as part of a release to the name relative to pkgRoot, or the package. A project may look like this pkg pkg \ foo \ baz pkg \ bar \ baz This would previously result in two conflicting labels of 'baz'. Now you would have {"foo/baz", "bar/baz"} with no conflict. GitHub issues: semantic-release#265, semantic-release#158
I'm struggling with the same issue. Could you take a look, please? My
I'm receiving the following error:
If I disable generation of declaration files release works good. Is it not possible to have directories in the
which means that even with source filename collisions the final filenames are unique? I really wish there was more info in the error message... |
i still have the same error with |
Seeing a
HTTPError: Response code 400 (Bad Request)
error in the GitLab pipeline job:I belive error is triggered from
publish.js
file insemantic-release/gitlab
:https://github.com/semantic-release/gitlab/blob/8477d146c47d9c515ae12bb98949fc535a84435d/lib/publish.js
Project's
.releaserc
looks like this:In GitLab, I've set:
GL_TOKEN
,GL_URL
, andGL_PREFIX
Any thoughts on what could be causing this? Thank you!
The text was updated successfully, but these errors were encountered: