Skip to content

Implement corpus upload - Commit Corpus

- requested to merge 342580-corpus-upload-commit-corpus into master

What does this MR do and why?

All this work is behind a feature flag and won't be enabled until we complete the remaining work and add unit tests. Allows us to commit the corpus.

The scope of this MR is the Part 2 of the 2 step corpus upload UI. First a user must attach and upload a file in the modal, then they must "commit" the corpus by clicking "add" from the modal.

Notes for Reviewers

Development is a bit ahead of testing because a lot of the development is in flux and very incremental. I'm hoping to land this MR and the next one, then pause to add a good amount of unit tests before continuing. This is so we can test the happy path workflow.

Frontend Implementation Plan (Remaining Issues)

Issue Weight Milestone Description
#342433 (closed) frontend-weight3 %14.5 Upload Corpus (Merged)
#342580 (closed) frontend-weight2 %14.5 Commit Corpus (THIS MR)
#345088 (closed) frontend-weight3 %14.5 Swap out mock table data for real query
#345985 frontend-weight3 %14.6 Test Resolvers
#345090 (closed) frontend-weight3 %14.6 Corpus table pagination
#342581 (closed) frontend-weight3 %14.6 Corpus Modal Delete
#342583 (closed) frontend-weight2 %14.6 Modal validation errors
#345089 (closed) frontend-weight3 %14.6 Inline delete
#346055 (closed) frontend-weight1 %14.6. Address UX Feedback adjustments

Describe in detail what your merge request does and why.

Screenshots or screen recordings

Screen_Shot_2021-11-21_at_8.48.54_PM

These are strongly recommended to assist reviewers and reduce the time to merge your change.

How to set up and validate locally

Validation errors will be handled in #342583

  • From the gitlab repo open a rails console and enable the :corpus_management feature flag
bundle exec rails c

then

[4] pry(main)> Feature.enable(:corpus_management)

Navigate to:

http://172.16.123.1:3000/<group>/<project>/-/security/configuration/corpus_management

Click on New Corpus, upload any zip file of a large size. 500 MB > (or in chrome debugger, throttle network traffic so we can see upload progress)

Click "Add", should see the table update with a dummy row.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #342580 (closed)

Edited by -

Merge request reports

Loading