Skip to content

Crash when running checkapi #1029

@bogdandrutu

Description

@bogdandrutu

Component

See open-telemetry/opentelemetry-collector#13353

Bug Description

In the otel-collector repo:

checkapi -folder . -config .checkapi.yaml
panic: [memorylimiterextension] Unsupported type *ast.CallExpr

goroutine 1 [running]:
go.opentelemetry.io/build-tools/checkapi/internal.readFile({0x0, 0x0, 0x0}, 0x140000f88c0, 0x14000157000)
        go.opentelemetry.io/build-tools/[email protected]/internal/ast.go:244 +0x884
go.opentelemetry.io/build-tools/checkapi/internal.Read({0x14000356450, 0x20}, {0x0, 0x0, 0x0}, {0x1400006c2a0, 0x2, 0x5?})
        go.opentelemetry.io/build-tools/[email protected]/internal/ast.go:117 +0x244
main.walkFolder({{0x14000024280, 0x1, 0x1}, {0x1400006c2a0, 0x2, 0x2}, {0x0, 0x0, 0x0}, {0x0, ...}, ...}, ...)
        go.opentelemetry.io/build-tools/[email protected]/main.go:84 +0x84
main.run.func1({0x14000356450, 0x27}, {0x10221f588?, 0x140000ef520?}, {0x14000157a78?, 0x10212f0cc?})
        go.opentelemetry.io/build-tools/[email protected]/main.go:68 +0x2b4
path/filepath.walk({0x14000356450, 0x27}, {0x10221f588, 0x140000ef520}, 0x14000157e90)
        path/filepath/path.go:345 +0xc8
path/filepath.walk({0x1400001c9e0, 0x20}, {0x10221f588, 0x140000eeea0}, 0x14000157e90)
        path/filepath/path.go:369 +0x1d0
path/filepath.walk({0x1400039be80, 0x9}, {0x10221f588, 0x140003c5c70}, 0x14000157e90)
        path/filepath/path.go:369 +0x1d0
path/filepath.walk({0x16dd7f62d, 0x1}, {0x10221f588, 0x1400007e820}, 0x14000157e90)
        path/filepath/path.go:369 +0x1d0
path/filepath.Walk({0x16dd7f62d, 0x1}, 0x1400012be90)
        path/filepath/path.go:427 +0x6c
main.run({0x16dd7f62d, 0x1}, {0x16dd7f637?, 0x1021aa8f7?})
        go.opentelemetry.io/build-tools/[email protected]/main.go:46 +0xdc
main.main()
        go.opentelemetry.io/build-tools/[email protected]/main.go:30 +0xec
make: *** [checkapi] Error 2

Steps To Reproduce

Upgrade checkapi to 0.24.0 and run make checkapi in the opentelemetry-collector.

Expected Behavior

Not to crash

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions