Skip to content

chore: exposed BidScreening REST and made ResourceOffer repeated#282

Merged
vertex451 merged 2 commits into
mainfrom
artem/precheck
Apr 7, 2026
Merged

chore: exposed BidScreening REST and made ResourceOffer repeated#282
vertex451 merged 2 commits into
mainfrom
artem/precheck

Conversation

@vertex451
Copy link
Copy Markdown
Contributor

@vertex451 vertex451 commented Apr 6, 2026

Out of scope

Fixed proto-check-breaking CI step and local run as well.
Temorary disabled that check for the BidScreening change, since I am changing the message field in place(Since it is not in production yet)

Changes

  • exposed BidScreening via REST
  • made resource_offer field repeated. We need it to cover multiple ResourceUnits in the GroupSpec. Currently, we can return only one offer in response, offers for other ResourceUnits are ignored.

Related to akash-network/provider#386

@vertex451 vertex451 requested a review from a team as a code owner April 6, 2026 21:06
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 6, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Added an HTTP POST mapping for ProviderRPC.BidScreening; replaced singular resource_offer with repeated resource_offers in BidScreeningResponse; updated CI/workflow and Makefile to fetch origin main and run proto breaking checks against a temporary git worktree directory.

Changes

Cohort / File(s) Summary
Provider RPC & HTTP mapping
proto/provider/akash/provider/v1/service.proto
Added option (google.api.http) = { post: "/v1/bid-screening", body: "*", response_body: "*" } to ProviderRPC.BidScreening, exposing the RPC at POST /v1/bid-screening.
BidScreeningResponse schema
proto/provider/akash/provider/v1/validation.proto
Removed/reserved singular resource_offer (field 3) and added repeated akash.market.v1beta5.ResourceOffer resource_offers = 5 with updated customname, JSON/YAML tags and an updated comment describing per-ResourceUnits offers.
CI workflow: fetch main
.github/workflows/breakage.yaml
Added a step to fetch origin main into local main branch (git fetch origin main:main).
Makefile: proto-breaking against worktree
make/lint.mk
Added PROTO_AGAINST_DIR := $(AKASH_DEVCACHE_TMP)/proto-against; proto-check-breaking now creates a git worktree at $(PROTO_AGAINST_DIR), copies go/vendor into it, runs $(BUF) breaking --against '$(PROTO_AGAINST_DIR)', and removes the worktree (replacing prior .git#branch=main usage).

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

🐇 I munched some proto by lantern light,
One field became many, small and bright.
A POST door opened, HTTP clear,
I planted a worktree — CI draws near.
Hoppity hop, the meadow's right! 🌿

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description deviates significantly from the required template, lacking structured sections and key information needed for proper review and tracking. Restructure the description to follow the template: add a clear 2-3 sentence summary, use the Purpose of Change checkboxes, properly format Related Issues and Checklist sections, and move implementation notes to the Reviewers section.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes both main changes: exposing BidScreening REST endpoint and making ResourceOffer repeated.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch artem/precheck

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link
Copy Markdown
Contributor

@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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@proto/provider/akash/provider/v1/validation.proto`:
- Around line 45-50: The proto was changed to a repeated field named
ResourceOffers (JSON tag resource_offers) but generated Go still exposes a
singular ResourceOffer (json: "resource_offer"); regenerate the protobuf
artifacts so the Go types and JSON tags match the proto: re-run the proto build
step (e.g., protoc with the same plugins used in the repo) that produces
validation.pb.go, ensuring the message in validation.proto (ResourceOffers) is
reflected as a repeated field in the regenerated validation.pb.go and any
affected marshal/unmarshal helpers are updated.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3d0a3cdc-2f75-4c60-82f6-715c760626f1

📥 Commits

Reviewing files that changed from the base of the PR and between 97e43ee and b46ae99.

📒 Files selected for processing (2)
  • proto/provider/akash/provider/v1/service.proto
  • proto/provider/akash/provider/v1/validation.proto

Comment thread proto/provider/akash/provider/v1/validation.proto Outdated
Copy link
Copy Markdown
Contributor

@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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@proto/provider/akash/provider/v1/validation.proto`:
- Around line 49-53: The generated TypeScript protobuf artifacts are out of sync
with the proto change: proto/provider/akash/provider/v1/validation.proto now
defines a repeated field resource_offers, but
ts/src/generated/protos/akash/provider/v1/validation.ts still treats it as a
singular message.resourceOffer and emits obj.resource_offer; regenerate the TS
protobuf outputs (re-run the protobuf/ts codegen toolchain) so the generated
code maps the repeated field to an array (resource_offers) consistently in
serialization/deserialization rather than hand-editing the generated file.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ffec0dba-7982-484b-bb08-3e35d2706727

📥 Commits

Reviewing files that changed from the base of the PR and between b46ae99 and 54bb7bd.

⛔ Files ignored due to path filters (3)
  • go/provider/v1/service.pb.go is excluded by !**/*.pb.go
  • go/provider/v1/service.pb.gw.go is excluded by !**/*.pb.gw.go
  • go/provider/v1/validation.pb.go is excluded by !**/*.pb.go
📒 Files selected for processing (1)
  • proto/provider/akash/provider/v1/validation.proto

Comment thread proto/provider/akash/provider/v1/validation.proto Outdated
Copy link
Copy Markdown
Contributor

@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: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/breakage.yaml:
- Around line 27-29: Replace the overlay copy that uses "cp -r" into the
worktree with a clean replace of the destination vendor directory: after "git
worktree add /tmp/proto-against main" remove or delete
"/tmp/proto-against/go/vendor" entirely and then copy the local "go/vendor" into
"/tmp/proto-against/go/" (or use a sync that deletes extraneous files) so
removed upstream files do not remain; update the workflow step that runs "cp -r
go/vendor /tmp/proto-against/go/" to first delete the destination vendor
directory (or use a sync-with-delete) to ensure a clean replacement.

In `@make/lint.mk`:
- Around line 32-36: The PROTO_AGAINST default value is being truncated because
Make treats '#' as the start of a comment; update the variable assignment
(PROTO_AGAINST) to escape the hash (e.g., use .git\#branch=main) so the full ref
string is retained, ensuring the proto-check-breaking target (which calls $(BUF)
breaking --against '$(PROTO_AGAINST)') compares against the intended baseline;
keep the rest of the target (proto-check-breaking and BUF usage) unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c768c609-3b23-4707-9ead-cc42867c5d8c

📥 Commits

Reviewing files that changed from the base of the PR and between d843990 and 99dd1e1.

⛔ Files ignored due to path filters (2)
  • ts/src/generated/protos/akash/provider/v1/service_akash.ts is excluded by !**/generated/**
  • ts/src/generated/protos/akash/provider/v1/validation.ts is excluded by !**/generated/**
📒 Files selected for processing (2)
  • .github/workflows/breakage.yaml
  • make/lint.mk

Comment thread .github/workflows/breakage.yaml Outdated
Comment thread make/lint.mk Outdated
Comment thread buf.yaml Outdated
use:
- FILE
ignore:
- proto/provider/akash/provider/v1/validation.proto
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Temporary ignoring that file to pass the proto CI check.
Will remove it in the follow up PR.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

no need to do this, can remove this

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed

Comment thread make/lint.mk
@vertex451 vertex451 requested a review from troian April 7, 2026 17:03
@vertex451 vertex451 merged commit cce5283 into main Apr 7, 2026
9 of 10 checks passed
@vertex451 vertex451 deleted the artem/precheck branch April 7, 2026 17:13
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