Skip to content

Move page title and total artifacts size to vue/graphql

What does this MR do and why?

This page is behind the artifacts_management_page feature flag.

This MR adds the Total artifacts size back to the artifacts management page, but now the data comes from GraphQL.

We removed the artifacts size from the page when we removed the artifacts finder call that was getting the data in !102797 (merged), now we need to add it back in.

This also means that the total size will now be formatted in the same way as an individual artifact's size, so #377735 will no longer apply to this view (but it's probably still worth addressing at some point).

Screenshots or screen recordings

before after
Screen_Shot_2022-11-08_at_13.56.00 Screen_Shot_2022-11-08_at_13.57.55

How to set up and validate locally

  1. echo "Feature.enable(:artifacts_management_page)" | bundle exec rails console
  2. git checkout 381377-get-total-artifacts-size-from-graphql
  3. find/make/import a project with a pipeline with a job that generates artifacts
you can use this CI yaml to generate some sample artifacts:
# .gitlab-ci.yml

potato:
  stage: build
  script:
    - echo 'potato' >> potato.txt
  artifacts:
    expose_as: 'potato'
    paths: ['potato.txt']

tomato:
  stage: build
  script:
    - echo 'tomato' >> tomato.txt
  artifacts:
    expose_as: 'tomato'
    paths: ['tomato.txt']

pineapple:
  stage: build
  script:
    - echo 'pineapple' >> pineapple.txt
  artifacts:
    expose_as: 'pineapple'
    paths: ['pineapple.txt']

apple:
  stage: build
  script:
    - echo 'apple' >> apple.txt
  artifacts:
    expose_as: 'apple'
    paths: ['apple.txt']

toblerone:
  stage: build
  script:
    - echo 'toblerone' >> toblerone.txt
  artifacts:
    expose_as: 'toblerone'
    paths: ['toblerone.txt']
  1. run a pipeline for that project - for this you'll need to set up a local runner for GDK or enable runners in gitpod
  2. navigate to the project, and in the sidebar select CI/CD => Artifacts
  3. check that the total artifacts size is displayed at the top of the page

MR acceptance checklist

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

Related to #381377 (closed)

Edited by Miranda Fluharty

Merge request reports

Loading