Skip to content

✨ API Server Added - #281

Merged
mergify[bot] merged 1 commit into
openebs:developfrom
mhkarimi1383:add-api-server
Jun 21, 2026
Merged

✨ API Server Added#281
mergify[bot] merged 1 commit into
openebs:developfrom
mhkarimi1383:add-api-server

Conversation

@mhkarimi1383

Copy link
Copy Markdown
Member

No description provided.

@mhkarimi1383
mhkarimi1383 requested a review from a team as a code owner February 1, 2026 17:56
@mergify

mergify Bot commented Feb 1, 2026

Copy link
Copy Markdown
Contributor

🧪 CI Insights

Here's what we observed from your CI run for fa85f2b.

🟢 All jobs passed!

But CI Insights is watching 👀

@mhkarimi1383
mhkarimi1383 marked this pull request as draft February 3, 2026 09:29
Comment thread rawfile/config/model.py
@mhkarimi1383

Copy link
Copy Markdown
Member Author

@mergify squash

@mergify

mergify Bot commented Feb 25, 2026

Copy link
Copy Markdown
Contributor

squash

✅ Pull request squashed successfully

mhkarimi1383 added a commit to mhkarimi1383/rawfile-localpv that referenced this pull request Feb 25, 2026
* 🚧 Adding API Server

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* Merge branch 'develop' into add-api-server

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* 📦 Fix Lock

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>
@mhkarimi1383
mhkarimi1383 force-pushed the add-api-server branch 2 times, most recently from 95ab381 to 5dfd46e Compare February 26, 2026 11:16
@mhkarimi1383

Copy link
Copy Markdown
Member Author

@mergify rebase

@mergify

mergify Bot commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

rebase

❌ Base branch update has failed

Details

Git reported the following error:

Rebasing (1/2)
Auto-merging poetry.lock
CONFLICT (content): Merge conflict in poetry.lock
Auto-merging pyproject.toml
Auto-merging rawfile/config/model.py
error: could not apply 14ff8a7... :construction: Adding API Server
hint: Resolve all conflicts manually, mark them as resolved with
hint: "git add/rm <conflicted_files>", then run "git rebase --continue".
hint: You can instead skip this commit: run "git rebase --skip".
hint: To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 14ff8a7... :construction: Adding API Server

@mhkarimi1383

Copy link
Copy Markdown
Member Author

@mergify squash

@mergify

mergify Bot commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

squash

✅ Pull request squashed successfully

mhkarimi1383 added a commit to mhkarimi1383/rawfile-localpv that referenced this pull request Feb 26, 2026
* 🚧 Adding API Server

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* Merge branch 'develop' into add-api-server

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* 📦 Fix Lock and init API Server

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>
mhkarimi1383 added a commit to mhkarimi1383/rawfile-localpv that referenced this pull request Feb 26, 2026
* 🚧 Adding API Server

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* Merge branch 'develop' into add-api-server

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* 📦 Fix Lock and init API Server

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>
mhkarimi1383 added a commit to mhkarimi1383/rawfile-localpv that referenced this pull request Feb 26, 2026
* 🚧 Adding API Server

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* Merge branch 'develop' into add-api-server

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* 📦 Fix Lock and init API Server

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>
mhkarimi1383 added a commit to mhkarimi1383/rawfile-localpv that referenced this pull request Feb 26, 2026
* 🚧 Adding API Server

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* Merge branch 'develop' into add-api-server

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* 📦 Fix Lock and init API Server

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>
mhkarimi1383 added a commit to mhkarimi1383/rawfile-localpv that referenced this pull request Feb 26, 2026
* 🚧 Adding API Server

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* Merge branch 'develop' into add-api-server

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* 📦 Fix Lock and init API Server

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>
Comment thread rawfile/api_server/v1/routes/nodes.py Outdated
@github-actions

Copy link
Copy Markdown

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions Bot added the Stale label Apr 19, 2026
@github-actions github-actions Bot removed the Stale label Apr 28, 2026
@mhkarimi1383
mhkarimi1383 force-pushed the add-api-server branch 2 times, most recently from d825746 to 1b45093 Compare May 10, 2026 08:09
@mhkarimi1383

Copy link
Copy Markdown
Member Author

@mergify squash

@mergify

mergify Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

squash

✅ Pull request squashed successfully

mhkarimi1383 added a commit to mhkarimi1383/rawfile-localpv that referenced this pull request Jun 18, 2026
* ✨ API Server Added (openebs#281)

* ✨ Adding API Server (openebs#281)

* 🚧 Adding API Server (openebs#281)

* 🚧 Adding API Server

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* Merge branch 'develop' into add-api-server

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* 📦 Fix Lock and init API Server

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* ✨ Add get signle node API

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* 🚧 Adding new endpoints...

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* 🚧 Add get task status api

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* Merge branch 'develop' into add-api-server

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* ✨ Add new endpoints to internal servicer

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* Merge branch 'develop' into add-api-server

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* 📦 Lock file update

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* ♻️ Use deployment instead of statefulset for controller

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* ✨ Add API Server to Chart

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* 🎨 Better gRPC access log

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* ✏️ Add internal port env to api server

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* ⚡ Change VolumeStats Fields

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* ✏️ Some typing fixes

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* ⚡ Improve internal gRPC client

Managing connections and support for AIO client

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* 🔀 Apply openebs#344

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* Merge branch 'develop' into add-api-server

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* ✨ Add version to api server

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* Merge branch 'develop' into add-api-server

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* Update rawfile/orchestrator/k8s.py

Co-authored-by: Tiago Castro <tiagolobocastro@gmail.com>
Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* Merge branch 'develop' into add-api-server

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* ⚡ Add node status indicator to API

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* Merge branch 'develop' into add-api-server
Comment thread rawfile/api_server/v1/routes/nodes/__init__.py Outdated

Copilot AI 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.

⚠️ Not ready to approve

There are multiple confirmed runtime-breaking issues (API task routes calling gRPC without request/iterating protobuf maps incorrectly, internal task kwargs proto mismatch) plus Helm template condition bugs that can render unexpected/invalid resources.

Pull request overview

Adds an HTTP API server (FastAPI) to expose node/pool/volume/task visibility by calling a newly-extended internal gRPC service, and updates configuration + Helm deployment to run the API server alongside the controller.

Changes:

  • Introduces a FastAPI API server (/v1/nodes/...) and Pydantic response models to surface node/pool/volume/task information.
  • Extends the internal gRPC proto/service with pool stats, volume stats, and task listing RPCs; updates internal client utilities (stub caching + shutdown).
  • Refactors gRPC request logging into a parameterized decorator class and updates Helm to deploy the API server container.
File summaries
File Description
rawfile/utils/volume_manager.py Minor refactor to return stats dict directly.
rawfile/utils/remote.py Adds internal gRPC client stub/channel caching and shutdown helper.
rawfile/utils/logs.py Replaces function decorator with GRPCLogger class for gRPC access/error logging.
rawfile/rawfile.py Adds API server start path; moves internal gRPC port/signature to top-level config usage.
rawfile/rawfile_servicer.py Switches internal gRPC calls to shared stub helper + auth metadata.
rawfile/protos/internal.proto Adds internal RPCs/messages for pools/volumes/tasks stats.
rawfile/orchestrator/k8s.py Reads node DaemonSet name from top-level node_ds; adds get_all_nodes().
rawfile/internal/internal_pb2.pyi Regenerated typing stubs for new internal proto messages.
rawfile/internal/internal_pb2.py Regenerated protobuf module for new internal proto messages.
rawfile/internal/internal_pb2_grpc.py Regenerated gRPC stubs; adds new RPC methods.
rawfile/internal_svc.py Implements new internal RPC handlers for pools/volumes/tasks.
rawfile/csi/csi_pb2_grpc.py Regenerated CSI gRPC stubs with updated generator version string.
rawfile/config/model.py Adds APICmd, top-level internal_* + node_ds, and validation for API/CSI modes.
rawfile/bd2fs.py Updates to new GRPCLogger decorator usage.
rawfile/api_server/v1/routes/nodes/volumes.py New API endpoints for volume stats by node/pool.
rawfile/api_server/v1/routes/nodes/tasks.py New API endpoints for task listing by node.
rawfile/api_server/v1/routes/nodes/init.py New API endpoints for node listing + pool stats fanout via async gRPC.
rawfile/api_server/v1/routes/init.py API v1 router wiring.
rawfile/api_server/v1/models/nodes.py Pydantic models/type aliases for nodes/pools/volumes/tasks.
rawfile/api_server/v1/models/init.py Exports API models.
rawfile/api_server/init.py FastAPI app creation + uvicorn.run entrypoint helper.
pyproject.toml Adds FastAPI + uvicorn deps.
deploy/helm/rawfile-localpv/values.yaml Adds capabilities.apiServer and reshapes comments/formatting.
deploy/helm/rawfile-localpv/templates/node-plugin/daemonset.yaml Renames env vars for moved settings (INTERNAL_*, NODE_DS).
deploy/helm/rawfile-localpv/templates/controller/service.yaml Adds API server port and conditionally renders controller service.
deploy/helm/rawfile-localpv/templates/controller/deployment.yaml Switches controller workload to Deployment; adds API server container.
deploy/helm/rawfile-localpv/README.md Documents new capabilities.apiServer.enabled.
.pre-commit.sh Adjusts version sync script formatting/grep behavior.

Copilot's findings

Files not reviewed (1)

  • rawfile/internal/internal_pb2.py: Generated file

Comments suppressed due to low confidence (2)

deploy/helm/rawfile-localpv/templates/controller/deployment.yaml:2

  • The controller Deployment currently renders when ($cap.apiServer) is non-empty, which will be truthy even if capabilities.apiServer.enabled is false. This makes it hard to disable the controller workload via values and can deploy it unexpectedly.
    deploy/helm/rawfile-localpv/templates/controller/deployment.yaml:30
  • This template block uses $cap.apiServer.enabled; if capabilities.apiServer is unset, Helm will error when accessing .enabled. Since the guard at the top can be made nil-safe via $api := $cap.apiServer | default dict, use $api.enabled consistently here too.
  • Files reviewed: 27/29 changed files
  • Comments generated: 10

Note

Your feedback helps us improve the quality of this feature.
Please use 👍 or 👎 to tell us whether this assessment is correct.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread deploy/helm/rawfile-localpv/templates/controller/service.yaml Outdated
Comment thread rawfile/api_server/v1/routes/nodes/tasks.py
Comment thread rawfile/api_server/v1/routes/nodes/tasks.py
Comment thread rawfile/api_server/v1/routes/nodes/volumes.py Outdated
Comment thread rawfile/api_server/v1/routes/nodes/volumes.py Outdated
Comment thread rawfile/api_server/v1/routes/nodes/__init__.py Outdated
Comment thread rawfile/internal_svc.py
Comment thread rawfile/internal_svc.py
Comment thread rawfile/config/model.py
Comment thread deploy/helm/rawfile-localpv/templates/controller/service.yaml Outdated
@mergify

mergify Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@mhkarimi1383

mhkarimi1383 commented Jun 20, 2026

Copy link
Copy Markdown
Member Author

@mergify squash

@mergify

mergify Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

squash

✅ Pull request squashed successfully

* ✨ API Server Added (openebs#281)

* ✨ API Server Added (openebs#281)

* ✨ Adding API Server (openebs#281)

* 🚧 Adding API Server (openebs#281)

* 🚧 Adding API Server

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* Merge branch 'develop' into add-api-server

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* 📦 Fix Lock and init API Server

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* ✨ Add get signle node API

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* 🚧 Adding new endpoints...

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* 🚧 Add get task status api

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* Merge branch 'develop' into add-api-server

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* ✨ Add new endpoints to internal servicer

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* Merge branch 'develop' into add-api-server

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* 📦 Lock file update

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* ♻️ Use deployment instead of statefulset for controller

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* ✨ Add API Server to Chart

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* 🎨 Better gRPC access log

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* ✏️ Add internal port env to api server

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* ⚡ Change VolumeStats Fields

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* ✏️ Some typing fixes

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* ⚡ Improve internal gRPC client

Managing connections and support for AIO client

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* 🔀 Apply openebs#344

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* Merge branch 'develop' into add-api-server

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* ✨ Add version to api server

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* Merge branch 'develop' into add-api-server

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* Update rawfile/orchestrator/k8s.py

Co-authored-by: Tiago Castro <tiagolobocastro@gmail.com>
Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* Merge branch 'develop' into add-api-server

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* ⚡ Add node status indicator to API

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* Merge branch 'develop' into add-api-server

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>

* 🐛 Fix some typos and reviews

Signed-off-by: Muhammed Hussain Karimi <info@karimi.dev>
@mhkarimi1383

mhkarimi1383 commented Jun 21, 2026

Copy link
Copy Markdown
Member Author

@tiagolobocastro I will merge it for now, For openapi.json file, It's a bit complicated, I have to call app.openapi() and then It will import other parts, And will raise error

I wanted to call it in release in the CI and put openapi.json and openapi.yaml files in the release files

@mhkarimi1383

Copy link
Copy Markdown
Member Author

@mergify queue

@mergify

mergify Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Deprecation notice: This pull request comes from a fork and was queued with update_method=rebase and update_bot_account impersonation. This capability will be removed on July 1, 2026. After this date, the merge queue will no longer be able to rebase fork pull requests with this configuration. To avoid disruption, switch to update_method=merge in your queue rule.

@mergify

mergify Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • Entered queue2026-06-21 11:14 UTC · Rule: default
  • Checks skipped · PR is already up-to-date
  • 🚫 Left the queue2026-06-21 11:14 UTC · at f1af72912512c5068609f4812a5cf4962e26cf80

This pull request spent 22 seconds in the queue, including 22 seconds running CI.

Waiting for
  • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
All conditions
  • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
  • #approved-reviews-by >= 1 [🛡 GitHub branch protection]
  • check-success = ci
  • any of [🛡 GitHub branch protection]:
    • check-success = DCO
    • check-neutral = DCO
    • check-skipped = DCO
  • any of [🛡 GitHub branch protection]:
    • check-success = ci
    • check-neutral = ci
    • check-skipped = ci
  • any of [🛡 GitHub branch protection]:
    • check-neutral = Mergify Merge Protections
    • check-skipped = Mergify Merge Protections
    • check-success = Mergify Merge Protections

Reason

Pull request #281 has been dequeued

merge conditions no longer match. Blocked by:

  • #review-threads-unresolved = 0

  • #review-threads-unresolved = 0 [🛡 GitHub branch protection]

Hint

You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it.
If you do update this pull request, it will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue instead, you can requeue the pull request, without updating it, by posting a @mergifyio queue comment.

Requeued — the merge queue status continues in this comment ↓.

@mergify

mergify Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

queue

❌ The pull request has been removed from the queue default

Details

Pull request #281 has been dequeued

merge conditions no longer match. Blocked by:

  • #review-threads-unresolved = 0

  • #review-threads-unresolved = 0 [🛡 GitHub branch protection].

You can take a look at Mergify Merge Queue check runs for more details about the failure.

@mergify

mergify Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • 🟠 Waiting for queue conditions
  • ⏳ Enter queue
  • ⏳ Run checks
  • ⏳ Merge
Required conditions to enter a queue
  • -closed [📌 queue requirement]
  • -conflict [📌 queue requirement]
  • -draft [📌 queue requirement]
  • any of [📌 queue -> configuration change requirements]:
    • -mergify-configuration-changed
    • check-success = Configuration changed
  • any of [📌 queue requirement]:
    • check-neutral = Mergify Merge Protections
    • check-skipped = Mergify Merge Protections
    • check-success = Mergify Merge Protections
  • any of [🔀 queue conditions]:
    • all of [📌 queue conditions of queue rule default]:
      • check-success = ci

@mhkarimi1383

Copy link
Copy Markdown
Member Author

@mergify requeue

@mergify

mergify Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • Entered queue2026-06-21 13:45 UTC · Rule: default
  • Checks skipped · PR is already up-to-date
  • Merged2026-06-21 13:46 UTC · at f1af72912512c5068609f4812a5cf4962e26cf80

This pull request spent 22 seconds in the queue, including 10 seconds running CI.

Required conditions to merge
  • #approved-reviews-by >= 1 [🛡 GitHub branch protection]
  • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
  • check-success = ci
  • any of [🛡 GitHub branch protection]:
    • check-success = DCO
    • check-neutral = DCO
    • check-skipped = DCO
  • any of [🛡 GitHub branch protection]:
    • check-success = ci
    • check-neutral = ci
    • check-skipped = ci
  • any of [🛡 GitHub branch protection]:
    • check-neutral = Mergify Merge Protections
    • check-skipped = Mergify Merge Protections
    • check-success = Mergify Merge Protections

@mergify mergify Bot added the queued label Jun 21, 2026
@mergify
mergify Bot merged commit 9ca2d0c into openebs:develop Jun 21, 2026
14 checks passed
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.

3 participants