Skip to content

Remove /node/memory endpoint#7822

Merged
achamayou merged 4 commits intomainfrom
copilot/remove-node-memory-endpoint
Apr 16, 2026
Merged

Remove /node/memory endpoint#7822
achamayou merged 4 commits intomainfrom
copilot/remove-node-memory-endpoint

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 15, 2026

The /node/memory endpoint exposed heap size metrics that were primarily useful for monitoring SGX enclave memory budgets. With SGX support removed, this endpoint serves no meaningful purpose — the same information is available via standard OS tooling (/proc, getrusage, etc.).

Core removal

  • src/node/rpc/node_frontend.h: Remove endpoint handler and ccf/pal/mem.h include
  • src/node/rpc/node_call_types.h: Remove MemoryUsage struct
  • src/node/rpc/serialization.h: Remove JSON serialization macros for MemoryUsage::Out
  • include/ccf/pal/mem.h: Remove MallocInfo struct and get_mallinfo() (retain safe_memcpy, still used by ring_buffer.h)

OpenAPI schema

  • doc/schemas/node_openapi.json: Remove /node/memory path and MemoryUsage__Out component

Tests

  • tests/e2e_common_endpoints.py: Remove test_memory() and its invocation
  • tests/e2e_suite.py: Remove mem_stats() helper and its usage in test reporting
  • tests/infra/runner.py, basicperf.py, piccolo_driver.py: Remove post-run memory metric collection via /node/memory
  • tests/historical_query_perf.py: Remove stray c.get("/node/memory") call
  • Clean up now-unused import http in runner.py and piccolo_driver.py

Documentation

  • doc/build_apps/release_policy.rst: Remove "memory usage" from operator API description
  • CHANGELOG.md: Added removal entry under [7.0.0-rc2] → Removed

Copilot AI and others added 2 commits April 15, 2026 07:19
@achamayou achamayou added this to the 7.0.0-rc2 milestone Apr 15, 2026
@achamayou achamayou marked this pull request as ready for review April 15, 2026 08:37
@achamayou achamayou requested a review from a team as a code owner April 15, 2026 08:37
Copilot AI review requested due to automatic review settings April 15, 2026 08:37
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Removes the /node/memory endpoint and its supporting types/serialization, cleaning up OpenAPI, tests, and documentation now that SGX-specific memory monitoring is no longer relevant.

Changes:

  • Deleted /node/memory handler, MemoryUsage types, and related JSON/OpenAPI schema.
  • Removed e2e/perf test usage and reporting of /node/memory-derived metrics.
  • Cleaned up PAL memory helper (get_mallinfo) and updated docs/changelog accordingly.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/infra/runner.py Removes post-run /node/memory metric collection and related import.
tests/infra/piccolo_driver.py Removes /node/memory metric collection and related import.
tests/infra/basicperf.py Removes /node/memory metric collection during perf runs.
tests/historical_query_perf.py Removes stray /node/memory call.
tests/e2e_suite.py Drops mem_stats() helper and removes memory field from test reporting.
tests/e2e_common_endpoints.py Removes test_memory() and its invocation.
src/node/rpc/serialization.h Removes JSON serialization declarations for MemoryUsage::Out.
src/node/rpc/node_frontend.h Removes /memory endpoint registration and PAL include.
src/node/rpc/node_call_types.h Removes MemoryUsage call type and PAL include.
include/ccf/pal/mem.h Removes MallocInfo and get_mallinfo() implementation (keeps safe_memcpy).
doc/schemas/node_openapi.json Removes /node/memory path and MemoryUsage__Out schema component.
doc/build_apps/release_policy.rst Removes “memory usage” reference from operator API description.
CHANGELOG.md Adds changelog entry noting removal of /node/memory.

Comment thread doc/build_apps/release_policy.rst Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@achamayou achamayou merged commit 7edc583 into main Apr 16, 2026
15 of 16 checks passed
@achamayou achamayou deleted the copilot/remove-node-memory-endpoint branch April 16, 2026 09:45
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.

4 participants