determined-ai / determined

Determined is an open-source machine learning platform that simplifies distributed training, hyperparameter tuning, experiment tracking, and resource management. Works with PyTorch and TensorFlow.
https://determined.ai
Apache License 2.0
2.93k stars 347 forks source link

chore: change linters to handle Go 1.22 loopvar change [RM-353] #9580

Closed NicholasBlaskey closed 2 weeks ago

NicholasBlaskey commented 3 weeks ago

Ticket

Description

Go 1.22 had a language change which fixed a common foot gun in Golang. https://go.dev/blog/loopvar-preview

Update our linters to allow you to write code like this

for _, exp := range experiments {
   go func() {
       doSomething(exp)
   }()
}

Test Plan

CI passes

Checklist

netlify[bot] commented 3 weeks ago

Deploy Preview for determined-ui ready!

Name Link
Latest commit e658170cf9d191a34a0f353f5db44e32b58fcd43
Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/667ebda628926a000833c290
Deploy Preview https://deploy-preview-9580--determined-ui.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

codecov[bot] commented 3 weeks ago

Codecov Report

Attention: Patch coverage is 25.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 51.31%. Comparing base (e4724dd) to head (e658170).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #9580 +/- ## ========================================== - Coverage 51.33% 51.31% -0.02% ========================================== Files 1252 1252 Lines 152048 152028 -20 Branches 3019 3018 -1 ========================================== - Hits 78049 78009 -40 - Misses 73840 73860 +20 Partials 159 159 ``` | [Flag](https://app.codecov.io/gh/determined-ai/determined/pull/9580/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=determined-ai) | Coverage Δ | | |---|---|---| | [backend](https://app.codecov.io/gh/determined-ai/determined/pull/9580/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=determined-ai) | `43.95% <25.00%> (-0.06%)` | :arrow_down: | | [harness](https://app.codecov.io/gh/determined-ai/determined/pull/9580/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=determined-ai) | `72.80% <ø> (ø)` | | | [web](https://app.codecov.io/gh/determined-ai/determined/pull/9580/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=determined-ai) | `47.89% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=determined-ai#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/determined-ai/determined/pull/9580?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=determined-ai) | Coverage Δ | | |---|---|---| | [agent/internal/containers/manager.go](https://app.codecov.io/gh/determined-ai/determined/pull/9580?src=pr&el=tree&filepath=agent%2Finternal%2Fcontainers%2Fmanager.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=determined-ai#diff-YWdlbnQvaW50ZXJuYWwvY29udGFpbmVycy9tYW5hZ2VyLmdv) | `67.55% <ø> (+0.18%)` | :arrow_up: | | [master/internal/api\_checkpoint.go](https://app.codecov.io/gh/determined-ai/determined/pull/9580?src=pr&el=tree&filepath=master%2Finternal%2Fapi_checkpoint.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=determined-ai#diff-bWFzdGVyL2ludGVybmFsL2FwaV9jaGVja3BvaW50Lmdv) | `55.29% <ø> (+0.18%)` | :arrow_up: | | [master/internal/api\_experiment.go](https://app.codecov.io/gh/determined-ai/determined/pull/9580?src=pr&el=tree&filepath=master%2Finternal%2Fapi_experiment.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=determined-ai#diff-bWFzdGVyL2ludGVybmFsL2FwaV9leHBlcmltZW50Lmdv) | `56.74% <100.00%> (-0.05%)` | :arrow_down: | | [master/internal/checkpoint\_gc.go](https://app.codecov.io/gh/determined-ai/determined/pull/9580?src=pr&el=tree&filepath=master%2Finternal%2Fcheckpoint_gc.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=determined-ai#diff-bWFzdGVyL2ludGVybmFsL2NoZWNrcG9pbnRfZ2MuZ28=) | `66.66% <ø> (+0.73%)` | :arrow_up: | | [master/internal/experiment.go](https://app.codecov.io/gh/determined-ai/determined/pull/9580?src=pr&el=tree&filepath=master%2Finternal%2Fexperiment.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=determined-ai#diff-bWFzdGVyL2ludGVybmFsL2V4cGVyaW1lbnQuZ28=) | `30.39% <ø> (-0.16%)` | :arrow_down: | | [master/internal/rm/agentrm/agents.go](https://app.codecov.io/gh/determined-ai/determined/pull/9580?src=pr&el=tree&filepath=master%2Finternal%2Frm%2Fagentrm%2Fagents.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=determined-ai#diff-bWFzdGVyL2ludGVybmFsL3JtL2FnZW50cm0vYWdlbnRzLmdv) | `62.61% <ø> (-0.69%)` | :arrow_down: | | [master/internal/rm/kubernetesrm/jobs.go](https://app.codecov.io/gh/determined-ai/determined/pull/9580?src=pr&el=tree&filepath=master%2Finternal%2Frm%2Fkubernetesrm%2Fjobs.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=determined-ai#diff-bWFzdGVyL2ludGVybmFsL3JtL2t1YmVybmV0ZXNybS9qb2JzLmdv) | `69.80% <ø> (+0.06%)` | :arrow_up: | | [...nal/rm/kubernetesrm/kubernetes\_resource\_manager.go](https://app.codecov.io/gh/determined-ai/determined/pull/9580?src=pr&el=tree&filepath=master%2Finternal%2Frm%2Fkubernetesrm%2Fkubernetes_resource_manager.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=determined-ai#diff-bWFzdGVyL2ludGVybmFsL3JtL2t1YmVybmV0ZXNybS9rdWJlcm5ldGVzX3Jlc291cmNlX21hbmFnZXIuZ28=) | `30.92% <ø> (+0.10%)` | :arrow_up: | | [master/internal/rm/multirm/multirm.go](https://app.codecov.io/gh/determined-ai/determined/pull/9580?src=pr&el=tree&filepath=master%2Finternal%2Frm%2Fmultirm%2Fmultirm.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=determined-ai#diff-bWFzdGVyL2ludGVybmFsL3JtL211bHRpcm0vbXVsdGlybS5nbw==) | `83.24% <ø> (-0.10%)` | :arrow_down: | | [...ter/internal/db/postgres\_trial\_profiler\_metrics.go](https://app.codecov.io/gh/determined-ai/determined/pull/9580?src=pr&el=tree&filepath=master%2Finternal%2Fdb%2Fpostgres_trial_profiler_metrics.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=determined-ai#diff-bWFzdGVyL2ludGVybmFsL2RiL3Bvc3RncmVzX3RyaWFsX3Byb2ZpbGVyX21ldHJpY3MuZ28=) | `0.00% <0.00%> (ø)` | | | ... and [2 more](https://app.codecov.io/gh/determined-ai/determined/pull/9580?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=determined-ai) | | ... and [5 files with indirect coverage changes](https://app.codecov.io/gh/determined-ai/determined/pull/9580/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=determined-ai)