Closed pcrespov closed 1 week ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 88.4%. Comparing base (
cafbf96
) to head (7f97af2
). Report is 293 commits behind head on master.
Thanks for the quick fix!
Just a curiosity: you moved the issue from the
osparc-issues
repo to theosparc-simcore
repo. Is there a particular reason?
@elisabettai I hope it is ok with you. I did it because: 1) it is a but in osparc-simcore code 2) it automatically gets in my list if it is in osparc-simcore
Instead of setting this limitation in the API, shouldn't it be part of the Project model?
@odeimaiz Some clarifications ~1. This constrained type is only used so far in the description field of service-metadata~ (sorry! mistake)!
let me know if this is not clear or I misunderstood your question. We can talk offline
Instead of setting this limitation in the API, shouldn't it be part of the Project model?
@odeimaiz Some clarifications ~1. This constrained type is only used so far in the description field of service-metadata~ (sorry! mistake)! 2. It is only used in the model used for the PATCH body, i.e. it is an input model, not an output. Therefore, once the data is in the system, I do not see a reason to truncate it again.
let me know if this is not clear or I misunderstood your question. We can talk offline
PATCH description and PUT project, isn't it? the PUT call is still used when the study is open.
project
Yes both. Sorry, for some reason I thought I used this in metadata descriptions
Thanks for the quick fix! Just a curiosity: you moved the issue from the
osparc-issues
repo to theosparc-simcore
repo. Is there a particular reason?@elisabettai I hope it is ok with you. I did it because:
1. it is a but in osparc-simcore code 2. it automatically gets in my list if it is in osparc-simcore
Thanks for explaining @pcrespov, it's not a big deal, but for the future I'd leave it in osparc-issues
, for the following reasons:
osparc-issues
repo (in particular the special tags "Feedback" and "type:*" to provide metrics for NIH regarding user issues.
What do these changes do?
Fixes error produced when the user updates a study with a long description. After these changes very long descriptions (>1000 chars) and titles (>200 chars) will be truncated without reporting an error. Note that these truncation only happens for input strings in the API. As a general rule all input data to the API should be constrained either with a hard error or silently (e.g. truncating).
As a side note, the front-end should have reacted better to a 4XX errors provided that is a client error (the description maximum length was surpassed). I believe changes like https://github.com/ITISFoundation/osparc-simcore/pull/5487 should help in this direction .
Related issue/s
How to test
-k test_project_patch_truncates_description
Dev-ops checklist
None