Corpus Management validations
What does this MR do and why?
Adds form validations to corpus uploads on the corpus management page, and also updates the apollo caching logic to fix #349844 (closed)
Describe in detail what your merge request does and why.
Screenshots or screen recordings
These are strongly recommended to assist reviewers and reduce the time to merge your change.
How to set up and validate locally
- From the gitlab repo open a rails console and enable the
:corpus_management
AND:corpus_management_ui
feature flag
bundle exec rails c
then
[4] pry(main)> Feature.enable(:corpus_management)
[4] pry(main)> Feature.enable(:corpus_management_ui)
-
Generate a large file above 5 GB by running the following in the command line
mkfile 6G bigfile.zip
Navigate to:
http://172.16.123.1:3000/<group>/<project>/-/security/configuration/corpus_management
File too large
-
Click on New Corpus
. -
Attempt to upload the large file -
VERIFY you see file too large warning
Invalid corpus name
-
Click on New Corpus
. -
Attempt to upload a corpus with forbidden characters. Try something like foo$bar
-
VERIFY you see validation message with proper formatting
Blank corpus name
-
Click on New Corpus
. -
Attach file -
VERIFY upload file
is disabled -
Add a corpus name -
VERIFY upload file
is enabled
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 #342583 (closed)
Edited by -