-
Notifications
You must be signed in to change notification settings - Fork 26
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
✨ Is3565/service environs substitution [part 1] (⚠️ devops) #3803
✨ Is3565/service environs substitution [part 1] (⚠️ devops) #3803
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3803 +/- ##
=========================================
+ Coverage 84.8% 87.1% +2.3%
=========================================
Files 924 463 -461
Lines 39507 23891 -15616
Branches 810 136 -674
=========================================
- Hits 33531 20828 -12703
+ Misses 5764 3014 -2750
+ Partials 212 49 -163
Flags with carried forward coverage won't be shown. Click here to find out more.
|
24777de
to
05187e1
Compare
01ef415
to
d1cdd69
Compare
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.
no review just an ack
for the devops changes :) good luck and thanks a lot!
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.
All good. maybe check my minor comments. Thanks!
packages/models-library/src/models_library/utils/string_substitution.py
Outdated
Show resolved
Hide resolved
packages/models-library/src/models_library/utils/string_substitution.py
Outdated
Show resolved
Hide resolved
packages/models-library/src/models_library/utils/string_substitution.py
Outdated
Show resolved
Hide resolved
packages/models-library/tests/test_utils_string_substitution.py
Outdated
Show resolved
Hide resolved
packages/models-library/tests/test_utils_string_substitution.py
Outdated
Show resolved
Hide resolved
d1cdd69
to
d2305cd
Compare
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.
👍 Nice!
Please find some concerns below.
packages/models-library/src/models_library/utils/string_substitution.py
Outdated
Show resolved
Hide resolved
packages/models-library/tests/test_utils_string_substitution.py
Outdated
Show resolved
Hide resolved
Code Climate has analyzed commit f0837bf and detected 0 issues on this pull request. View more on Code Climate. |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
What do these changes do?
Custom service metadata includes some entries with identifiers instead of concrete values. These identifiers have to be resolved at runtime into concrete values depending on the context. For instance in this metadata
the
image
value has to be resolved by substituting the identifiersSIMCORE_REGISTRY
andDOCKER_IMAGE_NAME
with the corresponding values.To achieve this we distinguish two part. The first part (in this PR) addresses the problem of string substitution in a unified and standard way. The second part (in following PRs) tackles how these identifiers are resolved into values depending on the runtime context (e.g. active project, user, product, service, etc).
Changes highlights
models_library.utils.string_substitutions
moduleservicelib.docker_compose.replace_env_vars_in_compose_spec
- moved from
servicelib
tomodels_library.utils.docker_compose
- implemented with new
TemplateText
invitations
from discarded PR ✨ Is3683/traefik invitations rules (⚠️ devops) #3787INVITATIONS_HOST
variable in.env-devel
Related issue/s
How to test
pytest packages/models-library/tests/test_utils_string_substitution.py
Checklist
make version-*