Fix broken CSV artifact rendering
What does this MR do and why?
This MR fixes broken CSV rendering on Artifact Browse page. Details are on #350581 (closed)
Screenshots or screen recordings
Here is example of error on Artifact with CSV file:
- local GDK URL is
http://localhost:3000/hpaluch/csv-artifact-bug/-/jobs/341/artifacts/file/test.csv
How to set up and validate locally
Tip: you can see full example project on my personal namespace:
- https://gitlab.com/hpaluch/csv-artifact-bug
- if you are using GDK you can use my branch: https://gitlab.com/hpaluch/gitlab/-/commits/350581-hpaluch-csv-viewer-seed to seed both project with CSV and artifact with CSV
-
Add any CSV file to your project, for example
test.csv
with content (see https://gitlab.com/hpaluch/csv-artifact-bug/-/blob/master/test.csv):HeaderA,HeaderB A,B
-
Create simple CI job that will just pack
test.csv
as artifact (see https://gitlab.com/hpaluch/csv-artifact-bug/-/blob/master/.gitlab-ci.yml)test_bug: script: - cat test.csv - 'wc -l test.csv' - 'echo "Go to Artifact -> Browse and select test.csv"' - 'echo "You may see err \"Failed to render CSV file for...\""' - 'echo "See https://gitlab.com/gitlab-org/gitlab/-/issues/350581"' artifacts: paths: - test.csv
-
Build project with CI
-
Go to artifacts page, click on Browse and click on
test.csv
, for example try https://gitlab.com/hpaluch/csv-artifact-bug/-/jobs/3822836320/artifacts/file/test.csv -
You will see error like one below (screenshot is from latest GDK):
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 #350581 (closed)