Skip to content

Commit

Permalink
Add golangci-lint action to CI workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Omer Aplatony <[email protected]>
  • Loading branch information
omerap12 committed Dec 3, 2024
1 parent cd58f3f commit 781210b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,30 @@ jobs:
run: hack/verify-all.sh -v
env:
GO111MODULE: auto

- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
working-directory: ${{ env.GOPATH }}/src/k8s.io/autoscaler/addon-resizer
version: v1.60

- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
working-directory: ${{ env.GOPATH }}/src/k8s.io/autoscaler/balancer
version: v1.60

- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
working-directory: ${{ env.GOPATH }}/src/k8s.io/autoscaler/cluster-autoscaler
version: v1.60

- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
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 @@ func (calc *UpdatePriorityCalculator) GetProcessedRecommendationTargets(r *vpa_t
return sb.String()
}

func parseVpaObservedContainers(pod *apiv1.Pod) (bool, sets.Set[string]) {
func parseVpaObservedContainers(pod *apiv1.Pod) (bool, sets.String) {
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

0 comments on commit 781210b

Please sign in to comment.