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

ci: Improve peer logging to help identify race #93

Merged
merged 5 commits into from
Jan 30, 2022
Merged

ci: Improve peer logging to help identify race #93

merged 5 commits into from
Jan 30, 2022

Conversation

kylecarbs
Copy link
Member

No description provided.

@kylecarbs kylecarbs self-assigned this Jan 30, 2022
@codecov
Copy link

codecov bot commented Jan 30, 2022

Codecov Report

Merging #93 (0a9ff49) into main (3e88f15) will increase coverage by 2.99%.
The diff coverage is 97.67%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #93      +/-   ##
==========================================
+ Coverage   68.87%   71.87%   +2.99%     
==========================================
  Files          85       89       +4     
  Lines        3396     3612     +216     
  Branches       55       55              
==========================================
+ Hits         2339     2596     +257     
+ Misses        860      793      -67     
- Partials      197      223      +26     
Flag Coverage Δ
unittest-go-macos-latest 67.56% <97.67%> (+0.34%) ⬆️
unittest-go-ubuntu-latest 69.72% <90.69%> (?)
unittest-go-windows-latest 67.49% <97.67%> (?)
unittest-js 78.30% <ø> (ø)
Impacted Files Coverage Δ
peer/conn.go 77.07% <97.67%> (+4.81%) ⬆️
peerbroker/dial.go 72.72% <0.00%> (-4.55%) ⬇️
provisioner/terraform/provision.go 57.62% <0.00%> (ø)
database/postgres/postgres.go 70.00% <0.00%> (ø)
provisioner/terraform/parse.go 75.00% <0.00%> (ø)
provisioner/terraform/serve.go 66.66% <0.00%> (ø)
coderd/coderdtest/coderdtest.go 100.00% <0.00%> (+22.64%) ⬆️
database/migrate.go 52.38% <0.00%> (+52.38%) ⬆️
database/pubsub.go 77.08% <0.00%> (+77.08%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3e88f15...0a9ff49. Read the comment docs.

Comment on lines +161 to +162
c.opts.Logger.Debug(context.Background(), "ice gathering state updated",
slog.F("state", iceGatherState))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this additional logging!

c.opts.Logger.Debug(context.Background(), "flushing remote candidate")
hash := sha256.Sum224([]byte(pendingCandidate.Candidate))
c.opts.Logger.Debug(context.Background(), "flushing buffered remote candidate",
slog.F("hash", hash),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat idea to log this, so we can track if a particular ICE candidate made it across

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'm concerned that somehow the ICE candidate isn't getting across the pipe, so at least now we'll know whether it does or not!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Speaking of that - we could also add logging when we set up the channels in the peer/conn_test.go, too!

			case c := <-channel1.LocalCandidate():
				_ = channel2.AddRemoteCandidate(c)

case c := <-channel2.LocalCandidate():

And it might make sense to assert no error on that AddRemoteCandidate call? I don't think it should in the local network case (and if it does, might give us extra clues)

@kylecarbs kylecarbs enabled auto-merge (squash) January 30, 2022 01:21
@kylecarbs kylecarbs merged commit 5367d93 into main Jan 30, 2022
@kylecarbs kylecarbs deleted the peerdebug branch January 30, 2022 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants