-
Notifications
You must be signed in to change notification settings - Fork 964
Improve TiCS #16283
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
Improve TiCS #16283
Conversation
Signed-off-by: Simon Deziel <[email protected]>
Signed-off-by: Simon Deziel <[email protected]>
Signed-off-by: Simon Deziel <[email protected]>
Signed-off-by: Simon Deziel <[email protected]>
Signed-off-by: Simon Deziel <[email protected]>
Signed-off-by: Simon Deziel <[email protected]>
Signed-off-by: Simon Deziel <[email protected]>
Signed-off-by: Simon Deziel <[email protected]>
Signed-off-by: Simon Deziel <[email protected]>
Signed-off-by: Simon Deziel <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request improves TiCS (likely a code quality tool or static analysis) by addressing various code quality issues and enhancing error handling throughout the LXD codebase.
- Enhances error handling by properly checking return values from functions like
tcp.ExtractConn()
andfile.Close()
- Consolidates duplicate IP address scope detection logic into more concise conditional statements
- Adds test coverage for LXD subcommands and fork subcommands
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
test/suites/basic.sh | Adds comprehensive test coverage for LXD subcommands and fork subcommands |
shared/ws/upgrader.go | Improves error handling for TCP connection extraction |
shared/netutils/network_linux_cgo.go | Consolidates IP address scope detection logic |
lxd/response/response.go | Enhances error checking for TCP connection extraction |
lxd/resources/network.go | Consolidates duplicate IP scope detection code |
lxd/migration_connection.go | Improves TCP connection error handling |
lxd/metrics/metrics.go | Simplifies CPU device name parsing using strings.CutPrefix |
lxd/main_forkfile.go | Moves root privilege check after help/version argument handling |
lxd/instance_sftp.go | Adds proper error checking for TCP connection extraction |
lxd/instance/drivers/driver_lxc.go | Adds bounds checking for filesystem stats parsing |
lxd/api_internal.go | Improves error handling for root disk device detection |
lxd-benchmark/benchmark/report.go | Enhances file closing error handling with proper logging |
client/lxd_events.go | Adds error handling for connection info retrieval |
client/lxd.go | Improves error handling for response body closing and event listeners |
client/devlxd.go | Enhances TCP connection error checking |
Comments suppressed due to low confidence (1)
lxd/main_forkfile.go:1
- The variable
listenfd
is being overwritten on line 34 without being used, which means the first argument retrieved on line 29 is lost. This appears to be a logic error in argument parsing.
package main
b6f817e
to
042d74b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
042d74b
to
599b939
Compare
Point to `man 5 fstab` for a description of each fields. Signed-off-by: Simon Deziel <[email protected]>
…vice()` Signed-off-by: Simon Deziel <[email protected]>
Signed-off-by: Simon Deziel <[email protected]>
Signed-off-by: Simon Deziel <[email protected]>
This fixes a problem with the replaced implementation considering `127:db8::1` as a link local IP despite being a valid global IPv6. Signed-off-by: Simon Deziel <[email protected]>
Signed-off-by: Simon Deziel <[email protected]>
Signed-off-by: Simon Deziel <[email protected]>
Signed-off-by: Simon Deziel <[email protected]>
Signed-off-by: Simon Deziel <[email protected]>
Signed-off-by: Simon Deziel <[email protected]>
Signed-off-by: Simon Deziel <[email protected]>
Signed-off-by: Simon Deziel <[email protected]>
Signed-off-by: Simon Deziel <[email protected]>
599b939
to
3a7bdc6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
No description provided.