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

Add support for underscores in DYNAMIC_SIDECAR_DOCKER_IMAGE_RE #3139

Conversation

mrnicegyu11
Copy link
Member

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

@mrnicegyu11 mrnicegyu11 added bug buggy, it does not work as expected a:director-v2 issue related with the director-v2 service a:dynamic-sidecar dynamic-sidecar service changelog:🐛bugfix labels Jun 24, 2022
@mrnicegyu11 mrnicegyu11 requested a review from odeimaiz June 24, 2022 16:00
@mrnicegyu11 mrnicegyu11 self-assigned this Jun 24, 2022
@codecov
Copy link

codecov bot commented Jun 24, 2022

Codecov Report

Merging #3139 (4fa5a64) into master (1449f68) will increase coverage by 0.6%.
The diff coverage is n/a.

Impacted file tree graph

@@           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     
Flag Coverage Δ
integrationtests 66.2% <ø> (+<0.1%) ⬆️
unittests 77.4% <ø> (+0.8%) ⬆️

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

Impacted Files Coverage Δ
...re_service_director_v2/models/schemas/constants.py 100.0% <ø> (ø)
...ector_v2/modules/dynamic_sidecar/scheduler/task.py 80.2% <0.0%> (-1.4%) ⬇️
...ore_service_director_v2/utils/dask_client_utils.py 78.2% <0.0%> (-0.9%) ⬇️
...imcore_service_webserver/garbage_collector_core.py 70.4% <0.0%> (ø)
...simcore_service_director_v2/modules/dask_client.py 92.8% <0.0%> (+0.5%) ⬆️
...c/simcore_service_catalog/core/background_tasks.py 67.3% <0.0%> (+1.0%) ⬆️
...e_service_director_v2/modules/dask_clients_pool.py 94.2% <0.0%> (+1.4%) ⬆️
...rector_v2/modules/comp_scheduler/base_scheduler.py 88.6% <0.0%> (+1.8%) ⬆️
...mcore_service_webserver/garbage_collector_utils.py 82.0% <0.0%> (+2.5%) ⬆️
...ore_service_director_v2/utils/client_decorators.py 76.6% <0.0%> (+3.3%) ⬆️
... and 11 more

Copy link
Member

@pcrespov pcrespov left a 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.-]+$)"
Copy link
Member

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",
Copy link
Member

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

@pcrespov pcrespov added this to the Diolkos milestone Jun 27, 2022
@pcrespov
Copy link
Member

@mrnicegyu11 do we still need this?

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@mrnicegyu11 mrnicegyu11 merged commit 2bc4d08 into ITISFoundation:master Jun 30, 2022
@mrnicegyu11 mrnicegyu11 deleted the fix/fixDynamicSidecarValidationRegex branch June 30, 2022 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:director-v2 issue related with the director-v2 service a:dynamic-sidecar dynamic-sidecar service bug buggy, it does not work as expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants