Skip to content

🐛 Fix webserver storage OpenAPI schema #4426

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

GitHK
Copy link
Contributor

@GitHK GitHK commented Jun 27, 2023

What do these changes do?

Related issue/s

How to test

DevOps Checklist

@GitHK GitHK self-assigned this Jun 27, 2023
@GitHK GitHK added a:webserver issue related to the webserver service t:maintenance Some planned maintenance work changelog:🐛bugfix labels Jun 27, 2023
@GitHK GitHK added this to the Watermelon milestone Jun 27, 2023
@codeclimate
Copy link

codeclimate bot commented Jun 27, 2023

Code Climate has analyzed commit ebbc7e5 and detected 0 issues on this pull request.

View more on Code Climate.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.1% 0.1% Duplication

@codecov
Copy link

codecov bot commented Jun 27, 2023

Codecov Report

Merging #4426 (ebbc7e5) into master (03dc50a) will decrease coverage by 1.2%.
The diff coverage is 100.0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #4426      +/-   ##
=========================================
- Coverage    85.9%   84.8%    -1.2%     
=========================================
  Files         952     395     -557     
  Lines       41702   20791   -20911     
  Branches     1004     173     -831     
=========================================
- Hits        35849   17641   -18208     
+ Misses       5619    3101    -2518     
+ Partials      234      49     -185     
Flag Coverage Δ
integrationtests 68.0% <50.0%> (+0.1%) ⬆️
unittests 86.8% <100.0%> (+2.8%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...src/simcore_service_webserver/storage/_handlers.py 85.9% <100.0%> (+14.8%) ⬆️
...r/src/simcore_service_webserver/storage/_routes.py 100.0% <100.0%> (ø)

... and 632 files with indirect coverage changes

@GitHK GitHK marked this pull request as ready for review June 27, 2023 13:55
@GitHK GitHK requested a review from odeimaiz June 27, 2023 13:55
Copy link
Collaborator

@matusdrobuliak66 matusdrobuliak66 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@GitHK GitHK merged commit 9dc5a02 into ITISFoundation:master Jun 27, 2023
@GitHK GitHK deleted the pr-osparc-fix-storage-openapi-errors branch June 27, 2023 14:00
# slashes, and when applying validation via `StorageFileID`
# it raises an error. Before `StorageFileID`, `str` was the
# type used in the OpenAPI specs.
StorageFileIDStr: TypeAlias = str
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand that StorageFileID (which is itself a str) is too restrictive, right?

  • Why do we define this id?
  • If this is not the ID I want for the API, shouldn't you call it AnyFileIDStr instead of StorageFileIDStr?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you look at the tests, the incoming string is very closely related to this StorageFileID type. Though, the one incoming has the character "/" url encoded twice.
So I wanted to give an idea that the type should be something related to the original StorageFileID. Also I did not want to break how everything is working at the moment, since this double encoded slash url is generated by the backend, there must be a reason for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:webserver issue related to the webserver service t:maintenance Some planned maintenance work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants