scaleoutsystems / stackn

A minimalistic and pluggable machine learning platform for Kubernetes.
http://www.scaleoutsystems.com
Apache License 2.0
35 stars 13 forks source link

STACKn CLI fails with projects with trailing whitespace in project name #237

Closed ahellander closed 3 years ago

ahellander commented 3 years ago

Severity

Describe the bug If you create a project with a trailing whitespace in the Project name, the CLI does not work as expected.

Expected behavior Form/project validation on project creation, alternatively trailing whitespace should be allowed.

Screenshots If applicable, add screenshots to help explain your problem.

Contact Details An e-mail address in case we need to contact you for further details regarding this issue.

carmat88 commented 3 years ago

Here comes an investigation update:

stackn get: S3 - Fail app - Fail current - Success environment - Fail flavor - Fail mlflow - Fail object - Partially Fail --> "Project Carmat Ten Spaces not found." objecttypes - Fail project - Success (note: output may hint about rendering differences due to trailing spaces) releasenames - Fail remote - Success templates - Fail --> "TypeError: 'NoneType' object is not iterable"

All other failures reports: "TypeError: 'bool' object is not iterable"

stackn delete: delete app project-registry - Fail -> TypeError: cannot unpack non-iterable bool object delete app project-minio - Fail -> TypeError: cannot unpack non-iterable bool object

stackn get: S3 - Success app - Success current - Success environment - Success flavor - Success mlflow - Success (-->but Bug! Because I have deleted the mlflow-serve app, yet it's returning its ingress address) object - Success objecttypes - Success project - Success releasenames - Success remote - Success templates - Success

stackn delete: delete app project-registry - Success delete app project-minio - Success

These tests seem to point to the conclusion that a project name created with trailing spaces at the end can lead to issues for stackn cli but not for studio in itself. Studio django code seems actually to "slugify" the project name here:

Yet model, form and field validation could surely be improved since at:

validation is completely missing, unfortunately.

carmat88 commented 3 years ago

New Update

Before: image

After patch(local): image

By performing some data validation and data clean under components/studio/projects/model.py. Soon will come a PR for it!

carmat88 commented 3 years ago

Fixed by PR #258