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(deps): update docker.io/golangci/golangci-lint docker tag to v1.55.0 #1641

Merged
merged 2 commits into from
Oct 24, 2023
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/static-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0
with:
# renovate: datasource=docker depName=docker.io/golangci/golangci-lint
version: v1.54.2
version: v1.55.0
args: --config=.golangci.yml --verbose

format:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.golangci-lint
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker.io/golangci/golangci-lint:v1.54.2@sha256:2082f5379c48c46e447bc1b890512f3aa9339db5eeed1a483a34aae9476ba6ee
FROM docker.io/golangci/golangci-lint:v1.55.0@sha256:6d35004e5b67de36dbdde54a5062d51eb51a076e291f2a71870ea8c980027c47
RUN apt-get -y update
RUN apt-get -y install libz-dev libelf-dev

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ BUILD_PKG_DIR ?= $(shell pwd)/build/$(TARGET_ARCH)
VERSION ?= $(shell git describe --tags --always)

# renovate: datasource=docker depName=docker.io/golangci/golangci-lint
GOLANGCILINT_WANT_VERSION = v1.54.2
GOLANGCILINT_WANT_VERSION = v1.55.0
GOLANGCILINT_VERSION = $(shell golangci-lint version 2>/dev/null)

# Do a parallel build with multiple jobs, based on the number of CPUs online
Expand Down
10 changes: 4 additions & 6 deletions cmd/protoc-gen-go-tetragon/eventchecker/field.go
Original file line number Diff line number Diff line change
Expand Up @@ -662,10 +662,9 @@ func (field *Field) listCheckerName(g *protogen.GeneratedFile) string {
})
}
return ret
} else {
varIdent := field.kind().String()
return fmt.Sprintf("%sListMatcher", strcase.ToCamel(varIdent))
}
varIdent := field.kind().String()
return fmt.Sprintf("%sListMatcher", strcase.ToCamel(varIdent))
}

func (field *Field) newListCheckerName(g *protogen.GeneratedFile) string {
Expand All @@ -691,10 +690,9 @@ func (field *Field) newListCheckerName(g *protogen.GeneratedFile) string {
})
}
return ret
} else {
varIdent := field.kind().String()
return fmt.Sprintf("New%sListMatcher", strcase.ToCamel(varIdent))
}
varIdent := field.kind().String()
return fmt.Sprintf("New%sListMatcher", strcase.ToCamel(varIdent))
}

func (field *Field) kind() protoreflect.Kind {
Expand Down
3 changes: 1 addition & 2 deletions pkg/kernels/kernels.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ func GenericKprobeObjs() (string, string) {
return "bpf_generic_kprobe_v61.o", "bpf_generic_retkprobe_v61.o"
} else if EnableLargeProgs() {
return "bpf_generic_kprobe_v53.o", "bpf_generic_retkprobe_v53.o"
} else {
return "bpf_generic_kprobe.o", "bpf_generic_retkprobe.o"
}
return "bpf_generic_kprobe.o", "bpf_generic_retkprobe.o"
}
3 changes: 1 addition & 2 deletions pkg/sensors/base/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ func ExecObj() string {
return "bpf_execve_event_v61.o"
} else if kernels.EnableLargeProgs() {
return "bpf_execve_event_v53.o"
} else {
return "bpf_execve_event.o"
}
return "bpf_execve_event.o"
}
16 changes: 10 additions & 6 deletions pkg/sensors/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,13 +326,17 @@ func loadInstance(bpfDir, mapDir string, load *program.Program, version, verbose
} else {
logger.GetLogger().WithField("Program", load.Name).WithField("Type", load.Type).Info("Loading BPF program")
}
if load.Type == "tracepoint" {

switch load.Type {
case "tracepoint":
return program.LoadTracepointProgram(bpfDir, mapDir, load, verbose)
} else if load.Type == "raw_tracepoint" || load.Type == "raw_tp" {
case "raw_tracepoint", "raw_tp":
return program.LoadRawTracepointProgram(bpfDir, mapDir, load, verbose)
} else if load.Type == "cgrp_socket" {
case "cgrp_socket":
return cgroup.LoadCgroupProgram(bpfDir, mapDir, load, verbose)
} else if probe != nil {
}

if probe != nil {
// Registered probes need extra setup
return probe.LoadProbe(LoadProbeArgs{
BPFDir: bpfDir,
Expand All @@ -341,9 +345,9 @@ func loadInstance(bpfDir, mapDir string, load *program.Program, version, verbose
Version: version,
Verbose: verbose,
})
} else {
return program.LoadKprobeProgram(bpfDir, mapDir, load, verbose)
}

return program.LoadKprobeProgram(bpfDir, mapDir, load, verbose)
}

func observerMinReqs() (bool, error) {
Expand Down
10 changes: 6 additions & 4 deletions pkg/sensors/tracing/generickprobe.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,15 @@ var (
)

func genericKprobeTableGet(id idtable.EntryID) (*genericKprobe, error) {
if entry, err := genericKprobeTable.GetEntry(id); err != nil {
entry, err := genericKprobeTable.GetEntry(id)
if err != nil {
return nil, fmt.Errorf("getting entry from genericKprobeTable failed with: %w", err)
} else if val, ok := entry.(*genericKprobe); !ok {
}
val, ok := entry.(*genericKprobe)
if !ok {
return nil, fmt.Errorf("getting entry from genericKprobeTable failed with: got invalid type: %T (%v)", entry, entry)
} else {
return val, nil
}
return val, nil
}

var (
Expand Down
10 changes: 6 additions & 4 deletions pkg/sensors/tracing/genericuprobe.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,15 @@ func init() {
}

func genericUprobeTableGet(id idtable.EntryID) (*genericUprobe, error) {
if entry, err := uprobeTable.GetEntry(id); err != nil {
entry, err := uprobeTable.GetEntry(id)
if err != nil {
return nil, fmt.Errorf("getting entry from uprobeTable failed with: %w", err)
} else if val, ok := entry.(*genericUprobe); !ok {
}
val, ok := entry.(*genericUprobe)
if !ok {
return nil, fmt.Errorf("getting entry from uprobeTable failed with: got invalid type: %T (%v)", entry, entry)
} else {
return val, nil
}
return val, nil
}

func handleGenericUprobe(r *bytes.Reader) ([]observer.Event, error) {
Expand Down
Loading