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

go linter fails on github actions and locally #5694

Open
mousamdahal opened this issue May 9, 2024 · 3 comments
Open

go linter fails on github actions and locally #5694

mousamdahal opened this issue May 9, 2024 · 3 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. triage/needs-information Indicates an issue needs more information in order to work on it.

Comments

@mousamdahal
Copy link

What happened?

When the linter runs, it always fails even If I tried couple of configurations. Below is the error logs in verbose mode,

WARN [runner] Can't run linter goanalysis_metalinter: buildir: failed to load package openapi: could not load export data: no export data for "sigs.k8s.io/kustomize/kyaml/openapi" 
INFO [runner] processing took 4.372µs with stages: max_same_issues: 703ns, path_prettifier: 450ns, severity-rules: 384ns, cgo: 322ns, skip_dirs: 321ns, nolint: 245ns, max_from_linter: 224ns, fixer: 138ns, filename_unadjuster: 131ns, autogenerated_exclude: 129ns, exclude: 127ns, invalid_issue: 125ns, max_per_file_from_linter: 124ns, source_code: 123ns, skip_files: 123ns, diff: 122ns, path_prefixer: 122ns, uniq_by_line: 121ns, path_shortener: 110ns, exclude-rules: 110ns, identifier_marker: 67ns, sort_results: 51ns 
INFO [runner] linters took 34.198095437s with stages: goanalysis_metalinter: 34.198037061s 
ERRO Running error: can't run linter goanalysis_metalinter
buildir: failed to load package openapi: could not load export data: no export data for "sigs.k8s.io/kustomize/kyaml/openapi" 
INFO Memory: 305 samples, avg is 1035.6MB, max is 1710.7MB 

What did you expect to happen?

The linter should have been passed successfully

How can we reproduce it (as minimally and precisely as possible)?

Any project having dependency of sigs.k8s.io/kustomize/kyaml v0.13.9 , might fail

Expected output

No response

Actual output

No response

Kustomize version

sigs.k8s.io/kustomize/kyaml v0.13.9

Operating system

Linux

@mousamdahal mousamdahal added the kind/bug Categorizes issue or PR as related to a bug. label May 9, 2024
@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label May 9, 2024
@stormqueen1990
Copy link
Member

Hi there, @mousamdahal!

Could you please provide more information about this?
I am unclear what linter this issue is referring to, how is it being ran, and what configuration was used for that.

This project uses golangci-lint and I have not seen any recent concerns with it failing either locally or in CI.

/triage needs-information

@k8s-ci-robot k8s-ci-robot added triage/needs-information Indicates an issue needs more information in order to work on it. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels May 29, 2024
@KaanTolunayKilicOG
Copy link

KaanTolunayKilicOG commented Jun 5, 2024

hi, same issue here

I have golangci-lint in version 1.59.0 running in github action and i get the following error message with -v enabled:

[runner] Can't run linter goanalysis_metalinter: inspect: failed to load package recon: could not load export data: no export data for "XXX"

go version is: go version go1.22.3 linux/amd64

Running golangci-lint locally with the same version on my mac works!

@mousamdahal
Copy link
Author

@stormqueen1990 , so in my case, we are not directly using this project, but it gets added as an indirect dependency and the workflow we are using on GitHub action fails showing the error above, and it fails on my local system too (while running golangcilint on my project). Please pinpoint the logs or the version information, which you want me to share here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. triage/needs-information Indicates an issue needs more information in order to work on it.
Projects
None yet
Development

No branches or pull requests

4 participants