Add import CSV endpoint for Requirements
What does this MR do?
Related to #284138 (closed)
As an additional iteration for !46361 (merged) and !46429 (merged), this MR adds a controller endpoint that allows the upload of a CSV file that will be imported as Requirements.
Following Uploads development documentation a new authorize
endpoint is included and tested using WorkhorseHelpers
.
As the logic for authorizing the new endpoint already existed in the WorkhorseImportExportUpload
concern, it's refactored in this MR to make it reusable for Import::GitlabGroupsController
, Import::GitlabProjectsController
and Projects::RequirementsManagement::RequirementsController
.
No UI changes are introduced in this MR but they will be implemented as part of the frontend work for #246857 (closed)
Tasks
-
Update Workhorse for the new route
-
Open a new issue in the Workhorse tracker gitlab-workhorse#330 (closed) -
Implement and get the MR merged for this issue above gitlab-workhorse!664 (merged) -
Ask the Maintainers of Workhorse to create a new release -
Bump the Workhorse version file !48628 (merged)
-
Order of tasks
Alessio Caiazza @nolith
commented:
Yes. If you are sure about the URL of your new endpoint I'll suggest you open a merge request on workhorse first, so that it can be merged and released. Then we can bump workhorse version with a simple MR like !46666 (merged) and have it merged before this one.
Feature Flag
These changes are behind the FF import_requirements_csv
.
Screenshots (strongly suggested)
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Related to #284138 (closed)