Skip to content

chore: drop legacy // +build comment#2260

Open
solunolab wants to merge 1 commit into
0xPolygon:developfrom
solunolab:develop
Open

chore: drop legacy // +build comment#2260
solunolab wants to merge 1 commit into
0xPolygon:developfrom
solunolab:develop

Conversation

@solunolab

@solunolab solunolab commented Jun 4, 2026

Copy link
Copy Markdown

Summary

From Go 1.17, the preferred syntax for build constraints is //go:build,
which replaces the old // +build form. The old style is now considered
deprecated but still supported for backward compatibility.

This change removes the obsolete // +build xxx line, keeping only the
modern //go:build xxx directive.

More info: golang/go#41184 and https://go.dev/doc/go1.17#build-lines

Design Doc / Proposal:
https://go.dev/design/draft-gobuild

Inspired by #1931

Executed tests

<what was actually run beyond CI's standard unit / integration / e2e gates: kurtosis scenarios, chaos runs, manual checks against Amoy / mainnet RPCs, devnet upgrades, etc. Include output or pointers to where the run lives.>

Rollout notes

<consensus-affecting? requires coordinated upgrade? backwards-compatible? operator-facing change?>

Signed-off-by: solunolab <solunolab@outlook.com>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@sonarqubecloud

sonarqubecloud Bot commented Jun 4, 2026

Copy link
Copy Markdown

@solunolab

Copy link
Copy Markdown
Author

This failure does not seem related to this PR.

The PR only removes legacy // +build integration lines from tests/bor/* files, while the failing test is in consensus/bor/heimdall/failover_client_test.go.

I checked the failing test locally on this branch:

  • go test ./consensus/bor/heimdall -run TestFailover_NoSwitchOnShutdownDetected -count=1 -v
  • go test ./consensus/bor/heimdall -run TestFailover_NoSwitchOnShutdownDetected -count=50

Both passed.

The failure looks like a flaky race in the test itself: secondary.hits is also incremented by the background health probe via FetchStatus, not only by an actual failover call. So the observed actual: 1 can happen if the immediate health-check probe touches the secondary before the assertion.

I think rerunning CI should be enough here. If you prefer, I can also open a separate follow-up PR to make this test avoid counting background probe hits as failover attempts.

@pratikspatil024 @kamuikatsurgi Hi, Would you mind review this PR at your convenience? Thank you very much.

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.

1 participant