Add CSV parser for bulk update overrides
What does this MR do and why?
Adds csv parsing to credit caps overrides bulk edit modal
Implementation status
Part of https://gitlab.com/gitlab-org/gitlab/-/work_items/630981
| Piece | Work item | MR | Status |
|---|---|---|---|
Feature flag credit_caps_bulk_update + scaffold button |
https://gitlab.com/gitlab-org/gitlab/-/work_items/630982 | !257651 (merged) | |
BE: username on BudgetCapUserOverrideInput |
https://gitlab.com/gitlab-org/gitlab/-/work_items/630983 | !258407 (merged) | |
| FE: bulk update overrides modal | https://gitlab.com/gitlab-org/gitlab/-/work_items/630982 | !257948 (merged) | |
| FE: CSV parser | https://gitlab.com/gitlab-org/gitlab/-/work_items/630984 | !258244 (merged) | |
| FE: integrate modal with BE | https://gitlab.com/gitlab-org/gitlab/-/work_items/630985 | !258465 (merged) | |
| FE: CSV parser improvements (follow-up) | https://gitlab.com/gitlab-org/gitlab/-/work_items/631895 | !259381 (merged) | |
| Documentation update | https://gitlab.com/gitlab-org/gitlab/-/work_items/632125 | !259654 (merged) | |
| Feature flag rollout | https://gitlab.com/gitlab-org/gitlab/-/work_items/631018 |
References
- Part of https://gitlab.com/gitlab-org/gitlab/-/work_items/630982
- Depends on: !257651 (merged)
Screenshots or screen recordings
| Before | After |
|---|---|
![]() |
![]() |
![]() |
How to set up and validate locally
-
In rails console enable the feature flag
Feature.enable(:credit_caps_bulk_update) -
Visit admin area
-
Then
GitLab Creditspage -
there click on
Credit caps, leading to http://localhost:3000/admin/gitlab_credits_dashboard/credit_caps -
Click on
Bulk updatebutton -
Fill csv input and submit
-
See either parsed values or input errors
A few cases for testing:
Happy path — mixed enabled/disabled, integer and fractional caps:
alice,100,true
bob,50.5,false
carol,0,trueQuoted username with a comma (tests Papa Parse quoting):
"smith,john",200,true
jane,75,falseInvalid — one bad line among good ones (should show parse error, no output):
alice,100,true
bob,notanumber,false
carol,50,trueInvalid — @ in username:
alice@example.com,100,true
bob,50,falseEdge — cap of zero and false enabled:
alice,0,false
bob,999.99,true
carol,0,true
dave,1,falseMR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.


