Exception regex for maven duplicate deployments is not working as described in Package Registry

Hi, I am having issues with deploying maven artifacts to the Package Registry.

The default behaviour is to allow duplicates and when I disable it, it works as expected and prevents duplicates. And if I try to add an exception regex to allow snapshot duplicates it only works against the artifact names and does not work for the versions, which does not make sense.

Our snapshots have the same name, they just differ in versions. And at the Settings -> Packages & Registries, the explanation under the exception input is clearly indicates that it also checks against the version, but it does not.

I am not a ruby developer so most probably I am wrong, but I think there is an issue with this line (within app/models/namespace/package_setting.rb line 25)

duplicates_allowed || regex.match?(package.name)

does this line check for the version also? should not be there another check for the version also like:

duplicates_allowed || regex.match?(package.name) || regex.match?(package.version)

@msonmez Currently you can’t use this feature with the version. We have an open issue for this here: https://gitlab.com/gitlab-org/gitlab/-/issues/321772.Sorry for the inconvenience, we are hoping to address this in an upcoming milestone.

thanks for the response. the feature will be great to have, so thanks again for considering this update :+1: