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: update go linting + update dependencies for controller #137

Conversation

thesuperzapper
Copy link
Member

This PR makes the following changes:

  1. Updates to dependencies used on the controller:

    • Go 1.21 -> 1.22
    • controller-runtime: 0.17.3 -> 0.19.1
    • golangci-lint: 1.57.2 -> 1.61.0
    • EnvTest: 1.29 -> 1.31
  2. Updates to dependencies used by backend:

    • controller-runtime: 0.17.3 -> 0.19.1
    • golangci-lint: 1.57.2 -> 1.61.0
    • EnvTest: 1.29 -> 1.31
  3. Improved the linting for all go projects (controller, backend):

    • We now enforce comment formats
    • We now enforce license headers
    • We now do lots of code smell checks
    • We now have a spell checker

Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
@thesuperzapper
Copy link
Member Author

@ederign can you please LGTM when you are ready, this is an important update, and we need to get other PRs to rebase on it so they get the new linting.

/approve

Copy link
Member

@ederign ederign left a comment

Choose a reason for hiding this comment

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

@thesuperzapper thank you so much for this important PR. Just want to double check a few things before +1.

@@ -96,7 +96,6 @@ var _ = Describe("WorkspaceKind Webhook", func() {
}

for _, tc := range testCases {
tc := tc // Create a new instance of tc to avoid capturing the loop variable.
Copy link
Member

Choose a reason for hiding this comment

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

@thesuperzapper I want to double-check with you that this doesn't break anything. Based on the comment, the variable looks pretty intentional :)

Copy link
Member Author

Choose a reason for hiding this comment

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

It's no longer necessary to copy variables in the loop because go 1.22 fixed the issue.

It's actually a thing required by the linter now, because it would be wasteful to copy it twice.

@@ -4,37 +4,11 @@ kind: ClusterRole
metadata:
name: manager-role
rules:
- apiGroups:
Copy link
Member

Choose a reason for hiding this comment

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

Also, are sure about changing the roles?

Copy link
Member

Choose a reason for hiding this comment

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

(just to verify that this is not something automatically added).

Copy link
Member Author

Choose a reason for hiding this comment

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

This is automatically generated, I think it just re-ordered them.

@ederign
Copy link
Member

ederign commented Dec 2, 2024

/lgtm

Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ederign, thesuperzapper

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow bot added the lgtm label Dec 2, 2024
@google-oss-prow google-oss-prow bot merged commit e920dd9 into kubeflow:notebooks-v2 Dec 2, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

2 participants