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

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

Merged
merged 3 commits into from
Jun 28, 2024

Conversation

NicholasBlaskey
Copy link
Contributor

@NicholasBlaskey NicholasBlaskey commented Jun 27, 2024

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

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

Copy link

netlify bot commented Jun 27, 2024

Deploy Preview for determined-ui ready!

Name Link
🔨 Latest commit e658170
🔍 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.

Copy link

codecov bot commented Jun 27, 2024

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
@@            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 Coverage Δ
backend 43.95% <25.00%> (-0.06%) ⬇️
harness 72.80% <ø> (ø)
web 47.89% <ø> (ø)

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

Files Coverage Δ
agent/internal/containers/manager.go 67.55% <ø> (+0.18%) ⬆️
master/internal/api_checkpoint.go 55.29% <ø> (+0.18%) ⬆️
master/internal/api_experiment.go 56.74% <100.00%> (-0.05%) ⬇️
master/internal/checkpoint_gc.go 66.66% <ø> (+0.73%) ⬆️
master/internal/experiment.go 30.39% <ø> (-0.16%) ⬇️
master/internal/rm/agentrm/agents.go 62.61% <ø> (-0.69%) ⬇️
master/internal/rm/kubernetesrm/jobs.go 69.80% <ø> (+0.06%) ⬆️
...nal/rm/kubernetesrm/kubernetes_resource_manager.go 30.92% <ø> (+0.10%) ⬆️
master/internal/rm/multirm/multirm.go 83.24% <ø> (-0.10%) ⬇️
...ter/internal/db/postgres_trial_profiler_metrics.go 0.00% <0.00%> (ø)
... and 2 more

... and 5 files with indirect coverage changes

Copy link
Contributor

@carolinaecalderon carolinaecalderon left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -211,4 +220,3 @@ linters:
- deadcode # Replaced by unusued.
- maligned # Replaced by govet 'fieldalignment'.
- golint # Replaced by revive.

Copy link
Contributor

Choose a reason for hiding this comment

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

extra change?

@NicholasBlaskey NicholasBlaskey enabled auto-merge (squash) June 28, 2024 13:43
@NicholasBlaskey NicholasBlaskey merged commit 4760d95 into main Jun 28, 2024
79 of 94 checks passed
@NicholasBlaskey NicholasBlaskey deleted the loop_var_linters branch June 28, 2024 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants