Skip to content
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

🎨 Enhances Product parsing to strip whitespaces in host_regex #6419

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

pcrespov
Copy link
Member

@pcrespov pcrespov commented Sep 20, 2024

What do these changes do?

The configuration of the products are currently set directly in the database via adminer. I found that it is easy to make a mistake and introduce spaces in Product.host_regex which lead to the system not delivering the right product.

This PR ensures that the Product pre-validator trims all leading and trailing whitespaces in the regex entry

Related issue/s

Maintenance

How to test

pytest tests/unit/isolated -k test_product_host_regex_with_spaces

Dev-ops checklist

@pcrespov pcrespov self-assigned this Sep 20, 2024
@pcrespov pcrespov added this to the MartinKippenberger milestone Sep 20, 2024
@pcrespov pcrespov added the a:webserver issue related to the webserver service label Sep 20, 2024
@pcrespov pcrespov marked this pull request as ready for review September 20, 2024 16:48
Copy link

codecov bot commented Sep 20, 2024

Codecov Report

Attention: Patch coverage is 90.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 82.5%. Comparing base (cafbf96) to head (86df02b).
Report is 565 commits behind head on master.

Files with missing lines Patch % Lines
...r/src/simcore_service_webserver/products/_model.py 90.0% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #6419      +/-   ##
=========================================
- Coverage    84.5%   82.5%    -2.1%     
=========================================
  Files          10     595     +585     
  Lines         214   30413   +30199     
  Branches       25     260     +235     
=========================================
+ Hits          181   25094   +24913     
- Misses         23    5259    +5236     
- Partials       10      60      +50     
Flag Coverage Δ
integrationtests 64.6% <90.0%> (?)
unittests 88.0% <90.0%> (+3.4%) ⬆️

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

Files with missing lines Coverage Δ
...r/src/simcore_service_webserver/products/_model.py 94.3% <90.0%> (ø)

... and 604 files with indirect coverage changes

Copy link
Member

@sanderegg sanderegg left a comment

Choose a reason for hiding this comment

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

you forgot to put the t:maintenance label

@pcrespov pcrespov added the t:maintenance Some planned maintenance work label Sep 20, 2024
@pcrespov pcrespov enabled auto-merge (squash) September 21, 2024 08:33
Copy link

sonarcloud bot commented Sep 21, 2024

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.

2 participants