Fix empty line to contain two values
What does this MR do and why?
Part of https://gitlab.com/gitlab-org/customers-gitlab-com/-/issues/3818
Prior to this change, the empty line between the license information header and the user count table only contained a single value. This prevents to convert the license usage file csv into a hash by using to_h
and instead requires a manual mapping (see changes in https://gitlab.com/gitlab-org/customers-gitlab-com/-/merge_requests/4238).
Now, the empty line contains two empty strings to reflect a valid hash structure.
How to set up and validate locally
Without the fix:
- Go to
/admin/subscription
and download the license usage file via theExport license usage file
button in the top right corner. - Open a rails console and load the file via
CSV.read
and convert it to a hash:CSV.read(<path_to_license_file>).to_h
- See an error like
ArgumentError: wrong array length at 6 (expected 2, was 1)
.
With the fix:
- Do step 1 and 2 from above.
- No error should occur.
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.
Edited by Eugie Limpin