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/test/integration/diagnostics: TestResolveImportCycle failures #64899

Open
gopherbot opened this issue Dec 30, 2023 · 3 comments
Assignees
Labels
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
Contributor

#!watchflakes
default <- pkg == "golang.org/x/tools/gopls/internal/test/integration/diagnostics" && test == "TestResolveImportCycle"

Issue created automatically to collect these failures.

Example (log):

#### Start Gopls Test Logs for "TestResolveImportCycle/default"
[Trace - 16:38:11.347 PM] Sending request 'initialize - (1)'.
Params: {"processId":0,"rootUri":"","capabilities":{"workspace":{"workspaceEdit":{"resourceOperations":["rename"]},"didChangeConfiguration":{},"didChangeWatchedFiles":{"dynamicRegistration":true},"configuration":true},"textDocument":{"completion":{"completionItem":{"snippetSupport":true,"tagSupport":{"valueSet":[1]}}},"documentSymbol":{"hierarchicalDocumentSymbolSupport":true},"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":null}}},"publishDiagnostics":{},"semanticTokens":{"requests":{"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":"0s","diagnosticsDelay":"10ms","env":{"GO111MODULE":"","GOMODCACHE":"","GOPACKAGESDRIVER":"off","GOPATH":"C:\\Users\\gopher\\AppData\\Local\\Temp\\1\\gopls-test-675387138\\TestResolveImportCycle\\default\\gopath","GOPROXY":"file:///C:/Users/gopher/AppData/Local/Temp/1/gopls-test-675387138/TestResolveImportCycle/default/proxy","GOSUMDB":"off"},"verboseWorkDoneProgress":true},"trace":"messages","workspaceFolders":[{"uri":"file:///C:/Users/gopher/AppData/Local/Temp/1/gopls-test-675387138/TestResolveImportCycle/default/work","name":"work"}]}


[Trace - 16:38:11.350 PM] Received response 'initialize - (1)' in 2ms.
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":true,"executeCommandProvider":{"commands":["gopls.add_dependency","gopls.add_import","gopls.add_telemetry_counters","gopls.apply_fix","gopls.change_signature","gopls.check_upgrades","gopls.diagnose_files","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.maybe_prompt_for_telemetry","gopls.mem_stats","gopls.regenerate_cgo","gopls.remove_dependency","gopls.reset_go_mod_diagnostics","gopls.run_go_work_command","gopls.run_govulncheck","gopls.run_tests","gopls.start_debugging","gopls.start_profile","gopls.stop_profile","gopls.test","gopls.tidy","gopls.toggle_gc_details","gopls.update_go_sum","gopls.upgrade_dependency","gopls.vendor","gopls.views","gopls.workspace_stats"]},"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"}}},"serverInfo":{"name":"gopls","version":"{\"GoVersion\":\"go1.20.12\",\"Path\":\"\",\"Main\":{\"Path\":\"\",\"Version\":\"\",\"Sum\":\"\",\"Replace\":null},\"Deps\":null,\"Settings\":null,\"Version\":\"(unknown)\"}"}}


[Trace - 16:38:11.354 PM] Sending notification 'initialized'.
...
--- FAIL: TestResolveImportCycle (0.45s)
    --- FAIL: TestResolveImportCycle/default (0.45s)
        diagnostics_test.go:1667: waiting on:
            Unmeetable: once "All of:\ncompleted work \"diagnosing opened files\" at least 2 time(s)" is met, must have:
            Any of:
            any diagnostics at the first position (2:7) matching `"mod.test/b"` in "a/a.go", with message containing "import cycle"
            any diagnostics at the first position (2:7) matching `"mod.test/a"` in "b/b.go", with message containing "import cycle"

            err:condition has final verdict Unmeetable

...
            	a/a.go (version 1):
            		2:7 [compiler]: could not import mod.test/b (missing metadata for import of "mod.test/b")
            	b/b.go (version 1):

            #### outstanding work:
            #### completed work:
            	diagnosing initial workspace load: 1
            	Setting up workspace: 1
            	Checking telemetry prompt: 1
            	diagnosing opened files: 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 30, 2023
@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "golang.org/x/tools/gopls/internal/test/integration/diagnostics" && test == "TestResolveImportCycle"
2023-12-27 16:24 windows-amd64-race tools@54ac623e go@8cb86b5f x/tools/gopls/internal/test/integration/diagnostics.TestResolveImportCycle (log)
#### Start Gopls Test Logs for "TestResolveImportCycle/default"
[Trace - 16:38:11.347 PM] Sending request 'initialize - (1)'.
Params: {"processId":0,"rootUri":"","capabilities":{"workspace":{"workspaceEdit":{"resourceOperations":["rename"]},"didChangeConfiguration":{},"didChangeWatchedFiles":{"dynamicRegistration":true},"configuration":true},"textDocument":{"completion":{"completionItem":{"snippetSupport":true,"tagSupport":{"valueSet":[1]}}},"documentSymbol":{"hierarchicalDocumentSymbolSupport":true},"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":null}}},"publishDiagnostics":{},"semanticTokens":{"requests":{"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":"0s","diagnosticsDelay":"10ms","env":{"GO111MODULE":"","GOMODCACHE":"","GOPACKAGESDRIVER":"off","GOPATH":"C:\\Users\\gopher\\AppData\\Local\\Temp\\1\\gopls-test-675387138\\TestResolveImportCycle\\default\\gopath","GOPROXY":"file:///C:/Users/gopher/AppData/Local/Temp/1/gopls-test-675387138/TestResolveImportCycle/default/proxy","GOSUMDB":"off"},"verboseWorkDoneProgress":true},"trace":"messages","workspaceFolders":[{"uri":"file:///C:/Users/gopher/AppData/Local/Temp/1/gopls-test-675387138/TestResolveImportCycle/default/work","name":"work"}]}


[Trace - 16:38:11.350 PM] Received response 'initialize - (1)' in 2ms.
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":true,"executeCommandProvider":{"commands":["gopls.add_dependency","gopls.add_import","gopls.add_telemetry_counters","gopls.apply_fix","gopls.change_signature","gopls.check_upgrades","gopls.diagnose_files","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.maybe_prompt_for_telemetry","gopls.mem_stats","gopls.regenerate_cgo","gopls.remove_dependency","gopls.reset_go_mod_diagnostics","gopls.run_go_work_command","gopls.run_govulncheck","gopls.run_tests","gopls.start_debugging","gopls.start_profile","gopls.stop_profile","gopls.test","gopls.tidy","gopls.toggle_gc_details","gopls.update_go_sum","gopls.upgrade_dependency","gopls.vendor","gopls.views","gopls.workspace_stats"]},"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"}}},"serverInfo":{"name":"gopls","version":"{\"GoVersion\":\"go1.20.12\",\"Path\":\"\",\"Main\":{\"Path\":\"\",\"Version\":\"\",\"Sum\":\"\",\"Replace\":null},\"Deps\":null,\"Settings\":null,\"Version\":\"(unknown)\"}"}}


[Trace - 16:38:11.354 PM] Sending notification 'initialized'.
...
--- FAIL: TestResolveImportCycle (0.45s)
    --- FAIL: TestResolveImportCycle/default (0.45s)
        diagnostics_test.go:1667: waiting on:
            Unmeetable: once "All of:\ncompleted work \"diagnosing opened files\" at least 2 time(s)" is met, must have:
            Any of:
            any diagnostics at the first position (2:7) matching `"mod.test/b"` in "a/a.go", with message containing "import cycle"
            any diagnostics at the first position (2:7) matching `"mod.test/a"` in "b/b.go", with message containing "import cycle"

            err:condition has final verdict Unmeetable

...
            	a/a.go (version 1):
            		2:7 [compiler]: could not import mod.test/b (missing metadata for import of "mod.test/b")
            	b/b.go (version 1):

            #### outstanding work:
            #### completed work:
            	diagnosing initial workspace load: 1
            	Setting up workspace: 1
            	Checking telemetry prompt: 1
            	diagnosing opened files: 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 30, 2023
@gopherbot gopherbot added this to the Unreleased milestone Dec 30, 2023
@ansaba ansaba modified the milestones: Unreleased, gopls/v0.15.0 Jan 4, 2024
@gopherbot
Copy link
Contributor Author

Change https://go.dev/cl/556495 mentions this issue: gopls/internal/test/integration: fix flakiness of TestResolveImportCycle

@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "golang.org/x/tools/gopls/internal/test/integration/diagnostics" && test == "TestResolveImportCycle"
2024-04-09 14:12 linux-ppc64le-power9osu tools@3520955d go@74501172 x/tools/gopls/internal/test/integration/diagnostics.TestResolveImportCycle (log)
#### Start Gopls Test Logs for "TestResolveImportCycle/default"
[Trace - 15:00:33.909 PM] Sending request 'initialize - (1)'.
Params: {"processId":0,"clientInfo":{"name":"fake.Editor","version":"v1.0.0"},"rootUri":"","capabilities":{"workspace":{"workspaceEdit":{"resourceOperations":["rename"]},"didChangeConfiguration":{},"didChangeWatchedFiles":{"dynamicRegistration":true},"configuration":true},"textDocument":{"completion":{"completionItem":{"snippetSupport":true,"tagSupport":{"valueSet":[1]}}},"documentSymbol":{"hierarchicalDocumentSymbolSupport":true},"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":null}}},"publishDiagnostics":{},"semanticTokens":{"requests":{"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","label"],"tokenModifiers":["declaration","definition","readonly","static","deprecated","abstract","async","modification","documentation","defaultLibrary"],"formats":null}},"window":{"workDoneProgress":true}},"initializationOptions":{"completionBudget":"0s","diagnosticsDelay":"10ms","env":{"GO111MODULE":"","GOMODCACHE":"","GOPACKAGESDRIVER":"off","GOPATH":"/workdir/tmp/gopls-test-1392876808/TestResolveImportCycle/default/gopath","GOPROXY":"file:///workdir/tmp/gopls-test-1392876808/TestResolveImportCycle/default/proxy","GOSUMDB":"off"},"verboseWorkDoneProgress":true},"trace":"messages","workspaceFolders":[{"uri":"file:///workdir/tmp/gopls-test-1392876808/TestResolveImportCycle/default/work","name":"work"}]}


[Trace - 15:00:33.910 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":true,"executeCommandProvider":{"commands":["gopls.add_dependency","gopls.add_import","gopls.add_telemetry_counters","gopls.apply_fix","gopls.change_signature","gopls.check_upgrades","gopls.diagnose_files","gopls.doc","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.maybe_prompt_for_telemetry","gopls.mem_stats","gopls.regenerate_cgo","gopls.remove_dependency","gopls.reset_go_mod_diagnostics","gopls.run_go_work_command","gopls.run_govulncheck","gopls.run_tests","gopls.start_debugging","gopls.start_profile","gopls.stop_profile","gopls.test","gopls.tidy","gopls.toggle_gc_details","gopls.update_go_sum","gopls.upgrade_dependency","gopls.vendor","gopls.views","gopls.workspace_stats"]},"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","label"],"tokenModifiers":["declaration","definition","readonly","static","deprecated","abstract","async","modification","documentation","defaultLibrary"]},"range":true,"full":true},"inlayHintProvider":{},"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":"workspace/didChangeWorkspaceFolders"}}},"serverInfo":{"name":"gopls","version":"{\"GoVersion\":\"go1.21.9\",\"Path\":\"\",\"Main\":{\"Path\":\"\",\"Version\":\"\",\"Sum\":\"\",\"Replace\":null},\"Deps\":null,\"Settings\":null,\"Version\":\"(unknown)\"}"}}


[Trace - 15:00:33.910 PM] Sending notification 'initialized'.
...
panic: test timed out after 20m0s
running tests:
	TestResolveImportCycle (15s)
	TestResolveImportCycle/default (15s)

testing.(*T).Run(0xc001667860, {0xc0f954?, 0xc3495d?}, 0xc001f43ae0)
	/workdir/go/src/testing/testing.go:1649 +0x3c8
golang.org/x/tools/gopls/internal/test/integration.(*Runner).Run(0xc000126280, 0xc001667860, {0xc9e4d4, 0xb6}, 0xdbff18, {0x0, 0x0, 0x1561cc?})
	/workdir/gopath/src/golang.org/x/tools/gopls/internal/test/integration/runner.go:172 +0x4d4
golang.org/x/tools/gopls/internal/test/integration.Run(...)
	/workdir/gopath/src/golang.org/x/tools/gopls/internal/test/integration/regtest.go:56
golang.org/x/tools/gopls/internal/test/integration/diagnostics.TestResolveImportCycle(0x0?)
	/workdir/gopath/src/golang.org/x/tools/gopls/internal/test/integration/diagnostics/diagnostics_test.go:1670 +0x60
testing.tRunner(0xc001667860, 0xdbfb30)

watchflakes

@gopherbot gopherbot reopened this Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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