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/workspace: TestCreateModule_Interdependent/default failures #65622

Open
gopherbot opened this issue Feb 8, 2024 · 2 comments
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

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

Issue created automatically to collect these failures.

Example (log):

=== RUN   TestCreateModule_Interdependent/default
    workspace_test.go:451: waiting on:
        Unmeetable: once "All of:\ncompleted work \"diagnosing opened files\" at least 2 time(s)\ncompleted work \"diagnosing files changed on disk\" at least 1 time(s)\ncompleted work \"diagnosing close files\" at least 1 time(s)" is met, must have:
        any diagnostics at the first position (3:5) matching `x` in "modb/b/b.go"
        
        err:condition has final verdict Unmeetable
        
        state:
        #### log messages (see RPC logs for full text):
        	Info: "2024/02/07 11:47:46 go info for /Users/swarming/.s...
...
[Trace - 11:47:46.549 AM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///Users/swarming/.swarming/w/ir/x/t/gopls-test-1679539918/TestCreateModule_Interdependent/default/work/modb/go.mod","diagnostics":[]}


[Trace - 11:47:46.550 AM] Received notification '$/progress'.
Params: {"token":"2709306151803459460","value":{"kind":"end","message":"Done."}}


#### End Gopls Test Logs for "TestCreateModule_Interdependent/default"
--- FAIL: TestCreateModule_Interdependent/default (0.37s)

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 Feb 8, 2024
@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "golang.org/x/tools/gopls/internal/test/integration/workspace" && test == "TestCreateModule_Interdependent/default"
2024-02-07 19:42 x_tools-go1.21-darwin-amd64_11 tools@76ef6b6a release-branch.go1.21@f2920803 x/tools/gopls/internal/test/integration/workspace.TestCreateModule_Interdependent/default (log)
=== RUN   TestCreateModule_Interdependent/default
    workspace_test.go:451: waiting on:
        Unmeetable: once "All of:\ncompleted work \"diagnosing opened files\" at least 2 time(s)\ncompleted work \"diagnosing files changed on disk\" at least 1 time(s)\ncompleted work \"diagnosing close files\" at least 1 time(s)" is met, must have:
        any diagnostics at the first position (3:5) matching `x` in "modb/b/b.go"
        
        err:condition has final verdict Unmeetable
        
        state:
        #### log messages (see RPC logs for full text):
        	Info: "2024/02/07 11:47:46 go info for /Users/swarming/.s...
...
[Trace - 11:47:46.549 AM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///Users/swarming/.swarming/w/ir/x/t/gopls-test-1679539918/TestCreateModule_Interdependent/default/work/modb/go.mod","diagnostics":[]}


[Trace - 11:47:46.550 AM] Received notification '$/progress'.
Params: {"token":"2709306151803459460","value":{"kind":"end","message":"Done."}}


#### End Gopls Test Logs for "TestCreateModule_Interdependent/default"
--- FAIL: TestCreateModule_Interdependent/default (0.37s)

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 Feb 8, 2024
@gopherbot gopherbot added this to the Unreleased milestone Feb 8, 2024
@findleyr findleyr modified the milestones: Unreleased, gopls/v0.15.0 Feb 11, 2024
@findleyr findleyr self-assigned this Feb 14, 2024
@findleyr
Copy link
Contributor

This is very strange: the test writes go.work, modb/go.mod, and modb/b/b.go. The write of go.work should trigger a load. But that load appears not to observe modb/b/b.go:

[Trace - 11:47:46.361 AM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2024/02/07 11:47:46 go/packages.Load #78\n\tsnapshot=0\n\tdirectory=file:///Users/swarming/.swarming/w/ir/x/t/gopls-test-1679539918/TestCreateModule_Interdependent/default/work\n\tquery=[/Users/swarming/.swarming/w/ir/x/t/gopls-test-1679539918/TestCreateModule_Interdependent/default/work/moda/a/... /Users/swarming/.swarming/w/ir/x/t/gopls-test-1679539918/TestCreateModule_Interdependent/default/work/modb/... builtin]\n\tpackages=2\n"}


[Trace - 11:47:46.361 AM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2024/02/07 11:47:46 go/packages.Load #78: updating metadata for 1 packages\n"}

The packages=2 annotation indicates that we got package a and builtin, but not b. When the test passes, we get 3 packages. There's an error for the import of package b from package a that suggests the same.

Reading the code, it should be the case that we've written all three files without error. So I don't know why the subsequent call to packages.Load does not observe the expected file state.

I don't think this indicates a major bug or regression, so I'll bump to the v0.16.0 milestone. Let's hope it recurs.

CC @adonovan

@findleyr findleyr removed their assignment Feb 14, 2024
@findleyr findleyr modified the milestones: gopls/v0.15.0, gopls/v0.16.0 Feb 14, 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: No status
Development

No branches or pull requests

2 participants