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/misc: TestGenerateProgress failures with "Unmet: no outstanding work" #49901

Closed
bcmills opened this issue Dec 1, 2021 · 8 comments
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. Testing An issue that has been verified to require only test changes, not just a test failure. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented Dec 1, 2021

--- FAIL: TestGenerateProgress (21.17s)
    --- FAIL: TestGenerateProgress/singleton (20.01s)
        generate_test.go:66: waiting on:
            	Unmet: no outstanding work
            
            err:context deadline exceeded
            
            state:
            #### log messages (see RPC logs for full text):
            	Info: "2021/12/01 15:20:42 go env for /workdir/tmp/gopls-...
            	Info: "2021/12/01 15:20:42 go/packages.Load\n\tsnapshot=0...
            	Info: "2021/12/01 15:20:42 go run ../generate.go lib1\n\n...
            	Info: "2021/12/01 15:20:43 go run ../generate.go lib2\n\n...
            	Info: "2021/12/01 15:20:44 go/packages.Load\n\tsnapshot=2...
            	Info: "2021/12/01 15:20:44 go/packages.Load\n\tsnapshot=2...
            	Info: "2021/12/01 15:20:44 go/packages.Load\n\tsnapshot=2...
            	Info: "2021/12/01 15:20:44 go/packages.Load\n\tsnapshot=2...
            
            #### diagnostics:
            	main.go (version 0):
            
            #### outstanding work:
            	!NO NAME(token: 6177026811335423860): 0.00
            #### completed work:
            	Load: 2
            	Setting up workspace: 1
            	diagnosing initial workspace load: 1
            	Running go generate .: 2
            	diagnosing files changed on disk: 2
        runner.go:312: closing editor: Shutdown: JSON RPC cancelled
FAIL
FAIL	golang.org/x/tools/gopls/internal/regtest/misc	321.505s

greplogs --dashboard -md -l -e '(?ms)FAIL: TestGenerateProgress.*Unmet: no outstanding work'

2021-12-01T15:05:46-615f9a6-0e1d553/linux-amd64-race
2021-11-30T20:04:58-2c9b078-7ccbcc9/linux-arm64-packet
2021-11-30T16:43:31-2c9b078-b7651e5/linux-amd64-race
2021-11-23T18:15:15-7cf1f38-00045b7/openbsd-386-70
2021-11-12T23:26:33-49ce184-3a4b950/linux-amd64-race
2021-11-10T21:32:50-fc3ed20-f410786/linux-amd64-race
2021-11-09T19:01:30-e900012-f59d36d/freebsd-386-11_4
2021-11-08T18:39:25-2cdcc60-f58c78a/freebsd-amd64-11_4
2021-11-03T15:51:25-3b1a674-631b567/freebsd-386-11_4
2021-11-01T19:56:50-ee08195-5f1bcd1/linux-riscv64-unmatched
2021-10-29T21:19:39-a2be0cd-d19c5bd/freebsd-amd64-11_2
2021-10-28T00:09:41-9cd58b0-1a6281d/linux-amd64-race
2021-10-22T14:05:31-6f2254e-ff8115d/linux-amd64-race
2021-10-21T23:48:53-baf4e38-3beab0c/freebsd-386-12_2
2021-10-09T14:53:12-ee04797-eba91e8/linux-amd64-race
2021-10-05T14:12:44-81efdbc-7983830/linux-amd64-race
2021-09-14T19:06:02-258ee27-21a4e67/freebsd-386-11_4
2021-09-14T19:06:02-258ee27-170a72e/linux-amd64-race
2021-08-25T15:30:19-c32dd46-099b819/freebsd-amd64-11_4
2021-08-12T15:58:41-f91c4a5-095bb79/freebsd-386-11_4
2021-07-21T20:29:18-7aa8294-3e48c03/windows-amd64-2016
2021-07-10T00:41:40-cb1acef-3d1d066/dragonfly-amd64
2021-07-08T19:56:07-71eae3a-3d1d066/dragonfly-amd64
2021-07-07T20:06:16-fd00574-cb4cd9e/dragonfly-amd64

@bcmills bcmills added 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. labels Dec 1, 2021
@bcmills bcmills changed the title TestGenerateProgress failures with "Unmet: no outstanding work" x/tools/gopls/internal/regtest/misc: TestGenerateProgress failures with "Unmet: no outstanding work" Dec 1, 2021
@bcmills
Copy link
Contributor Author

bcmills commented Dec 1, 2021

(CC @findleyr)

I'll add a skip for now, to deflake the builders while we look into the root cause.

@findleyr
Copy link
Contributor

findleyr commented Dec 1, 2021

Interesting. This looks like a gopls bug, but I agree that this can be skipped.

@findleyr
Copy link
Contributor

findleyr commented Dec 1, 2021

This may be related to #46930, where an outstanding progress item is not cleared.

@bcmills bcmills added this to the Backlog milestone Dec 1, 2021
@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Dec 1, 2021
@gopherbot
Copy link

Change https://golang.org/cl/368216 mentions this issue: gopls/internal/regtest/misc: temporarily skip TestGenerateProgress

gopherbot pushed a commit to golang/tools that referenced this issue Dec 1, 2021
For golang/go#49901

Change-Id: Id41c6437fadf1c539488662fc0ca5bc746b8a498
Reviewed-on: https://go-review.googlesource.com/c/tools/+/368216
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
@findleyr findleyr modified the milestones: gopls/v0.7.5, gopls/v0.8.0 Jan 4, 2022
@findleyr findleyr modified the milestones: gopls/v0.8.0, gopls/v0.8.1 Feb 21, 2022
@findleyr findleyr modified the milestones: gopls/v0.8.1, gopls/v0.8.2 Mar 7, 2022
@findleyr findleyr added Testing An issue that has been verified to require only test changes, not just a test failure. and removed gopls/testing labels May 10, 2022
@gopherbot
Copy link

Change https://go.dev/cl/417115 mentions this issue: internal/lsp/progress: actually close of Context in WorkDoneWriter

@findleyr
Copy link
Contributor

I suspect this test will no longer be flaky once re-enabled by https://go.dev/cl/417115. Let's close this issue after it has proved itself resolved.

@findleyr findleyr modified the milestones: gopls/later, gopls/v0.9.1 Jul 12, 2022
gopherbot pushed a commit to golang/tools that referenced this issue Jul 12, 2022
CL 409936 eliminated cases where we close over a Context during progress
reporting, except in one instance where it wasn't possible: the
WorkDoneWriter that must implement the io.Writer interface.

Unfortunately it contained a glaring bug that the ctx field was never
set, and the regression test for progress reporting during `go generate`
was disabled due to flakiness (golang/go#49901).

Incidentally, the fundamental problem that CL 409936 addressed may also
fix the flakiness of TestGenerateProgress.

Fix the bug, and re-enable the test.

Fixes golang/go#53781

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

Change https://go.dev/cl/417118 mentions this issue: internal/lsp/progress: actually close over Context in WorkDoneWriter

gopherbot pushed a commit to golang/tools that referenced this issue Jul 13, 2022
Context in WorkDoneWriter

In addition to the original commit description reproduced below, this CL
updates gopls/go.mod to include a replace directive for x/tools.

CL 409936 eliminated cases where we close over a Context during progress
reporting, except in one instance where it wasn't possible: the
WorkDoneWriter that must implement the io.Writer interface.

Unfortunately it contained a glaring bug that the ctx field was never
set, and the regression test for progress reporting during `go generate`
was disabled due to flakiness (golang/go#49901).

Incidentally, the fundamental problem that CL 409936 addressed may also
fix the flakiness of TestGenerateProgress.

Fix the bug, and re-enable the test.

For golang/go#53781
For golang/go#53823

Change-Id: Ideb99a5525667e45d2e41fcc5078699ba1e0f1a3
Reviewed-on: https://go-review.googlesource.com/c/tools/+/417115
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Robert Findley <rfindley@google.com>
Auto-Submit: Robert Findley <rfindley@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
(cherry picked from commit 459e2b8)
Reviewed-on: https://go-review.googlesource.com/c/tools/+/417118
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
@findleyr findleyr modified the milestones: gopls/v0.9.1, gopls/v0.9.2 Jul 13, 2022
@findleyr
Copy link
Contributor

Looks like this is fixed.

@findleyr findleyr self-assigned this Aug 8, 2022
@golang golang locked and limited conversation to collaborators Aug 8, 2023
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. Testing An issue that has been verified to require only test changes, not just a test failure. 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