Skip to content

400 Bad request when deploying a maven package

Summary

400 Bad request when deploying a maven package

Steps to reproduce

  1. Deploy a maven project to the maven package registry
  2. Attempt to deploy the same package in the package registry of another project

What is the current bug behavior?

400 Bad request

What is the expected correct behavior?

Deploy successful

Examples

Reproduced on GitLab.com: https://gitlab.com/maven-test/minimal-maven-2/-/jobs/262547440

Customer tickets (internal):

Output of checks

This bug happens on GitLab.com, GitLab Enterprise Edition 12.2.0-pre 1802ffd1

Also affecting self-managed customers on 12.1

Possible fixes

We can disable the package_already_taken? validation in https://gitlab.com/gitlab-org/gitlab-ee/blob/22e5853ee9a4599b9ff814a12a4af9a539a7822d/ee/app/models/packages/package.rb#L16 for Maven packages.

Possible Workaround

changing the package (artifact) ID should run without error

Edited by Cynthia "Arty" Ng