Always display build info for packages in the UI
### Summary Deploying the same package artifact with the same version from different branches and/or commits is accepted but: 1. The package list shows the first deployment 1. The package history only reflects the creation 1. The details page shows the branch that created the package, not the most recent commit 1. The details page shows duplicate files for each deployment ### Steps to reproduce 1. Set up repository that deploys package using CICD 1. Use a branch to deploy the same package with the same version 1. Check if the package details were updated to reflect the second deployment ### Example Project https://gitlab.com/duncan_harris/maven-package-test/ [The test package](https://gitlab.com/duncan_harris/maven-package-test/-/packages/441223) ### What is the current *bug* behavior? Packages deployed multiple times with the same version do not reflect multiple deployments. ### What is the expected *correct* behavior? The package should show it's deployment history. ### Relevant logs and/or screenshots ### Output of checks This bug happens on Gitlab.com on GitLab Enterprise Edition 13.3.0-pre 66a7f57b7dd #### Results of GitLab environment info #### Results of GitLab application Check ### Possible fixes ### Implementation plan * [x] Change package association with `build_info` to `has_many`, but create a method `build_info` that will return the first of `build_infos` to maintain existing behavior. * [x] Remove unique index from database to allow for `has_many`. * [x] Update each package type to create the build info anytime a package is published, not just when it is initially created. * [x] Add `package_file_build_infos` to relate individual files to builds. * [x] Add build info to packages that don't yet have it? * [x] Conan * [x] PyPI * [x] NuGet * [x] Composer (if applicable) * [x] GoProxy ( if applicable) * [ ] Update the front end to be able to accept multiple pipelines for a package
issue