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

fix: unlock mutex for experiment ResourcePool() [RM-152] #9119

Merged
merged 7 commits into from
Apr 8, 2024

Conversation

carolinaecalderon
Copy link
Contributor

@carolinaecalderon carolinaecalderon commented Apr 5, 2024

Ticket

RM-152

Description

Unlock the internal experiment mutex in ResourcePool()

Test Plan

I added a unit test that checks that the function returns smoothly. Without my change, the test would timeout anyway/fail.

Checklist

  • Changes have been manually QA'd
  • User-facing API changes need the "User-facing API Change" label.
  • Release notes should be added as a separate file under docs/release-notes/.
    See Release Note for details.
  • Licenses should be included for new code which was copied and/or modified from any external code.

@cla-bot cla-bot bot added the cla-signed label Apr 5, 2024
Copy link

netlify bot commented Apr 5, 2024

Deploy Preview for determined-ui canceled.

Name Link
🔨 Latest commit 5ff2388
🔍 Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/661432705c73bd00087f5b0f

@carolinaecalderon carolinaecalderon marked this pull request as ready for review April 5, 2024 20:08
@carolinaecalderon carolinaecalderon requested a review from a team as a code owner April 5, 2024 20:08
Copy link

codecov bot commented Apr 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 46.16%. Comparing base (cf2f2be) to head (5ff2388).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9119   +/-   ##
=======================================
  Coverage   46.16%   46.16%           
=======================================
  Files        1174     1174           
  Lines      145186   145186           
  Branches     2413     2413           
=======================================
+ Hits        67026    67028    +2     
+ Misses      77952    77950    -2     
  Partials      208      208           
Flag Coverage Δ
backend 43.49% <100.00%> (+<0.01%) ⬆️
harness 64.00% <ø> (ø)
web 36.82% <ø> (ø)

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

Files Coverage Δ
master/internal/experiment_job_service.go 7.50% <100.00%> (+7.50%) ⬆️

... and 3 files with indirect coverage changes

Copy link
Contributor

@NicholasBlaskey NicholasBlaskey left a comment

Choose a reason for hiding this comment

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

one crazy idea is to try and right a regex that catches

defer *.Unlock() and put it in forbidigo

master/internal/experiment_job_service_test.go Outdated Show resolved Hide resolved
master/internal/experiment_job_service.go Show resolved Hide resolved
@determined-ci determined-ci requested a review from a team April 7, 2024 19:01
@determined-ci determined-ci added the documentation Improvements or additions to documentation label Apr 7, 2024
@@ -32,8 +32,10 @@ import (

var pAuthZ *mocks.ProjectAuthZ

const mockName = "mock"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

note: had to add these changes to satisfy the linter, although my PR doesn't touch this

@tara-det-ai tara-det-ai self-requested a review April 8, 2024 16:37
Copy link
Member

@tara-det-ai tara-det-ai left a comment

Choose a reason for hiding this comment

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

suggested edit

@determined-ci determined-ci requested a review from a team April 8, 2024 17:39
@carolinaecalderon carolinaecalderon merged commit 8a7832a into main Apr 8, 2024
73 of 85 checks passed
@carolinaecalderon carolinaecalderon deleted the carolinac/rm-152 branch April 8, 2024 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants