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

Testing Golint with annotations #7558

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ env:

permissions:
contents: read
pull-requests: read
checks: write

jobs:
test-and-verify:
Expand Down Expand Up @@ -37,6 +39,14 @@ jobs:
run: hack/verify-all.sh -v
env:
GO111MODULE: auto


- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
args: --timeout=30m
working-directory: ${{ env.GOPATH }}/src/k8s.io/autoscaler/vertical-pod-autoscaler
version: v1.60

- name: Test
working-directory: ${{ env.GOPATH }}/src/k8s.io/autoscaler
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,9 @@
return sb.String()
}

func parseVpaObservedContainers(pod *apiv1.Pod) (bool, sets.Set[string]) {
func parseVpaObservedContainers(pod *apiv1.Pod) (bool, sets.String) {

Check failure on line 196 in vertical-pod-autoscaler/pkg/updater/priority/update_priority_calculator.go

View workflow job for this annotation

GitHub Actions / test-and-verify

SA1019: sets.String is deprecated: use generic Set instead. new ways: s1 := Set[string]{} s2 := New[string]() (staticcheck)
observedContainers, hasObservedContainers := pod.GetAnnotations()[annotations.VpaObservedContainersLabel]
vpaContainerSet := sets.New[string]()
vpaContainerSet := sets.NewString()
if hasObservedContainers {
if containers, err := annotations.ParseVpaObservedContainersValue(observedContainers); err != nil {
klog.ErrorS(err, "VPA annotation failed to parse", "pod", klog.KObj(pod), "annotation", observedContainers)
Expand Down
Loading