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

🐛 Fixes failing test in master #3094

Merged
merged 1 commit into from
Jun 10, 2022
Merged

Conversation

GitHK
Copy link
Contributor

@GitHK GitHK commented Jun 10, 2022

What do these changes do?

After an httpx upgrade a test started failing due to timing timing/concurrency. Making sure all the pending requests finish before closing the client.

Related issue/s

How to test

Checklist

  • Unit tests for the changes exist

@GitHK GitHK requested review from sanderegg and pcrespov as code owners June 10, 2022 07:59
@GitHK GitHK requested review from odeimaiz and elisabettai June 10, 2022 07:59
@codecov
Copy link

codecov bot commented Jun 10, 2022

Codecov Report

Merging #3094 (2c20061) into master (308fa08) will increase coverage by 1.3%.
The diff coverage is 100.0%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #3094     +/-   ##
========================================
+ Coverage    79.6%   80.9%   +1.3%     
========================================
  Files         716     716             
  Lines       30922   30924      +2     
  Branches     4035    4035             
========================================
+ Hits        24618   25044    +426     
+ Misses       5405    5004    -401     
+ Partials      899     876     -23     
Flag Coverage Δ
integrationtests 66.2% <100.0%> (+<0.1%) ⬆️
unittests 76.9% <100.0%> (+0.1%) ⬆️

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

Impacted Files Coverage Δ
...ector_v2/modules/dynamic_sidecar/scheduler/task.py 82.5% <100.0%> (+8.7%) ⬆️
...rvice-library/src/servicelib/common_aiopg_utils.py 88.2% <0.0%> (-8.9%) ⬇️
...mcore_service_webserver/garbage_collector_utils.py 79.4% <0.0%> (-3.0%) ⬇️
.../simcore_service_catalog/db/repositories/groups.py 72.9% <0.0%> (-2.8%) ⬇️
.../director/src/simcore_service_director/producer.py 62.3% <0.0%> (+0.6%) ⬆️
...tor_v2/modules/dynamic_sidecar/scheduler/events.py 91.6% <0.0%> (+1.0%) ⬆️
...rector_v2/modules/comp_scheduler/dask_scheduler.py 86.5% <0.0%> (+1.9%) ⬆️
...simcore_service_director_v2/modules/director_v0.py 77.6% <0.0%> (+2.1%) ⬆️
...e_service_director_v2/models/domains/comp_tasks.py 100.0% <0.0%> (+2.6%) ⬆️
..._director_v2/modules/db/repositories/comp_tasks.py 92.4% <0.0%> (+2.8%) ⬆️
... and 34 more

@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.4% 0.4% Duplication

@GitHK GitHK self-assigned this Jun 10, 2022
@GitHK GitHK added this to the Diolkos milestone Jun 10, 2022
Copy link
Member

@sanderegg sanderegg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for fixing this

@@ -409,6 +409,10 @@ async def _run_scheduler_task(self) -> None:
settings: DynamicServicesSchedulerSettings = (
self.app.state.settings.DYNAMIC_SERVICES.DYNAMIC_SCHEDULER
)
logger.debug(
"dynamic-sidecars observation interval %s",
settings.DIRECTOR_V2_DYNAMIC_SCHEDULER_INTERVAL_SECONDS,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: is this not already printed out at the start of director-v2??

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No this one was not printed.

@@ -500,14 +504,13 @@ async def setup_scheduler(app: FastAPI):

async def shutdown_scheduler(app: FastAPI):
scheduler: DynamicSidecarsScheduler = app.state.dynamic_sidecar_scheduler
## FIXME: somehow this does not work
# assert isinstance(scheduler, DynamicSidecarsScheduler) # nosec
assert isinstance(scheduler, DynamicSidecarsScheduler) # nosec

# FIXME: PC->ANE: if not started, should it be shutdown?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe have a look at this FIXME too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left it in there for a later review.
The action pointed out is already being handled by the function.

@GitHK GitHK merged commit 3c24b83 into ITISFoundation:master Jun 10, 2022
@GitHK GitHK deleted the fix-dv2-tests branch June 10, 2022 13:03
@GitHK GitHK added the t:maintenance Some planned maintenance work label Jun 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t:maintenance Some planned maintenance work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants