Draft: Artifacts browser: Chain one-directory directories
What does this MR do and why?
Artifacts browser: Chain one-directory directories
For the artifacts browse page, set recursive: true
to find all
descendant metadata entries (instead of just the first level), then
filter out directories that only contain another directory, and
modify the page to display the directory path instead of the name
Changelog: changed
Screenshots or screen recordings
Before | After |
---|---|
Screen_Recording_2023-10-11_at_12.47.58 | Screen_Recording_2023-10-11_at_13.51.07 |
artifacts directory structure from screenshots
- a
- b
- c
- ... (you get the idea)
- o
- p.txt
- o
- ... (you get the idea)
- c
- b
- another
- path
- to
- artifact2.txt
- to
- path
- even
- longer
- path
- to
- get
- to
- artifact3.txt
- to
- get
- and_to
- get
- to
- artifact4.txt
- to
- get
- to
- path
- longer
- path
- to
- many
- artifact5.txt
- artifact6.txt
- artifact7.txt
- artifact8.txt
- many
- to
- some
- path
- to
- artifact1.txt
- to
- path
How to set up and validate locally
- find/make a job that generates artifacts with lots of nesting in their file structure
here's an example job CI yml you can use (generates the artifacts shown in the screenshots section)
deeply_nested_artifacts:
stage: build
script:
- mkdir -p some/path/to
- mkdir -p another/path/to
- mkdir -p even/longer/path/to/get/to
- mkdir -p even/longer/path/and_to/get/to
- mkdir -p path/to/many
- mkdir -p a/b/c/d/e/f/g/h/i/j/k/l/m/n/o
- pwd
- cd some/path/to
- echo 'artifact' >> artifact1.txt
- cd ../../../
- pwd
- cd another/path/to
- echo 'artifact' >> artifact2.txt
- cd ../../../
- pwd
- cd even/longer/path/to/get/to
- echo 'artifact' >> artifact3.txt
- cd ../../../../../../
- pwd
- cd even/longer/path/and_to/get/to
- echo 'artifact' >> artifact4.txt
- cd ../../../../../../
- pwd
- cd path/to/many
- echo 'artifact' >> artifact5.txt
- echo 'artifact' >> artifact6.txt
- echo 'artifact' >> artifact7.txt
- echo 'artifact' >> artifact8.txt
- cd ../../../
- pwd
- cd a/b/c/d/e/f/g/h/i/j/k/l/m/n/o
- echo 'artifact' >> p.txt
artifacts:
paths:
- some/path/*
- another/path/*
- even/longer/path/*
- path/to/many/*
- a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p.txt
- run the job and make sure it finishes and uploads its artifacts
- navigate to the artifacts browse page for the job (on the job log page, click the
Browse
button in the sidebar) - check that all expected artifact files are shown
- check that any directories that only contain another directory have been collapsed/appended/chained onto each other
- check that no directories are duplicated
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.
Related to #365479
Edited by Miranda Fluharty