Skip to content

Comments

Fix CI failures: golangci-lint config and test port conflicts#27

Open
Copilot wants to merge 4 commits intomasterfrom
copilot/fix-test-errors
Open

Fix CI failures: golangci-lint config and test port conflicts#27
Copilot wants to merge 4 commits intomasterfrom
copilot/fix-test-errors

Conversation

Copy link
Contributor

Copilot AI commented Feb 12, 2026

CI was failing due to golangci-lint configuration using deprecated options and flaky tests from port conflicts when packages ran in parallel.

Changes

  • golangci-lint config: Replace deprecated skip-dirs with skip-dirs-use-default: true

  • Test isolation: Change full_sync tests to port 9080 (avoiding collision with iblt on 8080)

  • Connection handling:

    • Add SO_REUSEADDR via net.ListenConfig to eliminate TIME_WAIT port reuse delays
    • Add nil checks in Close() to prevent panics on uninitialized connections
lc := &net.ListenConfig{
    Control: func(network, address string, c syscall.RawConn) error {
        var sockOptErr error
        if err := c.Control(func(fd uintptr) {
            sockOptErr = syscall.SetsockoptInt(int(fd), syscall.SOL_SOCKET, syscall.SO_REUSEADDR, 1)
        }); err != nil {
            return err
        }
        return sockOptErr
    },
}

The SO_REUSEADDR change allows immediate port rebinding, critical for test suite reliability when running packages concurrently.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits February 12, 2026 03:10
Co-authored-by: Bowenislandsong <29466283+Bowenislandsong@users.noreply.github.com>
Co-authored-by: Bowenislandsong <29466283+Bowenislandsong@users.noreply.github.com>
Co-authored-by: Bowenislandsong <29466283+Bowenislandsong@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix errors to ensure all tests pass Fix CI failures: golangci-lint config and test port conflicts Feb 12, 2026
@Bowenislandsong Bowenislandsong marked this pull request as ready for review February 16, 2026 20:51
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.

2 participants