Skip to content

Adds loading for package details additional metadata

What does this MR do and why?

  • This MR deals with improving the additional metadata section of the package details page.

    • Adds loader for additional metadata in package details page
    • Creates new graphQL query to request for package metadata
    • Removes metadata related fragment (except for NuGet & Maven) from package details graphQL query
    • Only Composer, Maven, NuGet, PyPi, Conan package types render this section
    • Handles error states
  • Improves error handling aspects for Redesign package details history loading experi... (!87054 - merged)

Screenshots or screen recordings

Conan package loading (The screen recording container 3 loader lines, but I have reduced this number to 2 after considering similar package metadata from other package types.

additional_metadata_loader

npm package Screen_Shot_2022-05-31_at_2.01.43_pm

Composer package Screen_Shot_2022-05-31_at_2.15.44_pm

How to set up and validate locally

Additional metadata is visible only on few types of packages

  1. Create different types of packages, follow https://gitlab.com/gitlab-org/ci-cd/package-stage/package/-/wikis/Packages-Tips-&-Tricks#how-to-createa-package-with-metadatum
  2. Visit the package details page.
  3. Composer, Maven, NuGet, PyPi, Conan packages should have the additional metadata
  4. Other package types should not have additional metadata section. Verify that extra GraphQL API is not being made.
  5. Simulate graphql query failure & make sure alert message is being displayed.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Closes #365228 (closed)

Edited by Rahul Chanila

Merge request reports

Loading