-
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
Add support for underscores in DYNAMIC_SIDECAR_DOCKER_IMAGE_RE #3139
Add support for underscores in DYNAMIC_SIDECAR_DOCKER_IMAGE_RE #3139
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3139 +/- ##
========================================
+ Coverage 80.4% 81.1% +0.6%
========================================
Files 711 711
Lines 30646 30646
Branches 3949 3949
========================================
+ Hits 24663 24861 +198
+ Misses 5130 4944 -186
+ Partials 853 841 -12
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.
I added a test.
Could you please add more use-cases?
@@ -12,7 +12,7 @@ | |||
# - itisfoundation | |||
# - 10.0.0.0:8473 (IP & Port) | |||
DYNAMIC_SIDECAR_DOCKER_IMAGE_RE = ( | |||
r"(^([a-zA-Z0-9:.-]+)/)?(dynamic-sidecar):([a-zA-Z0-9.-]+$)" | |||
r"(^([_a-zA-Z0-9:.-]+)/)?(dynamic-sidecar):([_a-zA-Z0-9.-]+$)" |
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.
Please run the test i attached with and without this chanve and add more string samples
@pytest.mark.parametrize( | ||
"sample", | ||
[ | ||
"itisfoundation/dynamic-sidecar:staging-github-staging_diolkos1-2022-06-15--15-04.75ddf7e3fb86944ef95fcf77e4075464848121f1", |
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.
and maybe add as parameter the release tag version as well... just to be on the safe side
@mrnicegyu11 do we still need this? |
Kudos, SonarCloud Quality Gate passed!
|
Our release workflow creates image tags with underscores in the name (see for example https://hub.docker.com/layers/itisfoundation/dynamic-sidecar/staging-github-staging_diolkos1-2022-06-15--15-04.75ddf7e3fb86944ef95fcf77e4075464848121f1/images/sha256-16bef83f05d3d98c04d901700e6001358441feb2eeb2b5c144530ac7c838c05e?context=explore ). For a proper rollback, these older images of the dynamic-sidecar need to be able to pass the regex check in the director-v2, so they can be used.
Check also here: https://regex101.com/r/TH33ZS/1