Skip to content

fix: resource unit error with wrong interval#289

Merged
cloud-j-luna merged 1 commit intomainfrom
bug/resource-unit-error
Apr 21, 2026
Merged

fix: resource unit error with wrong interval#289
cloud-j-luna merged 1 commit intomainfrom
bug/resource-unit-error

Conversation

@cloud-j-luna
Copy link
Copy Markdown
Member

📝 Description

This bug returns an inaccurate error message on resource unit intervals for invalid interval errors.

🔧 Purpose of the Change

  • New feature implementation
  • Bug fix
  • Documentation update
  • Code refactoring
  • Dependency upgrade
  • Other: [specify]

✅ Checklist

  • I've updated relevant documentation
  • Code follows Akash Network's style guide
  • I've added/updated relevant unit tests
  • Dependencies have been properly updated
  • I agree and adhered to the Contribution Guidelines

@cloud-j-luna cloud-j-luna requested a review from a team as a code owner April 21, 2026 10:47
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 21, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 876ece1f-187d-47eb-b548-8f9766bb7311

📥 Commits

Reviewing files that changed from the base of the PR and between dae3bbc and fb47205.

📒 Files selected for processing (1)
  • go/node/deployment/v1beta3/resourceunit.go

Walkthrough

Corrected validation error messages in resource unit handling to properly report the configured minimum bound value instead of incorrectly repeating the maximum bound value in error messages for CPU, GPU, and Memory constraints. No logic or control flow changes were made.

Changes

Cohort / File(s) Summary
Validation Error Message Fix
go/node/deployment/v1beta3/resourceunit.go
Updated three validation error messages to report the correct minimum bound (validationConfig.Unit.Min.*) in the third parameter position instead of incorrectly repeating the maximum bound value.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A twitchy fix of strings so bright,
Where min and max were mixed up quite,
Now error tales ring crystal clear,
No bounds confusion need we fear!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix: resource unit error with wrong interval' clearly and concisely summarizes the bug fix for incorrect error message reporting in resource unit validation.
Description check ✅ Passed The PR description includes the required sections with sufficient detail: a clear description of the bug, identified purpose as a bug fix, and completed checklist confirming standards compliance.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bug/resource-unit-error

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.11.4)

level=error msg="[linters_context] typechecking error: pattern ./...: directory prefix . does not contain main module or its selected dependencies"


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

@cloud-j-luna cloud-j-luna added this pull request to the merge queue Apr 21, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Apr 21, 2026
@cloud-j-luna cloud-j-luna added this pull request to the merge queue Apr 21, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Apr 21, 2026
@cloud-j-luna cloud-j-luna added this pull request to the merge queue Apr 21, 2026
@cloud-j-luna cloud-j-luna removed this pull request from the merge queue due to the queue being cleared Apr 21, 2026
@cloud-j-luna cloud-j-luna merged commit 9f9a474 into main Apr 21, 2026
9 checks passed
@cloud-j-luna cloud-j-luna deleted the bug/resource-unit-error branch April 21, 2026 19:12
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