Skip to content
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

Response code 409 (Conflict) #256

Open
EvanCarroll opened this issue Jul 21, 2021 · 5 comments
Open

Response code 409 (Conflict) #256

EvanCarroll opened this issue Jul 21, 2021 · 5 comments

Comments

@EvanCarroll
Copy link

EvanCarroll commented Jul 21, 2021

Using GitLab 14, on Semantic-Release 17.4.4. I'm still getting this Error 409. It would be great if nothing else to have more information than --debug provides,

Raw log (with context)

The bottom reads,

[4:36:12 PM] [semantic-release] [@semantic-release/gitlab] › ✖  An error occurred while making a request to the GitLab release API:
HTTPError: Response code 409 (Conflict)
    at EventEmitter.<anonymous> (/usr/local/lib/node_modules/@semantic-release/gitlab/node_modules/got/dist/source/as-promise.js:118:31)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
[4:36:12 PM] [semantic-release] › ✖  Failed step "publish" of plugin "@semantic-release/gitlab"
[4:36:12 PM] [semantic-release] › ✖  An error occurred while running semantic-release: HTTPError: Response code 409 (Conflict)
    at EventEmitter.<anonymous> (/usr/local/lib/node_modules/@semantic-release/gitlab/node_modules/got/dist/source/as-promise.js:118:31)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  pluginName: '@semantic-release/gitlab'
}
HTTPError: Response code 409 (Conflict)
    at EventEmitter.<anonymous> (/usr/local/lib/node_modules/@semantic-release/gitlab/node_modules/got/dist/source/as-promise.js:118:31)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  pluginName: '@semantic-release/gitlab'
}

This works locally when I run,

CI=1 GITLAB_TOKEN=token npx semantic-release --publish --ci

So I'm at a loss for why it wouldn't work on the smoker.


[5:16:28 PM] [semantic-release] › ℹ  Running semantic-release version 17.4.4
[5:16:29 PM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/gitlab"
[5:16:29 PM] [semantic-release] › ✔  Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer"
[5:16:29 PM] [semantic-release] › ✔  Loaded plugin "generateNotes" from "@semantic-release/release-notes-generator"
[5:16:29 PM] [semantic-release] › ✔  Loaded plugin "publish" from "@semantic-release/gitlab"
[5:16:31 PM] [semantic-release] › ✔  Run automated release from branch master on repository https://gitlab-ci-token:[secure]@gitlab.awe.eco.acme.net/ec-ng-ui/angular-validators.git
[5:16:31 PM] [semantic-release] › ✔  Allowed to push to the Git repository
[5:16:31 PM] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/gitlab"
[5:16:31 PM] [semantic-release] [@semantic-release/gitlab] › ℹ  Verify GitLab authentication (https://gitlab.awe.eco.acme.net/api/v4)
[5:16:32 PM] [semantic-release] › ✔  Completed step "verifyConditions" of plugin "@semantic-release/gitlab"
[5:16:32 PM] [semantic-release] › ℹ  No git tag version found on branch master
[5:16:32 PM] [semantic-release] › ℹ  No previous release found, retrieving all commits
[5:16:32 PM] [semantic-release] › ℹ  Found 480 commits since last release
[5:16:32 PM] [semantic-release] › ℹ  Start step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
...

I've uploaded more of the log for context.

@EvanCarroll EvanCarroll changed the title Error 409 Response code 409 (Conflict) Jul 21, 2021
@EvanCarroll
Copy link
Author

EvanCarroll commented Jul 22, 2021

I have hacked my source to provide a name, which was suggested here #66

I've confirmed this does NOT work for me.

I've also reverted that and confirmed it still doesn't work.

@kphunter
Copy link

In my case, the GitLab tags had been removed but the Releases still contained refs that conflicted. Removing these allowed semantic-release to run error-free.

@ericschmar
Copy link

ericschmar commented May 5, 2022

In my case, the GitLab tags had been removed but the Releases still contained refs that conflicted. Removing these allowed semantic-release to run error-free.

@kphunter Can you elaborate on what you had to do here? I'm not sure I understand. I are you saying you edited individual releases in GitLab to remove the refs in parenthesis that were pointing to commits?

@EvanCarroll
Copy link
Author

@ericschmar I believe what @kphunter is saying is he had to use the GitLab Releases API to delete the corresponding releases. But tagging him will help get an answer to that. ;)

@kphunter
Copy link

@ericschmar I believe what @kphunter is saying is he had to use the GitLab Releases API to delete the corresponding releases. But tagging him will help get an answer to that. ;)

That's correct - either remove the GitLab Release via the API or manually through the UI to get rid of the reference that is causing the conflict.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants