Skip to content

Header checkbox should select visible artifacts

Miranda Fluharty requested to merge 396792-artifacts-select-all-checkbox into master

What does this MR do and why?

For #396792 (closed)

🎏 The bulk delete feature is behind the ci_job_artifact_bulk_destroy feature flag

This MR makes clicking the checkbox in the table header on the artifacts page toggle selection of all of the currently visible artifacts (just the current page) so that they can be easily chosen for bulk delete.

Screenshots or screen recordings

before with this MR
Screen_Recording_2023-05-03_at_12.06.56 Screen_Recording_2023-05-03_at_11.56.41
checkbox only clears selection, is disabled when nothing is selected checkbox selects/de-selects a page at a time

How to set up and validate locally

  1. checkout branch and enable the feature flag
git checkout 396792-artifacts-select-all-checkbox
echo "Feature.enable(:ci_job_artifact_bulk_destroy)" | bundle exec rails console
  1. find/create a project whose pipelines have jobs that generate artifacts
  2. run enough pipelines/jobs to generate >20 artifacts (or change JOBS_PER_PAGE to be a lower number) so that you can test how pagination works with this
  3. navigate to the project and choose CI/CD => Artifacts in the sidebar
  4. with no artifacts selected, click the checkbox in the table header - it should select all of the artifacts on the current page
  5. with some artifacts selected, click the checkbox in the table header - it should de-select any selected artifacts on the current page
  6. click through pages of artifacts and click the checkbox in the table header - any action should only affect the current page of artifacts

note: there is a limit of 50 artifacts that can be selected at a time, this is how many the bulk delete mutation can currently handle

MR acceptance checklist

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

Edited by Miranda Fluharty

Merge request reports

Loading