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/internal/regtest/workspace: TestAddAndRemoveGoWork failures #57508

Closed
gopherbot opened this issue Dec 29, 2022 · 5 comments
Closed
Assignees
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@gopherbot
Copy link

#!watchflakes
post <- pkg == "golang.org/x/tools/gopls/internal/regtest/workspace" && test == "TestAddAndRemoveGoWork"

Issue created automatically to collect these failures.

Example (log):

#### Start Gopls Test Logs for "TestAddAndRemoveGoWork/default"
[Trace - 14:53:14.774 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":"/workdir/tmp/gopls-regtest-69899198/TestAddAndRemoveGoWork/default/gopath","GOPROXY":"file:///workdir/tmp/gopls-regtest-69899198/TestAddAndRemoveGoWork/default/proxy","GOSUMDB":"off"},"verboseWorkDoneProgress":true},"trace":"messages","workspaceFolders":[{"uri":"file:///workdir/tmp/gopls-regtest-69899198/TestAddAndRemoveGoWork/default/work","name":"work"}]}


[Trace - 14:53:14.776 PM] Received response 'initialize - (1)' in 1ms.
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.generate_gopls_mod","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,"inlayHintProvider":{},"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":"workspace/didChangeWorkspaceFolders"},"fileOperations":{}}},"serverInfo":{"name":"gopls","version":"{\"GoVersion\":\"go1.19.4\",\"Path\":\"\",\"Main\":{\"Path\":\"\",\"Version\":\"\",\"Sum\":\"\",\"Replace\":null},\"Deps\":null,\"Settings\":null,\"Version\":\"master\"}"}}


[Trace - 14:53:14.778 PM] Sending notification 'initialized'.
...
--- FAIL: TestAddAndRemoveGoWork (0.97s)
    --- FAIL: TestAddAndRemoveGoWork/default (0.97s)
        workspace_test.go:1142: waiting on:
            Unmeetable: once "All of:\ncompleted work \"diagnosing opened files\" at least 3 time(s)\ncompleted work \"diagnosing files changed on disk\" at least 2 time(s)\ncompleted work \"diagnosing close files\" at least 1 time(s)" is met, must have:
            empty diagnostics for "main.go"
            b/main.go: diagnostic at {line:0, column:0}

            err:condition has final verdict Unmeetable

            state:
...
            	go.work (version 0):

            #### outstanding work:
            #### completed work:
            	diagnosing initial workspace load: 1
            	diagnosing opened files: 3
            	Setting up workspace: 1
            	Error loading workspace: 1
            	diagnosing close files: 1
            	diagnosing files changed on disk: 2

watchflakes

@gopherbot gopherbot added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Dec 29, 2022
@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "golang.org/x/tools/gopls/internal/regtest/workspace" && test == "TestAddAndRemoveGoWork"
2022-12-29 14:49 linux-amd64-race tools@0e1d0132 go@c1760296 x/tools/gopls/internal/regtest/workspace.TestAddAndRemoveGoWork (log)
#### Start Gopls Test Logs for "TestAddAndRemoveGoWork/default"
[Trace - 14:53:14.774 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":"/workdir/tmp/gopls-regtest-69899198/TestAddAndRemoveGoWork/default/gopath","GOPROXY":"file:///workdir/tmp/gopls-regtest-69899198/TestAddAndRemoveGoWork/default/proxy","GOSUMDB":"off"},"verboseWorkDoneProgress":true},"trace":"messages","workspaceFolders":[{"uri":"file:///workdir/tmp/gopls-regtest-69899198/TestAddAndRemoveGoWork/default/work","name":"work"}]}


[Trace - 14:53:14.776 PM] Received response 'initialize - (1)' in 1ms.
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.generate_gopls_mod","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,"inlayHintProvider":{},"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":"workspace/didChangeWorkspaceFolders"},"fileOperations":{}}},"serverInfo":{"name":"gopls","version":"{\"GoVersion\":\"go1.19.4\",\"Path\":\"\",\"Main\":{\"Path\":\"\",\"Version\":\"\",\"Sum\":\"\",\"Replace\":null},\"Deps\":null,\"Settings\":null,\"Version\":\"master\"}"}}


[Trace - 14:53:14.778 PM] Sending notification 'initialized'.
...
--- FAIL: TestAddAndRemoveGoWork (0.97s)
    --- FAIL: TestAddAndRemoveGoWork/default (0.97s)
        workspace_test.go:1142: waiting on:
            Unmeetable: once "All of:\ncompleted work \"diagnosing opened files\" at least 3 time(s)\ncompleted work \"diagnosing files changed on disk\" at least 2 time(s)\ncompleted work \"diagnosing close files\" at least 1 time(s)" is met, must have:
            empty diagnostics for "main.go"
            b/main.go: diagnostic at {line:0, column:0}

            err:condition has final verdict Unmeetable

            state:
...
            	go.work (version 0):

            #### outstanding work:
            #### completed work:
            	diagnosing initial workspace load: 1
            	diagnosing opened files: 3
            	Setting up workspace: 1
            	Error loading workspace: 1
            	diagnosing close files: 1
            	diagnosing files changed on disk: 2

watchflakes

@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 Dec 29, 2022
@gopherbot gopherbot added this to the Unreleased milestone Dec 29, 2022
@suzmue suzmue modified the milestones: Unreleased, gopls/v0.12.0 Dec 29, 2022
@findleyr findleyr self-assigned this Dec 29, 2022
@gopherbot
Copy link
Author

Change https://go.dev/cl/459784 mentions this issue: gopls/internal/regtest: await go.work changes in TestAddAndRemoveGoWork

gopherbot pushed a commit to golang/tools that referenced this issue Dec 29, 2022
To temporarily avoid flakes, wait for go.work changes to be processed
before reopening files. This merely works around the underlying bug, as
noted in the comment.

For golang/go#57508

Change-Id: I80d24c16ff709ff77a0fb07dd3ac7275bc8bcb5a
Reviewed-on: https://go-review.googlesource.com/c/tools/+/459784
Auto-Submit: Robert Findley <rfindley@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
@findleyr
Copy link
Contributor

findleyr commented Jan 3, 2023

This should be fixed by CL 459784, and I've opened #57558 to fix the underlying problem with "seen files".

@findleyr findleyr closed this as completed Jan 3, 2023
@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "golang.org/x/tools/gopls/internal/regtest/workspace" && test == "TestAddAndRemoveGoWork"
2022-12-29 16:33 freebsd-386-12_3 tools@3b16059a go@c1760296 x/tools/gopls/internal/regtest/workspace.TestAddAndRemoveGoWork (log)
#### Start Gopls Test Logs for "TestAddAndRemoveGoWork/default"
[Trace - 16:37:11.514 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-97352289/TestAddAndRemoveGoWork/default/gopath","GOPROXY":"file:///tmp/workdir/tmp/gopls-regtest-97352289/TestAddAndRemoveGoWork/default/proxy","GOSUMDB":"off"},"verboseWorkDoneProgress":true},"trace":"messages","workspaceFolders":[{"uri":"file:///tmp/workdir/tmp/gopls-regtest-97352289/TestAddAndRemoveGoWork/default/work","name":"work"}]}


[Trace - 16:37:11.514 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.generate_gopls_mod","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,"inlayHintProvider":{},"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":"workspace/didChangeWorkspaceFolders"},"fileOperations":{}}},"serverInfo":{"name":"gopls","version":"{\"GoVersion\":\"go1.19.4\",\"Path\":\"\",\"Main\":{\"Path\":\"\",\"Version\":\"\",\"Sum\":\"\",\"Replace\":null},\"Deps\":null,\"Settings\":null,\"Version\":\"master\"}"}}


[Trace - 16:37:11.515 PM] Sending notification 'initialized'.
...
--- FAIL: TestAddAndRemoveGoWork (1.98s)
    --- FAIL: TestAddAndRemoveGoWork/default (1.98s)
        workspace_test.go:1142: waiting on:
            Unmeetable: once "All of:\ncompleted work \"diagnosing opened files\" at least 3 time(s)\ncompleted work \"diagnosing files changed on disk\" at least 2 time(s)\ncompleted work \"diagnosing close files\" at least 1 time(s)" is met, must have:
            empty diagnostics for "main.go"
            b/main.go: diagnostic at {line:0, column:0}

            err:condition has final verdict Unmeetable

            state:
...
            	main.go (version 1):

            #### outstanding work:
            #### completed work:
            	diagnosing close files: 1
            	Setting up workspace: 1
            	diagnosing opened files: 3
            	Error loading workspace: 1
            	diagnosing files changed on disk: 2
            	diagnosing initial workspace load: 1

watchflakes

@gopherbot gopherbot reopened this Jan 4, 2023
@findleyr
Copy link
Contributor

findleyr commented Jan 4, 2023

Flake precedes the fix.

@findleyr findleyr closed this as completed Jan 4, 2023
@golang golang locked and limited conversation to collaborators Jan 4, 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. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
Status: Done
Development

No branches or pull requests

3 participants