Skip to content

v1.21 nondeterministic linting due to ctrlflow: failed prerequisites #840

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

Closed
3 tasks done
howardjohn opened this issue Nov 2, 2019 · 16 comments
Closed
3 tasks done
Labels
bug Something isn't working

Comments

@howardjohn
Copy link

Thank you for creating the issue!

  • Yes, I'm using a binary release within 2 latest major releases. Only such installations are supported.
  • Yes, I've searched similar issues on GitHub and didn't find any.
  • Yes, I've included all information below (version, config, etc).

Please include the following information:

Version of golangci-lint
$ golangci-lint --version
v1.21
Config file
$ cat .golangci.yml
# WARNING: DO NOT EDIT, THIS FILE IS PROBABLY A COPY
#
# The original version of this file is located in the https://github.com/istio/common-files repo.
# If you're looking at this file in a different repo and want to make a change, please go to the
# common-files repo, make the change there and check it in. Then come back to this repo and run
# "make update-common".

service:
  # When updating this, also update the version stored in docker/build-tools/Dockerfile in the istio/tools repo.
  golangci-lint-version: 1.21.x # use the fixed version to not introduce new linters unexpectedly
run:
  # timeout for analysis, e.g. 30s, 5m, default is 1m
  deadline: 20m

  # which dirs to skip: they won't be analyzed;
  # can use regexp here: generated.*, regexp is applied on full path;
  # default value is empty list, but next dirs are always skipped independently
  # from this option's value:
  #   	vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
  skip-dirs:
    - genfiles$
    - vendor$

  # which files to skip: they will be analyzed, but issues from them
  # won't be reported. Default value is empty list, but there is
  # no need to include all autogenerated files, we confidently recognize
  # autogenerated files. If it's not please let us know.
  skip-files:
    - ".*\\.pb\\.go"
    - ".*\\.gen\\.go"

linters:
  enable-all: true
  disable:
    - bodyclose
    - depguard
    - dogsled
    - dupl
    - funlen
    - gochecknoglobals
    - gochecknoinits
    - gocognit
    - goconst
    - gocyclo
    - godox
    - gosec
    - nakedret
    - prealloc
    - scopelint
    - whitespace
    - wsl
  fast: false

linters-settings:
  errcheck:
    # report about not checking of errors in type assetions: `a := b.(MyStruct)`;
    # default is false: such cases aren't reported by default.
    check-type-assertions: false

    # report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`;
    # default is false: such cases aren't reported by default.
    check-blank: false
  govet:
    # report about shadowed variables
    check-shadowing: false
  golint:
    # minimal confidence for issues, default is 0.8
    min-confidence: 0.0
  gofmt:
    # simplify code: gofmt with `-s` option, true by default
    simplify: true
  goimports:
    # put imports beginning with prefix after 3rd-party packages;
    # it's a comma-separated list of prefixes
    local-prefixes: istio.io/
  maligned:
    # print struct with more effective memory layout or not, false by default
    suggest-new: true
  misspell:
    # Correct spellings using locale preferences for US or UK.
    # Default is to use a neutral variety of English.
    # Setting locale to US will correct the British spelling of 'colour' to 'color'.
    locale: US
    ignore-words:
    - cancelled
  lll:
    # max line length, lines longer will be reported. Default is 120.
    # '\t' is counted as 1 character by default, and can be changed with the tab-width option
    line-length: 160
    # tab width in spaces. Default to 1.
    tab-width: 1
  unused:
    # treat code as a program (not a library) and report unused exported identifiers; default is false.
    # XXX: if you enable this setting, unused will report a lot of false-positives in text editors:
    # if it's called for subdir of a project it can't find funcs usages. All text editor integrations
    # with golangci-lint call it on a directory with the changed file.
    check-exported: false
  unparam:
    # call graph construction algorithm (cha, rta). In general, use cha for libraries,
    # and rta for programs with main packages. Default is cha.
    algo: cha

    # Inspect exported functions, default is false. Set to true if no external program/library imports your code.
    # XXX: if you enable this setting, unparam will report a lot of false-positives in text editors:
    # if it's called for subdir of a project it can't find external interfaces. All text editor integrations
    # with golangci-lint call it on a directory with the changed file.
    check-exported: false
  gocritic:
    enabled-checks:
      - appendCombine
      - argOrder
      - assignOp
      - badCond
      - boolExprSimplify
      - builtinShadow
      - captLocal
      - caseOrder
      - codegenComment
      - commentedOutCode
      - commentedOutImport
      - defaultCaseOrder
      - deprecatedComment
      - docStub
      - dupArg
      - dupBranchBody
      - dupCase
      - dupSubExpr
      - elseif
      - emptyFallthrough
      - equalFold
      - flagDeref
      - flagName
      - hexLiteral
      - indexAlloc
      - initClause
      - methodExprCall
      - nilValReturn
      - octalLiteral
      - offBy1
      - rangeExprCopy
      - regexpMust
      - sloppyLen
      - stringXbytes
      - switchTrue
      - typeAssertChain
      - typeSwitchVar
      - typeUnparen
      - underef
      - unlambda
      - unnecessaryBlock
      - unslice
      - valSwap
      - weakCond

      # Unused
      # - yodaStyleExpr
      # - appendAssign
      # - commentFormatting
      # - emptyStringTest
      # - exitAfterDefer
      # - ifElseChain
      # - hugeParam
      # - importShadow
      # - nestingReduce
      # - paramTypeCombine
      # - ptrToRefParam
      # - rangeValCopy
      # - singleCaseSwitch
      # - sloppyReassign
      # - unlabelStmt
      # - unnamedResult
      # - wrapperFunc

issues:
  # List of regexps of issue texts to exclude, empty list by default.
  # But independently from this option we use default exclude patterns,
  # it can be disabled by `exclude-use-default: false`. To list all
  # excluded by default patterns execute `golangci-lint run --help`
  exclude:
    - composite literal uses unkeyed fields

  exclude-rules:
    # Exclude some linters from running on test files.
    - path: _test\.go$|^tests/|^samples/
      linters:
        - errcheck
        - maligned

  # Independently from option `exclude` we use default exclude patterns,
  # it can be disabled by this option. To list all
  # excluded by default patterns execute `golangci-lint run --help`.
  # Default value for this option is true.
  exclude-use-default: true

  # Maximum issues count per one linter. Set to 0 to disable. Default is 50.
  max-per-linter: 0

  # Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
  max-same-issues: 0
Go environment
$ go version && go env
1.13

In our CI, we ran the same commit multiple times, and got different results

  1. Failed https://prow.istio.io/view/gcs/istio-prow/pr-logs/pull/istio_istio/18520/lint_istio/3431
  2. Passed https://prow.istio.io/view/gcs/istio-prow/pr-logs/pull/istio_istio/18520/lint_istio/3435
  3. Passed https://prow.istio.io/view/gcs/istio-prow/pr-logs/pull/istio_istio/18520/lint_istio/3432

Since it merged, some others have passed:

https://prow.istio.io/view/gcs/istio-prow/logs/lint_istio_postsubmit/422
https://prow.istio.io/view/gcs/istio-prow/logs/lint_istio_postsubmit/423

and some have failed

https://prow.istio.io/view/gcs/istio-prow/pr-logs/pull/istio_istio/18571/lint_istio/3452
https://prow.istio.io/view/gcs/istio-prow/pr-logs/pull/istio_istio/18512/lint_istio/3453

All of the ones that pass warn that they are skipping some linter:

level=warning msg="[runner] Can't run linter goanalysis_metalinter: fact_purity: failed prerequisites: [email protected]/istio/pilot/pkg/config/memory [istio.io/istio/pilot/pkg/model.test]"
level=warning msg="[runner] Can't run linter goanalysis_metalinter: fact_deprecated: failed prerequisites: [email protected]/istio/pilot/pkg/config/memory [istio.io/istio/pilot/pkg/model.test], [email protected]/istio/pilot/pkg/serviceregistry/memory [istio.io/istio/pilot/pkg/model.test], [email protected]/istio/pilot/test/mock [istio.io/istio/pilot/pkg/model.test]"
level=warning msg="[runner] Can't run linter goanalysis_metalinter: ctrlflow: failed prerequisites: [email protected]/istio/pilot/pkg/config/memory [istio.io/istio/pilot/pkg/model.test]"

And all the ones that fail do not have these messages

howardjohn added a commit to howardjohn/istio that referenced this issue Nov 2, 2019
Opened golangci/golangci-lint#840 to
investigate why linter is nondeterministic now
istio-testing pushed a commit to istio/istio that referenced this issue Nov 2, 2019
Opened golangci/golangci-lint#840 to
investigate why linter is nondeterministic now
howardjohn added a commit to howardjohn/istio that referenced this issue Nov 4, 2019
See issue golangci/golangci-lint#840

A low cost fix here is to run `fmt` as part of the gen, which will then
be checked by gencheck.

Also tidy up the tidy-go target usage a bit.
istio-testing pushed a commit to istio/istio that referenced this issue Nov 5, 2019
See issue golangci/golangci-lint#840

A low cost fix here is to run `fmt` as part of the gen, which will then
be checked by gencheck.

Also tidy up the tidy-go target usage a bit.
@howardjohn
Copy link
Author

I am not certain but I think the root cause is #866

@tpounds tpounds added the bug Something isn't working label Nov 23, 2019
@howardjohn
Copy link
Author

I am pretty sure #866 is not exactly the same, although they may be related. We are still seeing this even though our build passes. Another example, two CI runs of the same code:

https://prow.istio.io/view/gcs/istio-prow/pr-logs/pull/istio_istio/19217/lint_istio/4405
https://prow.istio.io/view/gcs/istio-prow/pr-logs/pull/istio_istio/19217/lint_istio/4406

howardjohn added a commit to howardjohn/istio that referenced this issue Nov 27, 2019
istio#19174 somehow got a linter error
merged due to golangci/golangci-lint#840.

This resolves the error
istio-testing pushed a commit to istio/istio that referenced this issue Nov 27, 2019
#19174 somehow got a linter error
merged due to golangci/golangci-lint#840.

This resolves the error
@howardjohn
Copy link
Author

Originally I could only reproduce in our CI as well, now I can do so locally.

$ docker run -t -i --sig-proxy=true -u 576696:996 --rm -e IN_BUILD_CONTAINER=1 -e TZ=America/Los_Angeles -e TARGET_ARCH=amd64 -e TARGET_OS=linux -e TARGET_OUT=/work/out/linux_amd64 -e USER=howardjohn -v /etc/passwd:/etc/passwd:ro -v /var/run/docker.sock:/var/run/docker.sock --mount type=bind,source=/usr/local/google/home/howardjohn/go/src/istio.io/istio,destination=/work --mount type=volume,source=go,destination=/go --mount type=volume,source=gocache,destination=/gocache --mount type=bind,source=/usr/local/google/home/howardjohn/.docker,destination=/config/.docker,readonly --mount type=bind,source=/usr/local/google/home/howardjohn/.config/gcloud,destination=/config/.config/gcloud,readonly -w /work gcr.io/istio-testing/build-tools:master-2019-11-14T12-01-13 make --no-print-directory -e -f Makefile.core.mk lint-go
$ docker run -t -i --sig-proxy=true -u 576696:996 --rm -e IN_BUILD_CONTAINER=1 -e TZ=America/Los_Angeles -e TARGET_ARCH=amd64 -e TARGET_OS=linux -e TARGET_OUT=/work/out/linux_amd64 -e USER=howardjohn -v /etc/passwd:/etc/passwd:ro -v /var/run/docker.sock:/var/run/docker.sock --mount type=bind,source=/usr/local/google/home/howardjohn/go/src/istio.io/istio,destination=/work --mount type=volume,source=go,destination=/go --mount type=volume,source=gocache,destination=/gocache --mount type=bind,source=/usr/local/google/home/howardjohn/.docker,destination=/config/.docker,readonly --mount type=bind,source=/usr/local/google/home/howardjohn/.config/gcloud,destination=/config/.config/gcloud,readonly -w /work gcr.io/istio-testing/build-tools:master-2019-11-14T12-01-13 make --no-print-directory -e -f Makefile.core.mk lint-go
WARN [runner] Can't run linter goanalysis_metalinter: ctrlflow: failed prerequisites: [email protected]/istio/pilot/pkg/config/memory [istio.io/istio/pilot/pkg/model.test]

All the noise with the docker run command was just to more closely simulate what is going on in CI

@howardjohn
Copy link
Author

$ for i in {1..100}; do docker run -v "${PWD}":"${PWD}" -w "${PWD}" -e GOPATH=$GOPATH golangci/golangci-lint:v1.21 golangci-lint run -c ./common/config/.golangci.yml ./pilot/...; echo "done $i"; done
level=warning msg="[runner] Can't run linter goanalysis_metalinter: fact_deprecated: failed prerequisites: [email protected]/istio/pkg/kube/inject"
done 1
done 2
level=warning msg="[runner] Can't run linter goanalysis_metalinter: fact_deprecated: failed prerequisites: [email protected]/istio/pkg/kube/inject"
done 3
level=warning msg="[runner] Can't run linter goanalysis_metalinter: ctrlflow: failed prerequisites: [email protected]/istio/pkg/kube/inject"
done 4
level=warning msg="[runner] Can't run linter goanalysis_metalinter: fact_deprecated: failed prerequisites: [email protected]/istio/pkg/kube/inject"

Can be reproduced on master branch of https://github.com/istio/istio. Specifically I ran at 5803182856ec3a831529586e8ac265c17f417bf4 but probably similar regardless of cmmit

@howardjohn
Copy link
Author

I added some additional logging to a local build to output the errors:

WARN [runner/goanalysis_metalinter/goanalysis] Logging err: analysis skipped: errors in package: [/usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/config/memory/controller.go:62:9: cannot use c.configStore.ConfigDescriptor() (value of type schema.Set) as schema.Set value in return statement /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/config/memory/controller.go:37:9: cannot use out (variable of type *controller) as model.ConfigStoreCache value in return statement: wrong type for method ConfigDescriptor /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/config/memory/config.go:165:31: cannot use tnow (variable of type time.Time) as time.Time value in assignment /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/config/memory/config.go:52:9: cannot use &out (value of type *store) as model.ConfigStore value in return statement: wrong type for method ConfigDescriptor]
WARN [runner/goanalysis_metalinter/goanalysis] Logging err: analysis skipped: errors in package: [/usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/config/memory/controller.go:62:9: cannot use c.configStore.ConfigDescriptor() (value of type schema.Set) as schema.Set value in return statement /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/config/memory/controller.go:37:9: cannot use out (variable of type *controller) as model.ConfigStoreCache value in return statement: wrong type for method ConfigDescriptor /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/config/memory/config.go:165:31: cannot use tnow (variable of type time.Time) as time.Time value in assignment /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/config/memory/config.go:52:9: cannot use &out (value of type *store) as model.ConfigStore value in return statement: wrong type for method ConfigDescriptor]
WARN [runner/goanalysis_metalinter/goanalysis] Logging err: analysis skipped: errors in package: [/usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/config/memory/controller.go:62:9: cannot use c.configStore.ConfigDescriptor() (value of type schema.Set) as schema.Set value in return statement /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/config/memory/controller.go:37:9: cannot use out (variable of type *controller) as model.ConfigStoreCache value in return statement: wrong type for method ConfigDescriptor /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/config/memory/config.go:165:31: cannot use tnow (variable of type time.Time) as time.Time value in assignment /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/config/memory/config.go:52:9: cannot use &out (value of type *store) as model.ConfigStore value in return statement: wrong type for method ConfigDescriptor]
WARN [runner/goanalysis_metalinter/goanalysis] Logging err: analysis skipped: errors in package: [/usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery_mock.go:55:4: cannot use HelloService.Hostname (variable of type host.Name) as host.Name value in map literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery_mock.go:56:4: cannot use WorldService.Hostname (variable of type host.Name) as host.Name value in map literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery_mock.go:57:4: cannot use ExtHTTPService.Hostname (variable of type host.Name) as host.Name value in map literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery_mock.go:60:4: cannot use ExtHTTPSService.Hostname (variable of type host.Name) as host.Name value in map literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:250:13: cannot use protocol.HTTP (constant "HTTP" of type protocol.Instance) as protocol.Instance value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:254:13: cannot use protocol.TCP (constant "TCP" of type protocol.Instance) as protocol.Instance value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:195:26: cannot use svc.Hostname (variable of type host.Name) as host.Name value in map index /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:96:17: cannot use time.Now() (value of type time.Time) as time.Time value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:97:17: cannot use hostname (variable of type host.Name) as host.Name value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:103:14: cannot use protocol.HTTPS (constant "HTTPS" of type protocol.Instance) as protocol.Instance value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:81:17: cannot use time.Now() (value of type time.Time) as time.Time value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:82:17: cannot use hostname (variable of type host.Name) as host.Name value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:88:14: cannot use protocol.HTTP (constant "HTTP" of type protocol.Instance) as protocol.Instance value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:45:17: cannot use time.Now() (value of type time.Time) as time.Time value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:46:17: cannot use hostname (variable of type host.Name) as host.Name value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:52:15: cannot use protocol.HTTP (constant "HTTP" of type protocol.Instance) as protocol.Instance value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:56:15: cannot use protocol.HTTP (constant "HTTP" of type protocol.Instance) as protocol.Instance value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:60:15: cannot use protocol.TCP (constant "TCP" of type protocol.Instance) as protocol.Instance value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:64:15: cannot use protocol.Mongo (constant "Mongo" of type protocol.Instance) as protocol.Instance value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:68:15: cannot use protocol.Redis (constant "Redis" of type protocol.Instance) as protocol.Instance value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:72:15: cannot use protocol.MySQL (constant "MySQL" of type protocol.Instance) as protocol.Instance value in struct literal]
WARN [runner/goanalysis_metalinter/goanalysis] Logging err: analysis skipped: errors in package: [/usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery_mock.go:55:4: cannot use HelloService.Hostname (variable of type host.Name) as host.Name value in map literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery_mock.go:56:4: cannot use WorldService.Hostname (variable of type host.Name) as host.Name value in map literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery_mock.go:57:4: cannot use ExtHTTPService.Hostname (variable of type host.Name) as host.Name value in map literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery_mock.go:60:4: cannot use ExtHTTPSService.Hostname (variable of type host.Name) as host.Name value in map literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:250:13: cannot use protocol.HTTP (constant "HTTP" of type protocol.Instance) as protocol.Instance value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:254:13: cannot use protocol.TCP (constant "TCP" of type protocol.Instance) as protocol.Instance value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:195:26: cannot use svc.Hostname (variable of type host.Name) as host.Name value in map index /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:96:17: cannot use time.Now() (value of type time.Time) as time.Time value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:97:17: cannot use hostname (variable of type host.Name) as host.Name value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:103:14: cannot use protocol.HTTPS (constant "HTTPS" of type protocol.Instance) as protocol.Instance value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:81:17: cannot use time.Now() (value of type time.Time) as time.Time value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:82:17: cannot use hostname (variable of type host.Name) as host.Name value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:88:14: cannot use protocol.HTTP (constant "HTTP" of type protocol.Instance) as protocol.Instance value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:45:17: cannot use time.Now() (value of type time.Time) as time.Time value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:46:17: cannot use hostname (variable of type host.Name) as host.Name value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:52:15: cannot use protocol.HTTP (constant "HTTP" of type protocol.Instance) as protocol.Instance value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:56:15: cannot use protocol.HTTP (constant "HTTP" of type protocol.Instance) as protocol.Instance value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:60:15: cannot use protocol.TCP (constant "TCP" of type protocol.Instance) as protocol.Instance value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:64:15: cannot use protocol.Mongo (constant "Mongo" of type protocol.Instance) as protocol.Instance value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:68:15: cannot use protocol.Redis (constant "Redis" of type protocol.Instance) as protocol.Instance value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:72:15: cannot use protocol.MySQL (constant "MySQL" of type protocol.Instance) as protocol.Instance value in struct literal]
WARN [runner/goanalysis_metalinter/goanalysis] Logging err: analysis skipped: errors in package: [/usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery_mock.go:55:4: cannot use HelloService.Hostname (variable of type host.Name) as host.Name value in map literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery_mock.go:56:4: cannot use WorldService.Hostname (variable of type host.Name) as host.Name value in map literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery_mock.go:57:4: cannot use ExtHTTPService.Hostname (variable of type host.Name) as host.Name value in map literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery_mock.go:60:4: cannot use ExtHTTPSService.Hostname (variable of type host.Name) as host.Name value in map literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:250:13: cannot use protocol.HTTP (constant "HTTP" of type protocol.Instance) as protocol.Instance value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:254:13: cannot use protocol.TCP (constant "TCP" of type protocol.Instance) as protocol.Instance value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:195:26: cannot use svc.Hostname (variable of type host.Name) as host.Name value in map index /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:96:17: cannot use time.Now() (value of type time.Time) as time.Time value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:97:17: cannot use hostname (variable of type host.Name) as host.Name value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:103:14: cannot use protocol.HTTPS (constant "HTTPS" of type protocol.Instance) as protocol.Instance value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:81:17: cannot use time.Now() (value of type time.Time) as time.Time value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:82:17: cannot use hostname (variable of type host.Name) as host.Name value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:88:14: cannot use protocol.HTTP (constant "HTTP" of type protocol.Instance) as protocol.Instance value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:45:17: cannot use time.Now() (value of type time.Time) as time.Time value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:46:17: cannot use hostname (variable of type host.Name) as host.Name value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:52:15: cannot use protocol.HTTP (constant "HTTP" of type protocol.Instance) as protocol.Instance value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:56:15: cannot use protocol.HTTP (constant "HTTP" of type protocol.Instance) as protocol.Instance value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:60:15: cannot use protocol.TCP (constant "TCP" of type protocol.Instance) as protocol.Instance value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:64:15: cannot use protocol.Mongo (constant "Mongo" of type protocol.Instance) as protocol.Instance value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:68:15: cannot use protocol.Redis (constant "Redis" of type protocol.Instance) as protocol.Instance value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/serviceregistry/memory/discovery.go:72:15: cannot use protocol.MySQL (constant "MySQL" of type protocol.Instance) as protocol.Instance value in struct literal]
WARN [runner/goanalysis_metalinter/goanalysis] Logging err: analysis skipped: errors in package: [/usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/test/mock/config.go:256:24: cannot use (time.Time literal) (value of type time.Time) as time.Time value in assignment /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/test/mock/config.go:257:24: cannot use (time.Time literal) (value of type time.Time) as time.Time value in assignment]
WARN [runner/goanalysis_metalinter/goanalysis] Logging err: analysis skipped: errors in package: [/usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/test/mock/config.go:256:24: cannot use (time.Time literal) (value of type time.Time) as time.Time value in assignment /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/test/mock/config.go:257:24: cannot use (time.Time literal) (value of type time.Time) as time.Time value in assignment]
WARN [runner/goanalysis_metalinter/goanalysis] Logging err: analysis skipped: errors in package: [/usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/test/mock/config.go:256:24: cannot use (time.Time literal) (value of type time.Time) as time.Time value in assignment /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/test/mock/config.go:257:24: cannot use (time.Time literal) (value of type time.Time) as time.Time value in assignment]
WARN [runner/goanalysis_metalinter/goanalysis] Logging err: analysis skipped: errors in package: [/usr/local/google/home/howardjohn/go/src/istio.io/istio/pkg/bootstrap/config.go:230:7: cannot use platEnv.Locality() (value of type *core.Locality) as *core.Locality value in assignment]
WARN [runner/goanalysis_metalinter/goanalysis] Logging err: analysis skipped: errors in package: [/usr/local/google/home/howardjohn/go/src/istio.io/istio/pkg/bootstrap/config.go:230:7: cannot use platEnv.Locality() (value of type *core.Locality) as *core.Locality value in assignment]
WARN [runner/goanalysis_metalinter/goanalysis] Logging err: analysis skipped: errors in package: [/usr/local/google/home/howardjohn/go/src/istio.io/istio/pkg/bootstrap/config.go:230:7: cannot use platEnv.Locality() (value of type *core.Locality) as *core.Locality value in assignment]
WARN [runner/goanalysis_metalinter/goanalysis] Logging err: analysis skipped: errors in package: [/usr/local/google/home/howardjohn/go/src/istio.io/istio/pkg/envoy/proxy.go:33:2: could not import istio.io/istio/pkg/bootstrap (/usr/local/google/home/howardjohn/go/src/istio.io/istio/pkg/bootstrap/config.go:230:7: cannot use platEnv.Locality() (value of type *core.Locality) as *core.Locality value in assignment)]
WARN [runner/goanalysis_metalinter/goanalysis] Logging err: analysis skipped: errors in package: [/usr/local/google/home/howardjohn/go/src/istio.io/istio/pkg/envoy/proxy.go:33:2: could not import istio.io/istio/pkg/bootstrap (/usr/local/google/home/howardjohn/go/src/istio.io/istio/pkg/bootstrap/config.go:230:7: cannot use platEnv.Locality() (value of type *core.Locality) as *core.Locality value in assignment)]
WARN [runner/goanalysis_metalinter/goanalysis] Logging err: analysis skipped: errors in package: [/usr/local/google/home/howardjohn/go/src/istio.io/istio/mixer/test/client/env/envoy.go:26:2: could not import istio.io/istio/pkg/envoy (/usr/local/google/home/howardjohn/go/src/istio.io/istio/pkg/envoy/proxy.go:33:2: could not import istio.io/istio/pkg/bootstrap (/usr/local/google/home/howardjohn/go/src/istio.io/istio/pkg/bootstrap/config.go:230:7: cannot use platEnv.Locality() (value of type *core.Locality) as *core.Locality value in assignment)) /usr/local/google/home/howardjohn/go/src/istio.io/istio/mixer/test/client/env/mixer_filter_config.go:179:56: cannot use &(duration.Duration literal) (value of type *duration.Duration) as *duration.Duration value in assignment /usr/local/google/home/howardjohn/go/src/istio.io/istio/mixer/test/client/env/mixer_filter_config.go:185:55: cannot use &(duration.Duration literal) (value of type *duration.Duration) as *duration.Duration value in assignment /usr/local/google/home/howardjohn/go/src/istio.io/istio/mixer/test/client/env/mixer_filter_config.go:166:27: cannot use &(duration.Duration literal) (value of type *duration.Duration) as *duration.Duration value in assignment]
WARN [runner/goanalysis_metalinter/goanalysis] Logging err: analysis skipped: errors in package: [/usr/local/google/home/howardjohn/go/src/istio.io/istio/mixer/test/client/env/envoy.go:26:2: could not import istio.io/istio/pkg/envoy (/usr/local/google/home/howardjohn/go/src/istio.io/istio/pkg/envoy/proxy.go:33:2: could not import istio.io/istio/pkg/bootstrap (/usr/local/google/home/howardjohn/go/src/istio.io/istio/pkg/bootstrap/config.go:230:7: cannot use platEnv.Locality() (value of type *core.Locality) as *core.Locality value in assignment)) /usr/local/google/home/howardjohn/go/src/istio.io/istio/mixer/test/client/env/mixer_filter_config.go:179:56: cannot use &(duration.Duration literal) (value of type *duration.Duration) as *duration.Duration value in assignment /usr/local/google/home/howardjohn/go/src/istio.io/istio/mixer/test/client/env/mixer_filter_config.go:185:55: cannot use &(duration.Duration literal) (value of type *duration.Duration) as *duration.Duration value in assignment /usr/local/google/home/howardjohn/go/src/istio.io/istio/mixer/test/client/env/mixer_filter_config.go:166:27: cannot use &(duration.Duration literal) (value of type *duration.Duration) as *duration.Duration value in assignment]
WARN [runner/goanalysis_metalinter/goanalysis] Logging err: analysis skipped: errors in package: [/usr/local/google/home/howardjohn/go/src/istio.io/istio/pkg/kube/inject/webhook.go:111:13: cannot use meshConfig (variable of type *v1alpha1.MeshConfig) as *v1alpha1.MeshConfig value in return statement /usr/local/google/home/howardjohn/go/src/istio.io/istio/pkg/kube/inject/app_probe.go:155:18: cannot use h (variable of type *v1.HTTPGetAction) as *v1.HTTPGetAction value in assignment /usr/local/google/home/howardjohn/go/src/istio.io/istio/pkg/kube/inject/app_probe.go:158:17: cannot use h (variable of type *v1.HTTPGetAction) as *v1.HTTPGetAction value in assignment]
WARN [runner/goanalysis_metalinter/goanalysis] Logging err: analysis skipped: errors in package: [/usr/local/google/home/howardjohn/go/src/istio.io/istio/pkg/kube/inject/webhook.go:111:13: cannot use meshConfig (variable of type *v1alpha1.MeshConfig) as *v1alpha1.MeshConfig value in return statement /usr/local/google/home/howardjohn/go/src/istio.io/istio/pkg/kube/inject/app_probe.go:155:18: cannot use h (variable of type *v1.HTTPGetAction) as *v1.HTTPGetAction value in assignment /usr/local/google/home/howardjohn/go/src/istio.io/istio/pkg/kube/inject/app_probe.go:158:17: cannot use h (variable of type *v1.HTTPGetAction) as *v1.HTTPGetAction value in assignment]
WARN [runner/goanalysis_metalinter/goanalysis] Logging err: analysis skipped: errors in package: [/usr/local/google/home/howardjohn/go/src/istio.io/istio/pkg/kube/inject/webhook.go:111:13: cannot use meshConfig (variable of type *v1alpha1.MeshConfig) as *v1alpha1.MeshConfig value in return statement /usr/local/google/home/howardjohn/go/src/istio.io/istio/pkg/kube/inject/app_probe.go:155:18: cannot use h (variable of type *v1.HTTPGetAction) as *v1.HTTPGetAction value in assignment /usr/local/google/home/howardjohn/go/src/istio.io/istio/pkg/kube/inject/app_probe.go:158:17: cannot use h (variable of type *v1.HTTPGetAction) as *v1.HTTPGetAction value in assignment]
WARN [runner/goanalysis_metalinter/goanalysis] Logging err: analysis skipped: errors in package: [/usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/sidecarinjector.go:22:2: could not import istio.io/istio/pkg/kube/inject (/usr/local/google/home/howardjohn/go/src/istio.io/istio/pkg/kube/inject/webhook.go:111:13: cannot use meshConfig (variable of type *v1alpha1.MeshConfig) as *v1alpha1.MeshConfig value in return statement) /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/servicecontroller.go:102:35: cannot use (map[host.Name]*model.Service literal) (value of type map[host.Name]*model.Service) as map[host.Name]*model.Service value in argument to memory.NewDiscovery /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/servicecontroller.go:83:42: cannot use s.kubeClient (variable of type kubernetes.Interface) as kubernetes.Interface value in argument to kubecontroller.NewController: wrong type for method AdmissionregistrationV1 /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/server.go:415:28: cannot use s.secureGRPCServer (variable of type *grpc.Server) as *grpc.Server value in argument to s.EnvoyXdsServer.Register /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/server.go:379:28: cannot use s.grpcServer (variable of type *grpc.Server) as *grpc.Server value in argument to s.EnvoyXdsServer.Register /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/server.go:228:21: cannot use s.mesh (variable of type *v1alpha1.MeshConfig) as *v1alpha1.MeshConfig value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/server.go:229:21: cannot use s.meshNetworks (variable of type *v1alpha1.MeshNetworks) as *v1alpha1.MeshNetworks value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/server.go:237:29: cannot use s.mux (variable of type *http.ServeMux) as *http.ServeMux value in argument to s.EnvoyXdsServer.InitDebug /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/server.go:247:36: cannot use s.meshNetworks (variable of type *v1alpha1.MeshNetworks) as *v1alpha1.MeshNetworks value in argument to s.kubeRegistry.InitNetworkLookup /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/multicluster.go:27:46: cannot use s.kubeClient (variable of type kubernetes.Interface) as kubernetes.Interface value in argument to clusterregistry.NewMulticluster: wrong type for method AdmissionregistrationV1 /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/multicluster.go:34:4: cannot use s.meshNetworks (variable of type *v1alpha1.MeshNetworks) as *v1alpha1.MeshNetworks value in argument to clusterregistry.NewMulticluster /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/mesh.go:130:19: cannot use meshNetworks (variable of type *v1alpha1.MeshNetworks) as *v1alpha1.MeshNetworks value in assignment /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/mesh.go:144:21: cannot use meshNetworks (variable of type *v1alpha1.MeshNetworks) as *v1alpha1.MeshNetworks value in assignment /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/mesh.go:63:21: cannot use cmd.ReadMeshConfig(args.Mesh.ConfigFile) (value of type *v1alpha1.MeshConfig) as *v1alpha1.MeshConfig value in assignment /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/mesh.go:71:22: cannot use cmd.ReadMeshConfig(args.Mesh.ConfigFile) (value of type *v1alpha1.MeshConfig) as *v1alpha1.MeshConfig value in assignment /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/mesh.go:84:34: cannot use meshConfig (variable of type *v1alpha1.MeshConfig) as *v1alpha1.MeshConfig value in assignment /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/configcontroller.go:371:57: cannot use schemas.Istio (variable of type schema.Set) as schema.Set value in argument to configmonitor.NewFileSnapshot /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/configcontroller.go:372:76: cannot use FilepathWalkInterval (variable of type time.Duration) as time.Duration value in argument to configmonitor.NewMonitor /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/configcontroller.go:355:72: cannot use schemas.Istio (variable of type schema.Set) as schema.Set value in argument to controller.NewClient /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/configcontroller.go:343:13: cannot use controller (variable of type coredatamodel.CoreDataModel) as sink.Updater value in struct literal: wrong type for method Apply /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/configcontroller.go:310:22: cannot use mcpController (variable of type coredatamodel.CoreDataModel) as sink.Updater value in struct literal: wrong type for method Apply /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/configcontroller.go:144:36: cannot use schemas.Istio (variable of type schema.Set) as schema.Set value in argument to memory.MakeWithLedger /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/configcontroller.go:65:24: cannot use schemas.Istio (variable of type schema.Set) as schema.Set value in argument to memory.Make /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/configcontroller.go:88:26: cannot use s.kubeClient (variable of type kubernetes.Interface) as kubernetes.Interface value in argument to ingress.NewController: wrong type for method AdmissionregistrationV1 /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/configcontroller.go:88:40: cannot use s.mesh (variable of type *v1alpha1.MeshConfig) as *v1alpha1.MeshConfig value in argument to ingress.NewController /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/configcontroller.go:97:58: cannot use s.mesh (variable of type *v1alpha1.MeshConfig) as *v1alpha1.MeshConfig value in argument to ingress.NewStatusSyncer /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/configcontroller.go:97:66: cannot use s.kubeClient (variable of type kubernetes.Interface) as kubernetes.Interface value in argument to ingress.NewStatusSyncer: wrong type for method AdmissionregistrationV1]
WARN [runner/goanalysis_metalinter/goanalysis] Logging err: analysis skipped: errors in package: [/usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/sidecarinjector.go:22:2: could not import istio.io/istio/pkg/kube/inject (/usr/local/google/home/howardjohn/go/src/istio.io/istio/pkg/kube/inject/webhook.go:111:13: cannot use meshConfig (variable of type *v1alpha1.MeshConfig) as *v1alpha1.MeshConfig value in return statement) /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/servicecontroller.go:102:35: cannot use (map[host.Name]*model.Service literal) (value of type map[host.Name]*model.Service) as map[host.Name]*model.Service value in argument to memory.NewDiscovery /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/servicecontroller.go:83:42: cannot use s.kubeClient (variable of type kubernetes.Interface) as kubernetes.Interface value in argument to kubecontroller.NewController: wrong type for method AdmissionregistrationV1 /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/server.go:415:28: cannot use s.secureGRPCServer (variable of type *grpc.Server) as *grpc.Server value in argument to s.EnvoyXdsServer.Register /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/server.go:379:28: cannot use s.grpcServer (variable of type *grpc.Server) as *grpc.Server value in argument to s.EnvoyXdsServer.Register /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/server.go:228:21: cannot use s.mesh (variable of type *v1alpha1.MeshConfig) as *v1alpha1.MeshConfig value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/server.go:229:21: cannot use s.meshNetworks (variable of type *v1alpha1.MeshNetworks) as *v1alpha1.MeshNetworks value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/server.go:237:29: cannot use s.mux (variable of type *http.ServeMux) as *http.ServeMux value in argument to s.EnvoyXdsServer.InitDebug /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/server.go:247:36: cannot use s.meshNetworks (variable of type *v1alpha1.MeshNetworks) as *v1alpha1.MeshNetworks value in argument to s.kubeRegistry.InitNetworkLookup /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/multicluster.go:27:46: cannot use s.kubeClient (variable of type kubernetes.Interface) as kubernetes.Interface value in argument to clusterregistry.NewMulticluster: wrong type for method AdmissionregistrationV1 /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/multicluster.go:34:4: cannot use s.meshNetworks (variable of type *v1alpha1.MeshNetworks) as *v1alpha1.MeshNetworks value in argument to clusterregistry.NewMulticluster /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/mesh.go:130:19: cannot use meshNetworks (variable of type *v1alpha1.MeshNetworks) as *v1alpha1.MeshNetworks value in assignment /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/mesh.go:144:21: cannot use meshNetworks (variable of type *v1alpha1.MeshNetworks) as *v1alpha1.MeshNetworks value in assignment /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/mesh.go:63:21: cannot use cmd.ReadMeshConfig(args.Mesh.ConfigFile) (value of type *v1alpha1.MeshConfig) as *v1alpha1.MeshConfig value in assignment /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/mesh.go:71:22: cannot use cmd.ReadMeshConfig(args.Mesh.ConfigFile) (value of type *v1alpha1.MeshConfig) as *v1alpha1.MeshConfig value in assignment /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/mesh.go:84:34: cannot use meshConfig (variable of type *v1alpha1.MeshConfig) as *v1alpha1.MeshConfig value in assignment /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/configcontroller.go:371:57: cannot use schemas.Istio (variable of type schema.Set) as schema.Set value in argument to configmonitor.NewFileSnapshot /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/configcontroller.go:372:76: cannot use FilepathWalkInterval (variable of type time.Duration) as time.Duration value in argument to configmonitor.NewMonitor /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/configcontroller.go:355:72: cannot use schemas.Istio (variable of type schema.Set) as schema.Set value in argument to controller.NewClient /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/configcontroller.go:343:13: cannot use controller (variable of type coredatamodel.CoreDataModel) as sink.Updater value in struct literal: wrong type for method Apply /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/configcontroller.go:310:22: cannot use mcpController (variable of type coredatamodel.CoreDataModel) as sink.Updater value in struct literal: wrong type for method Apply /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/configcontroller.go:144:36: cannot use schemas.Istio (variable of type schema.Set) as schema.Set value in argument to memory.MakeWithLedger /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/configcontroller.go:65:24: cannot use schemas.Istio (variable of type schema.Set) as schema.Set value in argument to memory.Make /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/configcontroller.go:88:26: cannot use s.kubeClient (variable of type kubernetes.Interface) as kubernetes.Interface value in argument to ingress.NewController: wrong type for method AdmissionregistrationV1 /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/configcontroller.go:88:40: cannot use s.mesh (variable of type *v1alpha1.MeshConfig) as *v1alpha1.MeshConfig value in argument to ingress.NewController /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/configcontroller.go:97:58: cannot use s.mesh (variable of type *v1alpha1.MeshConfig) as *v1alpha1.MeshConfig value in argument to ingress.NewStatusSyncer /usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/configcontroller.go:97:66: cannot use s.kubeClient (variable of type kubernetes.Interface) as kubernetes.Interface value in argument to ingress.NewStatusSyncer: wrong type for method AdmissionregistrationV1]
WARN [runner/goanalysis_metalinter/goanalysis] Logging err: analysis skipped: errors in package: [/usr/local/google/home/howardjohn/go/src/istio.io/istio/tests/util/pilot_server.go:27:2: could not import istio.io/istio/pilot/pkg/bootstrap (/usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/sidecarinjector.go:22:2: could not import istio.io/istio/pkg/kube/inject (/usr/local/google/home/howardjohn/go/src/istio.io/istio/pkg/kube/inject/webhook.go:111:13: cannot use meshConfig (variable of type *v1alpha1.MeshConfig) as *v1alpha1.MeshConfig value in return statement))]
WARN [runner/goanalysis_metalinter/goanalysis] Logging err: analysis skipped: errors in package: [/usr/local/google/home/howardjohn/go/src/istio.io/istio/tests/util/pilot_server.go:27:2: could not import istio.io/istio/pilot/pkg/bootstrap (/usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/bootstrap/sidecarinjector.go:22:2: could not import istio.io/istio/pkg/kube/inject (/usr/local/google/home/howardjohn/go/src/istio.io/istio/pkg/kube/inject/webhook.go:111:13: cannot use meshConfig (variable of type *v1alpha1.MeshConfig) as *v1alpha1.MeshConfig value in return statement))]
WARN [runner/goanalysis_metalinter/goanalysis] Logging err: analysis skipped: errors in package: [/usr/local/google/home/howardjohn/go/src/istio.io/istio/tests/util/pilot_server.go:101:22: cannot use &meshConfig (value of type *v1alpha1.MeshConfig) as *v1alpha1.MeshConfig value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/tests/util/pilot_server.go:103:22: cannot use keepalive.DefaultOption() (value of type *keepalive.Options) as *keepalive.Options value in struct literal]
WARN [runner/goanalysis_metalinter/goanalysis] Logging err: analysis skipped: errors in package: [/usr/local/google/home/howardjohn/go/src/istio.io/istio/tests/util/pilot_server.go:101:22: cannot use &meshConfig (value of type *v1alpha1.MeshConfig) as *v1alpha1.MeshConfig value in struct literal /usr/local/google/home/howardjohn/go/src/istio.io/istio/tests/util/pilot_server.go:103:22: cannot use keepalive.DefaultOption() (value of type *keepalive.Options) as *keepalive.Options value in struct literal]
WARN [runner] Can't run linter goanalysis_metalinter: ctrlflow: howardjohn failed prerequisites: [email protected]/istio/pkg/kube/inject

The diff to get this:

diff --git a/pkg/golinters/goanalysis/runner.go b/pkg/golinters/goanalysis/runner.go
index 5d8470d..00031a1 100644
--- a/pkg/golinters/goanalysis/runner.go
+++ b/pkg/golinters/goanalysis/runner.go
@@ -571,6 +571,9 @@ func (act *action) analyze() {
                        debugf("%s: run analyzer in %s", act, analyzedIn)
                }
        }
+       if err != nil {
+               act.r.log.Warnf("Logging err: %s", err)
+       }
        act.err = err

        // disallow calls after Run

Basically it looks like there are a ton of errors, but the are all bogus - our project builds fine. I am thinking since there are some changes to run things in more parallel, now it is somehow not loading all the dependencies in the right order?

sdake pushed a commit to sdake/istio that referenced this issue Dec 1, 2019
Opened golangci/golangci-lint#840 to
investigate why linter is nondeterministic now
sdake pushed a commit to sdake/istio that referenced this issue Dec 1, 2019
See issue golangci/golangci-lint#840

A low cost fix here is to run `fmt` as part of the gen, which will then
be checked by gencheck.

Also tidy up the tidy-go target usage a bit.
sdake pushed a commit to sdake/istio that referenced this issue Dec 1, 2019
istio#19174 somehow got a linter error
merged due to golangci/golangci-lint#840.

This resolves the error
@yangwenmai
Copy link

+1 same problem

[WARN] golangci-lint ctrlflow: failed prerequisites

➜  ~ golangci-lint version
golangci-lint has version 1.21.0 built from 645e794 on 2019-10-15T18:15:04Z
➜  ~ go version
go version go1.13.5 darwin/amd64

@rchamarthy
Copy link

Anyone have a workaround for this issue? Build pipeline is not stable with this release.

@howardjohn
Copy link
Author

We ended up reverting back to an old version

@edaniels
Copy link

edaniels commented Jan 3, 2020

Same here. We're at github.com/golangci/golangci-lint v1.18.0 and it's stable.

@rchamarthy
Copy link

Same here. We're at github.com/golangci/golangci-lint v1.18.0 and it's stable.

Thank you @edaniels and @howardjohn for your replies. Does that work with golang 1.13.x? I moved to the latest version when i faced issues with 1.18.0 and golang 1.13.x

@edaniels
Copy link

edaniels commented Jan 3, 2020

Yep it's working fine on 1.13 specifically for us

@jkowalski
Copy link

As for the workaround - simple retry loop appears to be doing the trick - I just did this in my project and it stabilized the CI pipeline:

kopia/kopia@f690bd1

BTW. It's quite easy to reproduce this issue with latest v1.22.2 using master branch of http://github.com/kopia/kopia (simply make lint).

It appears to be reproducing more frequently when the compiler has more work to do. By changing any comment in repo/blob/storage.go I can make make lint fail 2 out of 5 times.

@ernado
Copy link
Member

ernado commented Jan 8, 2020

Please check the #885, should be the same issue.

jcharum added a commit to jcharum/bigslice that referenced this issue Jan 11, 2020
I believe we are affected by this bug:
golangci/golangci-lint#840.  1.19.1 is
reportedly not affected.
jcharum added a commit to jcharum/bigslice that referenced this issue Jan 11, 2020
I believe we are affected by this bug:
golangci/golangci-lint#840.  1.19.1 is
reportedly not affected.
@howardjohn
Copy link
Author

is there any updates on this? we can't use the new versions because of this but we can't use the old versions because they use 30gb+ memory and get OOM killed

k1eran added a commit to k1eran/onos-config that referenced this issue Jan 27, 2020
See golangci/golangci-lint#840

This issue seen intermittentily when building this repo using v1.23.1 or v1.21.0 of linter

Here is an example on macOS which shows intermittent problem with v1.21.0 ...

18:21 $ curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/v1.23.1/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.21.0
golangci/golangci-lint info checking GitHub for tag 'v1.21.0'
golangci/golangci-lint info found version: 1.21.0 for v1.21.0/darwin/amd64
golangci/golangci-lint info installed /Users/kmcpeake/go/bin/golangci-lint
18:22 $ golangci-lint cache clean
18:22 $ golangci-lint run --timeout 30m
18:22 $ golangci-lint cache clean
18:22 $ golangci-lint run --timeout 30m
WARN [runner] Can't run linter goanalysis_metalinter: fact_deprecated: failed prerequisites: [email protected]/onosproject/onos-test/pkg/onit/env
18:22 $ golangci-lint cache clean
18:23 $ golangci-lint run --timeout 30m
18:23 $ golangci-lint --version
golangci-lint has version 1.21.0 built from 645e794 on 2019-10-15T18:15:04Z

golangci-lint says v1.19.1 does not have this problem but reverting to
it highlights other go warnings than detected currently (plus it has
worse performance)
ray-milkey pushed a commit to onosproject/onos-config that referenced this issue Jan 27, 2020
See golangci/golangci-lint#840

This issue seen intermittentily when building this repo using v1.23.1 or v1.21.0 of linter

Here is an example on macOS which shows intermittent problem with v1.21.0 ...

18:21 $ curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/v1.23.1/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.21.0
golangci/golangci-lint info checking GitHub for tag 'v1.21.0'
golangci/golangci-lint info found version: 1.21.0 for v1.21.0/darwin/amd64
golangci/golangci-lint info installed /Users/kmcpeake/go/bin/golangci-lint
18:22 $ golangci-lint cache clean
18:22 $ golangci-lint run --timeout 30m
18:22 $ golangci-lint cache clean
18:22 $ golangci-lint run --timeout 30m
WARN [runner] Can't run linter goanalysis_metalinter: fact_deprecated: failed prerequisites: [email protected]/onosproject/onos-test/pkg/onit/env
18:22 $ golangci-lint cache clean
18:23 $ golangci-lint run --timeout 30m
18:23 $ golangci-lint --version
golangci-lint has version 1.21.0 built from 645e794 on 2019-10-15T18:15:04Z

golangci-lint says v1.19.1 does not have this problem but reverting to
it highlights other go warnings than detected currently (plus it has
worse performance)
@howardjohn
Copy link
Author

This is apparently fixed in the latest version, will update later after testing

@jirfag
Copy link
Contributor

jirfag commented May 17, 2020

Hi,
It looks like it was fixed. If the issue isn't fixed - we will reopen it.

@jirfag jirfag closed this as completed May 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants