Validate file size on import artifact frontend
What does this MR do and why?
feature: Validate file size on import artifact frontend## MR acceptance checklist
Related to #464345 (closed)
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Creating model | Creating version | Importing artifact |
---|---|---|
How to set up and validate locally
Go to rails console using bin/rails c
Feature.enable(:model_registry)
project = Project.find(26)
model = Ml::CreateModelService.new(project, 'FooModel16').execute.payload
model_version = Ml::CreateModelVersionService.new(model,version: '3.1.4').execute
Upload some files
- Go to the project URL in your browser
- Open the "Deploy" and "Model registry" under it.
- Find the model
FooModel16
- Upload some files with subfolders
- Add some files larged than 10GB. One way is to modify the
model_registry_helper.rb
method to reduce it 100 bytes
def max_allowed_file_size(project)
100#project.actual_limits.ml_model_max_file_size
end
Edited by Alper Akgun