-
Notifications
You must be signed in to change notification settings - Fork 181
chore: upgrade go version to 1.24.4 and golangci-lint to 2.1.6 #204
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
Conversation
This is most likely duplicated with #203. |
ok I didn't see that, I was updating prometheus-adapter so found need to update dependencies here as well. |
Maybe you can help to review that PR, and after that the dependent bot can help to bump to 1.33.1, and then this PR can focus on prometheus-adapter thing. |
I will rebase to just update go |
@RainbowMango PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/assign
Lint file has been updated by running the command from https://golangci-lint.run/product/migration-guide |
I know that migration tool, it changes things sometimes as I mentioned above, removed the timeout setting and removed the |
Sure let me review again |
/triage accepted |
@slashpai any update? I'm going to tag a new release for the Kubernetes v1.33, it would be great to have this. |
I will have it updated this week, was a bit occupied so couldn't look into this |
Hi @slashpai Kindly ping? We are waiting for this PR to cut the v1.33.0 release. diff --git a/.golangci.yml b/.golangci.yml
index 7f712891..5473cc79 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -1,6 +1,7 @@
version: "2"
+run:
+ timeout: 7m
linters:
- default: none
enable:
- bodyclose
- copyloopvar
@@ -25,6 +26,11 @@ linters:
misspell:
ignore-rules:
- creater
+ staticcheck:
+ checks:
+ - all
+ # Disable QF1008 to retain embedded fields for better readability.
+ - "-QF1008"
exclusions:
generated: lax
presets:
diff --git a/pkg/apiserver/endpoints/handlers/get.go b/pkg/apiserver/endpoints/handlers/get.go
index fa0920c1..1ce71623 100644
--- a/pkg/apiserver/endpoints/handlers/get.go
+++ b/pkg/apiserver/endpoints/handlers/get.go
@@ -181,5 +181,5 @@ func getRequestOptions(req *http.Request, scope handlers.RequestScope, into runt
newQuery[subpathKey] = []string{p}
query = newQuery
}
- return scope.DecodeParameters(query, scope.Kind.GroupVersion(), into)
+ return scope.ParameterCodec.DecodeParameters(query, scope.Kind.GroupVersion(), into)
}
(END)
generated: lax
presets:
diff --git a/pkg/apiserver/endpoints/handlers/get.go b/pkg/apiserver/endpoints/handlers/get.go
index fa0920c1..1ce71623 100644
--- a/pkg/apiserver/endpoints/handlers/get.go
+++ b/pkg/apiserver/endpoints/handlers/get.go
@@ -181,5 +181,5 @@ func getRequestOptions(req *http.Request, scope handlers.RequestScope, into runt
newQuery[subpathKey] = []string{p}
query = newQuery
}
- return scope.DecodeParameters(query, scope.Kind.GroupVersion(), into)
+ return scope.ParameterCodec.DecodeParameters(query, scope.Kind.GroupVersion(), into)
}
|
pkg/cmd/builder.go
Outdated
@@ -109,7 +109,7 @@ func (b *AdapterBase) InstallFlags() { | |||
b.CustomMetricsAdapterServerOptions = options.NewCustomMetricsAdapterServerOptions() | |||
} | |||
|
|||
b.CustomMetricsAdapterServerOptions.AddFlags(b.FlagSet) | |||
b.AddFlags(b.FlagSet) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RainbowMango Let me know if these changes ok, these were suggested by linter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need this change as we disabled the check
# Disable QF1008 to retain embedded fields for better readability.
- "-QF1008"
sorry for taking long was on unplanned PTO, I have addressed review comments. Please take a look again |
Signed-off-by: Jayapriya Pai <[email protected]>
@RainbowMango PTAL updated with changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
Thanks
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: RainbowMango, slashpai 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 |
No description provided.