Skip to content

Conversation

@troian
Copy link
Member

@troian troian commented Nov 24, 2025

No description provided.

@troian troian requested a review from a team as a code owner November 24, 2025 13:58
@coderabbitai
Copy link

coderabbitai bot commented Nov 24, 2025

Walkthrough

Updates build configuration to add static Linux builds in goreleaser for amd64 and arm64 architectures, restructures Makefile BUILD_TAGS with conditional ledger support, and changes default test snapshot network from mainnet to sandbox-2.

Changes

Cohort / File(s) Summary
Goreleaser static builds
.goreleaser.yaml
Adds two new static Linux builds (akash-linux-amd64-static, akash-linux-arm64-static) with dedicated compiler flags and static linking, introduces static archives entry for bundling binaries, and extends checksum configuration with name_template.
Build tags configuration
Makefile
Removes hidraw and ledger from default BUILD_TAGS (now osusergo,netgo); adds conditional logic to append these tags back if BUILD_OPTIONS contains noledger.
Test infrastructure
make/test-upgrade.mk
Changes default SNAPSHOT_SOURCE from mainnet to sandbox-2.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • Focus on .goreleaser.yaml: verify static build flags (--static), compiler configurations, and archive naming patterns are correct for both architectures.
  • Review Makefile conditional logic: ensure BUILD_OPTIONS parsing and tag augmentation work as intended for ledger support.

Possibly related PRs

Poem

🐰 Static builds shall stand so tall,
Arm64, amd64, no tricks at all,
Ledger tags dance in the conditional light,
Sandbox-2 welcomes the test's new flight,
Build configurations bundled with care!

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive No description was provided by the author, making it impossible to assess whether it relates to the changeset. Add a pull request description explaining the motivation and changes, even if brief.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding static binaries without ledger support, which is reflected in the .goreleaser.yaml and Makefile modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch static

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
.goreleaser.yaml (1)

168-168: Consider removing the redundant explicit name template.

Line 167 indicates this is the default format. Since the specified template matches the default, this line could be removed to reduce configuration noise.

-  name_template: "akash_{{ .Version }}_checksums.txt"
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 009fab0 and d38c0c9.

📒 Files selected for processing (3)
  • .goreleaser.yaml (2 hunks)
  • Makefile (2 hunks)
  • make/test-upgrade.mk (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: network-upgrade
  • GitHub Check: release-dry-run
  • GitHub Check: sims
  • GitHub Check: coverage
  • GitHub Check: build-macos
  • GitHub Check: build-bins
  • GitHub Check: lint-go
  • GitHub Check: tests
🔇 Additional comments (5)
Makefile (1)

29-29: LGTM!

Adding osusergo and netgo as default build tags is appropriate for enabling static linking and pure Go implementations of OS and network interfaces.

.goreleaser.yaml (3)

87-105: Static build configuration looks correct.

The static build intentionally uses hardcoded tags osusergo,netgo (Line 99) without ledger support, aligning with the PR objective to build static binaries without ledger. The --static flag in extldflags (Line 105) enables full static linking.


106-124: LGTM!

The ARM64 static build configuration correctly mirrors the AMD64 static build, using the same tag strategy and static linking flags.


155-164: LGTM!

The static archive configuration appropriately bundles the static binaries with a clear naming convention (_static suffix) that distinguishes them from the regular builds.

make/test-upgrade.mk (1)

24-24: Infrastructure verification confirms sandbox-2 resources are accessible and operational.

The verification script results show that both the chain metadata URL and the snapshot service for sandbox-2 are operational:

  • Metadata endpoint: ✓ Accessible (returns valid meta.json)
  • Snapshot service: Responds with HTTP 302 (operational and routing correctly)

The change from mainnet to sandbox-2 is supported by functional infrastructure. Tests can proceed with the new default network source.

Comment on lines +42 to +44
ifneq (,$(findstring noledger,$(BUILD_OPTIONS)))
BUILD_TAGS := $(BUILD_TAGS),hidraw,ledger
endif
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

The conditional logic appears inverted.

The condition adds hidraw and ledger tags when noledger is present in BUILD_OPTIONS. This seems counterintuitive—if noledger is specified, one would expect ledger-related tags to be excluded, not added.

If the intent is to add ledger support by default and only exclude it when noledger is specified, the logic should be inverted:

-ifneq (,$(findstring noledger,$(BUILD_OPTIONS)))
+ifeq (,$(findstring noledger,$(BUILD_OPTIONS)))
 	BUILD_TAGS := $(BUILD_TAGS),hidraw,ledger
 endif

If the current logic is intentional, please add a comment explaining why noledger triggers the addition of ledger tags.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
ifneq (,$(findstring noledger,$(BUILD_OPTIONS)))
BUILD_TAGS := $(BUILD_TAGS),hidraw,ledger
endif
ifeq (,$(findstring noledger,$(BUILD_OPTIONS)))
BUILD_TAGS := $(BUILD_TAGS),hidraw,ledger
endif
🤖 Prompt for AI Agents
In Makefile around lines 42 to 44, the conditional is inverted: it appends
hidraw and ledger tags when BUILD_OPTIONS contains "noledger". Change the
condition so the tags are added only when "noledger" is NOT present (i.e.,
invert the findstring check), or alternatively move the tag addition to the
default path and add a branch that removes or omits those tags when "noledger"
is present; if leaving current behavior, add a clear comment explaining why the
presence of "noledger" must enable ledger tags.

@github-actions
Copy link

github-actions bot commented Dec 5, 2025

Marked as stale; will be closed in five days.
Cut bait or go fishing!

@github-actions github-actions bot added the stale label Dec 5, 2025
@github-actions github-actions bot closed this Dec 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants