Raise artifacts bulk delete selection limit to 100
What does this MR do and why?
For Job artifacts management: Allow to delete more ... (#419588)
Raise artifacts bulk delete selection limit to 100
Also refactor to use backend as single source of truth: Instead of defining a separate frontend SELECTED_ARTIFACTS_MAX_COUNT, use the helper to forward the JOB_ARTIFACTS_COUNT_LIMIT from the backend and provide it to the Vue app as jobArtifactsCountLimit
Changelog: changed
Screenshots or screen recordings
Before | After |
---|---|
Screen_Recording_2023-11-29_at_12.40.17 | Screen_Recording_2023-11-29_at_12.37.08 |
How to set up and validate locally
git checkout raise-artifacts-bulk-delete-selection-limit
- find/make a project with a pipeline 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']
- run enough pipelines for that project that >100 artifact files are shown on the artifacts page (Project sidebar =>
Build
=>Artifacts
) - verify that you can only select 100 artifacts at a time for deletion
Alternatively, you can set JOB_ARTIFACTS_COUNT_LIMIT
in bulk_delete_by_project_service.rb
to a lower number, then follow the steps above but check that you can only select that number of artifacts for deletion.
to run tests
yarn install && yarn jest ci/artifacts/components
bundle install && bundle exec rspec spec/helpers/artifacts_helper_spec.rb
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.