-
Notifications
You must be signed in to change notification settings - Fork 32
🐛 ooil can now escape quadruple $ used by OsparcVariableIdentifier
#8118
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
🐛 ooil can now escape quadruple $ used by OsparcVariableIdentifier
#8118
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8118 +/- ##
==========================================
+ Coverage 88.33% 90.04% +1.71%
==========================================
Files 1853 1487 -366
Lines 71079 61007 -10072
Branches 1182 488 -694
==========================================
- Hits 62785 54933 -7852
+ Misses 7941 5948 -1993
+ Partials 353 126 -227
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
packages/models-library/src/models_library/osparc_variable_identifier.py
Show resolved
Hide resolved
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.
Pull Request Overview
This PR enhances the ooil validation to support quadruple dollar ($$$$) characters used by OsparcVariableIdentifier patterns. The main change introduces environment variable-controlled behavior that allows switching between platform-level validation (supporting 1-2 dollars) and ooil-level validation (supporting 1-4 dollars) for OSPARC variable identifiers.
Key changes:
- Refactored
OsparcVariableIdentifierto use a discriminated union pattern with environment variable control - Updated OpenAPI schema to support both 1-2 and 1-4 dollar patterns through oneOf schemas
- Added test configuration to enable the new ooil behavior in service integration tests
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| services/director-v2/openapi.json | Updated JSON schema patterns to support both 1-2 and 1-4 dollar variable identifiers using oneOf structures |
| packages/models-library/src/models_library/osparc_variable_identifier.py | Refactored to use discriminated union with platform and ooil variants, added environment variable control |
| packages/models-library/src/models_library/utils/types.py | Added utility function to extract types from annotated unions |
| packages/models-library/src/models_library/service_settings_nat_rule.py | Updated isinstance checks to work with new discriminated union structure |
| packages/models-library/tests/test_service_settings_nat_rule.py | Updated test assertions to use new type extraction utility |
| packages/service-integration/tests/test_osparc_image_specs.py | Added environment variable setup to enable ooil behavior in tests |
| packages/service-integration/tests/data/runtime.yml | Updated test data to include quadruple dollar variable examples |
| packages/service-integration/src/service_integration/init.py | Minor docstring formatting change |
packages/models-library/src/models_library/osparc_variable_identifier.py
Show resolved
Hide resolved
packages/models-library/src/models_library/osparc_variable_identifier.py
Show resolved
Hide resolved
packages/models-library/src/models_library/osparc_variable_identifier.py
Show resolved
Hide resolved
|
@Mergifyio queue |
🛑 The pull request has been removed from the queue
|
|
|
This pull request has been removed from the queue for the following reason: The merge conditions cannot be satisfied due to failing checks:You may have to fix your CI before adding the pull request to the queue again. |
|
@Mergifyio requeue |
✅ This pull request will be re-embarked automaticallyThe followup |
✅ The pull request has been merged automaticallyThe pull request has been merged automatically at e805af6 |



What do these changes do?
When validating the
NATRuleooil did not allow to use quadruple $ characters.And env var was added to enable this behaviour.
When packaging
ci-service-integration-librarythis one var is set allowing ooil to properly validate.Related issue/s
How to test
Dev-ops