Skip to content

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
  2. The package history only reflects the creation
  3. The details page shows the branch that created the package, not the most recent commit
  4. The details page shows duplicate files for each deployment

Steps to reproduce

  1. Set up repository that deploys package using CICD
  2. Use a branch to deploy the same package with the same version
  3. 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

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 66a7f57b

Results of GitLab environment info

Results of GitLab application Check

Possible fixes

Implementation plan

  • 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.
  • Remove unique index from database to allow for has_many.
  • Update each package type to create the build info anytime a package is published, not just when it is initially created.
  • Add package_file_build_infos to relate individual files to builds.
  • Add build info to packages that don't yet have it?
    • Conan
    • PyPI
    • NuGet
    • Composer (if applicable)
    • GoProxy ( if applicable)
  • Update the front end to be able to accept multiple pipelines for a package
Edited by Tim Rizzi