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

x/tools/gopls: TestMissingPatternDiagnostic flake #58667

Closed
adonovan opened this issue Feb 23, 2023 · 1 comment
Closed

x/tools/gopls: TestMissingPatternDiagnostic flake #58667

adonovan opened this issue Feb 23, 2023 · 1 comment
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@adonovan
Copy link
Member

This failure was observed once in patchset 1 of https://go.dev/cl/470678. I believe it is unrelated to that change; a second run of the CI passed.

See https://storage.googleapis.com/go-build-log/612c00bf/linux-arm64_9feab390.log

serve.go:434: debug server listening at http://localhost:45007
serve.go:434: debug server listening at http://localhost:45505
#### Start Gopls Test Logs for "TestMissingPatternDiagnostic/default"
[Trace - 18:53:26.444 PM] Sending request 'initialize - (1)'.
Params: {"processId":0,"clientInfo":{"name":"fakeclient","version":"v1.0.0"},"rootUri":"","capabilities":{"workspace":{"workspaceEdit":{"resourceOperations":["rename"]},"didChangeConfiguration":{},"didChangeWatchedFiles":{"dynamicRegistration":true},"configuration":true},"textDocument":{"completion":{"completionItem":{"snippetSupport":true,"commitCharactersSupport":false,"documentationFormat":null,"deprecatedSupport":false,"preselectSupport":false,"tagSupport":{"valueSet":[1]},"insertReplaceSupport":false,"resolveSupport":{"properties":null},"insertTextModeSupport":{"valueSet":null},"labelDetailsSupport":false}},"hover":{},"documentSymbol":{},"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":null}}},"rename":{},"foldingRange":{},"publishDiagnostics":{},"semanticTokens":{"requests":{"range":false,"full":true},"tokenTypes":["namespace","type","class","enum","interface","struct","typeParameter","parameter","variable","property","enumMember","event","function","method","macro","keyword","modifier","comment","string","number","regexp","operator"],"tokenModifiers":["declaration","definition","readonly","static","deprecated","abstract","async","modification","documentation","defaultLibrary"],"formats":null}},"window":{"workDoneProgress":true}},"initializationOptions":{"completionBudget":"10s","diagnosticsDelay":"10ms","env":{"GO111MODULE":"","GOMODCACHE":"","GOPACKAGESDRIVER":"off","GOPATH":"/tmp/workdir/tmp/gopls-regtest-3372056961/TestMissingPatternDiagnostic/default/gopath","GOPROXY":"file:///tmp/workdir/tmp/gopls-regtest-3372056961/TestMissingPatternDiagnostic/default/proxy","GOSUMDB":"off"},"verboseWorkDoneProgress":true},"trace":"messages","workspaceFolders":[{"uri":"file:///tmp/workdir/tmp/gopls-regtest-3372056961/TestMissingPatternDiagnostic/default/work","name":"work"}]}


[Trace - 18:53:26.444 PM] Received response 'initialize - (1)' in 0ms.
Result: {"capabilities":{"textDocumentSync":{"openClose":true,"change":2,"save":{}},"completionProvider":{"triggerCharacters":["."]},"hoverProvider":true,"signatureHelpProvider":{"triggerCharacters":["(",","]},"definitionProvider":true,"typeDefinitionProvider":true,"implementationProvider":true,"referencesProvider":true,"documentHighlightProvider":true,"documentSymbolProvider":true,"codeActionProvider":true,"codeLensProvider":{},"documentLinkProvider":{},"workspaceSymbolProvider":true,"documentFormattingProvider":true,"renameProvider":true,"foldingRangeProvider":true,"selectionRangeProvider":{"documentSelector":null},"executeCommandProvider":{"commands":["gopls.add_dependency","gopls.add_import","gopls.apply_fix","gopls.check_upgrades","gopls.edit_go_directive","gopls.fetch_vulncheck_result","gopls.gc_details","gopls.generate","gopls.go_get_package","gopls.list_imports","gopls.list_known_packages","gopls.regenerate_cgo","gopls.remove_dependency","gopls.reset_go_mod_diagnostics","gopls.run_govulncheck","gopls.run_tests","gopls.start_debugging","gopls.test","gopls.tidy","gopls.toggle_gc_details","gopls.update_go_sum","gopls.upgrade_dependency","gopls.vendor"]},"callHierarchyProvider":true,"semanticTokensProvider":{"legend":{"tokenTypes":["namespace","type","class","enum","interface","struct","typeParameter","parameter","variable","property","enumMember","event","function","method","macro","keyword","modifier","comment","string","number","regexp","operator"],"tokenModifiers":["declaration","definition","readonly","static","deprecated","abstract","async","modification","documentation","defaultLibrary"]},"range":true,"full":true},"inlayHintProvider":{},"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":"workspace/didChangeWorkspaceFolders"},"fileOperations":{}}},"serverInfo":{"name":"gopls","version":"{\"GoVersion\":\"devel 612c00bf4d440160e87e983bd8300ad7b08a6ada\",\"Path\":\"\",\"Main\":{\"Path\":\"\",\"Version\":\"\",\"Sum\":\"\",\"Replace\":null},\"Deps\":null,\"Settings\":null,\"Version\":\"master\"}"}}


[Trace - 18:53:26.444 PM] Sending notification 'initialized'.
Params: {}


[Trace - 18:53:26.444 PM] Received request 'window/workDoneProgress/create - (1)'.
Params: {"token":"6332216880235428519"}


[Trace - 18:53:26.445 PM] Sending response 'window/workDoneProgress/create - (1)' in 0ms.
Result: 


[Trace - 18:53:26.445 PM] Received notification '$/progress'.
Params: {"token":"6332216880235428519","value":{"kind":"begin","title":"diagnosing initial workspace load","message":"Calculating diagnostics for initial workspace load..."}}


[Trace - 18:53:26.445 PM] Received request 'window/workDoneProgress/create - (2)'.
Params: {"token":"9006790614455439682"}


[Trace - 18:53:26.445 PM] Sending response 'window/workDoneProgress/create - (2)' in 0ms.
Result: 


[Trace - 18:53:26.445 PM] Received notification '$/progress'.
Params: {"token":"9006790614455439682","value":{"kind":"begin","title":"Setting up workspace","message":"Loading packages..."}}


[Trace - 18:53:26.445 PM] Received request 'workspace/configuration - (3)'.
Params: {"items":[{"scopeUri":"file:///tmp/workdir/tmp/gopls-regtest-3372056961/TestMissingPatternDiagnostic/default/work","section":"gopls"}]}


[Trace - 18:53:26.445 PM] Sending response 'workspace/configuration - (3)' in 0ms.
Result: [{"completionBudget":"10s","diagnosticsDelay":"10ms","env":{"GO111MODULE":"","GOMODCACHE":"","GOPACKAGESDRIVER":"off","GOPATH":"/tmp/workdir/tmp/gopls-regtest-3372056961/TestMissingPatternDiagnostic/default/gopath","GOPROXY":"file:///tmp/workdir/tmp/gopls-regtest-3372056961/TestMissingPatternDiagnostic/default/proxy","GOSUMDB":"off"},"verboseWorkDoneProgress":true}]


[Trace - 18:53:26.457 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2023/02/23 18:53:26 go info for /tmp/workdir/tmp/gopls-regtest-3372056961/TestMissingPatternDiagnostic/default/work\n(go dir /tmp/workdir/tmp/gopls-regtest-3372056961/TestMissingPatternDiagnostic/default/work)\n(go version go version devel 612c00bf4d440160e87e983bd8300ad7b08a6ada linux/arm64)\n(valid build configuration = true)\n(build flags: [])\n(selected go env: [GO111MODULE=, GOCACHE=/tmp/workdir/gocache, GOFLAGS=, GOMODCACHE=/tmp/workdir/tmp/gopls-regtest-3372056961/TestMissingPatternDiagnostic/default/gopath/pkg/mod, GOPATH=/tmp/workdir/tmp/gopls-regtest-3372056961/TestMissingPatternDiagnostic/default/gopath, GOPRIVATE=, GOROOT=/tmp/workdir/go, GOWORK=])\n\n"}


[Trace - 18:53:26.525 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2023/02/23 18:53:26 go/packages.Load #20\n\tsnapshot=0\n\tdirectory=file:///tmp/workdir/tmp/gopls-regtest-3372056961/TestMissingPatternDiagnostic/default/work\n\tquery=[builtin example.com/...]\n\tpackages=2\n"}


[Trace - 18:53:26.525 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2023/02/23 18:53:26 go/packages.Load #20: updating metadata for 31 packages\n"}


[Trace - 18:53:26.547 PM] Received notification '$/progress'.
Params: {"token":"9006790614455439682","value":{"kind":"end","message":"Finished loading packages."}}


[Trace - 18:53:26.547 PM] Received request 'client/registerCapability - (4)'.
Params: {"registrations":[{"id":"workspace/didChangeWatchedFiles-0","method":"workspace/didChangeWatchedFiles","registerOptions":{"watchers":[{"globPattern":"**/*.{go,mod,sum,work}","kind":7}]}}]}


[Trace - 18:53:26.547 PM] Sending response 'client/registerCapability - (4)' in 0ms.
Result: 


[Trace - 18:53:26.596 PM] Received notification '$/progress'.
Params: {"token":"6332216880235428519","value":{"kind":"end","message":"Done."}}


[Trace - 18:53:26.596 PM] Sending notification 'textDocument/didOpen'.
Params: {"textDocument":{"uri":"file:///tmp/workdir/tmp/gopls-regtest-3372056961/TestMissingPatternDiagnostic/default/work/x.go","languageId":"go","version":1,"text":"package x\n\nimport (\n\t_ \"embed\"\n)\n\n// Issue 47436\nfunc F() {}\n\n//go:embed NONEXISTENT\nvar foo string\n"}}


[Trace - 18:53:26.596 PM] Received request 'window/workDoneProgress/create - (5)'.
Params: {"token":"2868681718438842721"}


[Trace - 18:53:26.596 PM] Sending response 'window/workDoneProgress/create - (5)' in 0ms.
Result: 


[Trace - 18:53:26.596 PM] Received notification '$/progress'.
Params: {"token":"2868681718438842721","value":{"kind":"begin","title":"diagnosing opened files","message":"Calculating file diagnostics..."}}


[Trace - 18:53:26.609 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///tmp/workdir/tmp/gopls-regtest-3372056961/TestMissingPatternDiagnostic/default/work/x.go","version":1,"diagnostics":[]}


[Trace - 18:53:26.663 PM] Received notification '$/progress'.
Params: {"token":"2868681718438842721","value":{"kind":"end","message":"Done."}}


#### End Gopls Test Logs for "TestMissingPatternDiagnostic/default"
--- FAIL: TestMissingPatternDiagnostic (0.22s)
    --- FAIL: TestMissingPatternDiagnostic/default (0.22s)
        env.go:322: waiting on:
            Unmeetable: once "All of:\ncompleted work \"diagnosing opened files\" at least 1 time(s)" is met, must have:
            any diagnostics at the first position matching `NONEXISTENT` in "x.go", with message containing "no matching files found"
            
            err:condition has final verdict Unmeetable
            
            state:
            #### log messages (see RPC logs for full text):
            	Info: "2023/02/23 18:53:26 go info for /tmp/workdir/tmp/g...
            	Info: "2023/02/23 18:53:26 go/packages.Load #20\n\tsnapsh...
            	Info: "2023/02/23 18:53:26 go/packages.Load #20: updating...
            
            #### diagnostics:
            	x.go (version 1):
            
            #### outstanding work:
            #### completed work:
            	diagnosing opened files: 1
            	diagnosing initial workspace load: 1
            	Setting up workspace: 1
            
FAIL
FAIL	golang.org/x/tools/gopls/internal/regtest/misc	24.750s
@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Feb 23, 2023
@gopherbot gopherbot added this to the Unreleased milestone Feb 23, 2023
@findleyr
Copy link
Contributor

This was cause by the failing patchset not having https://go.dev/cl/470157.

(such version skew problems are frequently a problem in x/tools, but unfortunately it is not easy to solve the problem; we must get used to rebasing frequently)

@findleyr findleyr closed this as not planned Won't fix, can't repro, duplicate, stale Feb 27, 2023
@golang golang locked and limited conversation to collaborators Feb 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

3 participants