-
Notifications
You must be signed in to change notification settings - Fork 27
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
🐛 (⚠️ devops) Fix validation of DIRECTOR_V2_SERVICES_CUSTOM_CONSTRAINTS: Make it conform to docker specs #3190
🐛 (⚠️ devops) Fix validation of DIRECTOR_V2_SERVICES_CUSTOM_CONSTRAINTS: Make it conform to docker specs #3190
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3190 +/- ##
========================================
+ Coverage 81.0% 82.0% +0.9%
========================================
Files 740 740
Lines 31572 31572
Branches 4081 4081
========================================
+ Hits 25602 25892 +290
+ Misses 5147 4846 -301
- Partials 823 834 +11
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pair reviewed. Expected test as agreed. thx
@@ -157,6 +157,11 @@ def test_expected_failure_dynamic_sidecar_settings( | |||
('["two!=no"]', ["two!=no"]), | |||
('["one==yes", "two!=no"]', ["one==yes", "two!=no"]), | |||
('[" strips.white.spaces == ok "]', ["strips.white.spaces == ok"]), | |||
( | |||
# Bug from https://github.com/ITISFoundation/osparc-simcore/pull/3190 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can remove this comment, it's fine like this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just make sure to remove this comment
services/director-v2/src/simcore_service_director_v2/core/settings.py
Outdated
Show resolved
Hide resolved
( | ||
# Bug from https://github.com/ITISFoundation/osparc-simcore/pull/3190 | ||
'["node.labels.standard_worker==true"]', | ||
["node.labels.standard_worker==true"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also add the following test case
('["underscore_label==underscore_value"]', ["underscore_label==underscore_value"]),
Since you are changing these, please also add the above suggestions. Thanks! |
I intentionally did not, it is unclear and untested if this is even permitted from docker. |
Let's have a look at the docs. Apparently the key part of the label cannot contain underscores but only alphanumerical character and Regarding the value part of the label, all valid json encodable characters are ok. So |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Thanks for taking care of this
@@ -157,6 +157,11 @@ def test_expected_failure_dynamic_sidecar_settings( | |||
('["two!=no"]', ["two!=no"]), | |||
('["one==yes", "two!=no"]', ["one==yes", "two!=no"]), | |||
('[" strips.white.spaces == ok "]', ["strips.white.spaces == ok"]), | |||
( | |||
# Bug from https://github.com/ITISFoundation/osparc-simcore/pull/3190 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just make sure to remove this comment
Kudos, SonarCloud Quality Gate passed!
|
What do these changes do?
Allow underscore in DIRECTOR_V2_SERVICES_CUSTOM_CONSTRAINTS in regex validation during container start
Before:
node.labels.standard_worker==true
--> invalidnode.labels.standardworker==true
--> validNow:
node.labels.standard_worker==true
--> validnode.labels.standardworker==true
--> valid(⚠️ devops)
DIRECTOR_V2_SERVICES_CUSTOM_CONSTRAINTS
on all deployments adheres to the new tighter constraints, which is identical to the docker spec https://docs.docker.com/config/labels-custom-metadata/#label-keys-and-values