Skip to content

ALEPH-615 Expose resources for executions#833

Open
olethanh wants to merge 1 commit intomainfrom
ol-aleph-615-executions-resources
Open

ALEPH-615 Expose resources for executions#833
olethanh wants to merge 1 commit intomainfrom
ol-aleph-615-executions-resources

Conversation

@olethanh
Copy link
Copy Markdown
Contributor

@olethanh olethanh commented Sep 16, 2025

Add a new resources field on existing endpoint /v2/about/executions/resources to expose resources for instances

Related ClickUp, GitHub or Jira tickets : ALEPH-615

Opening this PR so we can discuss what info we need and the format.

Examples of what this endpoint will return, this is basically the same endpoint with added resource field.

{
  "decadecadecadecadecadecadecadecadecadecadecadecadecadecadecadeca": {
    "networking": {
      "ipv4_network": "172.16.4.0/24",
      "host_ipv4": "64.227.122.196",
      "ipv6_network": "2a01:e0a:8b1:95e1:3:deca:deca:dec0/124",
      "ipv6_ip": "2a01:e0a:8b1:95e1:3:deca:deca:dec1",
      "ipv4_ip": "172.16.4.2",
      "mapped_ports": {
        "22": {
          "host": 24001,
          "tcp": true,
          "udp": false
        }
      }
    },
    "resources": {
      "vcpus": 1,
      "memory": 512,
      "disk_mib": 2048,
    },
    "status": {
      "defined_at": "2025-09-16 13:35:18.983564+00:00",
      "preparing_at": "2025-09-16 13:35:19.012594+00:00",
      "prepared_at": "2025-07-29 11:11:35.853427",
      "starting_at": "2025-07-29 11:11:35.891511",
      "started_at": "2025-09-16 13:35:19.075488+00:00",
      "stopping_at": null,
      "stopped_at": null
    }
  }
}

@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 18, 2025

Codecov Report

❌ Patch coverage is 55.55556% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.62%. Comparing base (1e2a8c5) to head (bff740b).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/aleph/vm/orchestrator/utils.py 55.55% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #833      +/-   ##
==========================================
+ Coverage   68.59%   68.62%   +0.03%     
==========================================
  Files         104      104              
  Lines       11812    11821       +9     
  Branches     1007     1010       +3     
==========================================
+ Hits         8102     8112      +10     
+ Misses       3448     3446       -2     
- Partials      262      263       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@olethanh olethanh force-pushed the ol-aleph-615-executions-resources branch from d76df62 to c515807 Compare September 18, 2025 13:55
@nesitor nesitor self-assigned this Oct 21, 2025
@nesitor nesitor requested a review from odesenfans October 21, 2025 10:54
@nesitor nesitor force-pushed the ol-aleph-615-executions-resources branch 2 times, most recently from 6713f9b to 23087df Compare October 21, 2025 11:34
@nesitor nesitor marked this pull request as ready for review October 21, 2025 14:21
@nesitor nesitor changed the title WIP ALEPH-615 Expose resources for executions ALEPH-615 Expose resources for executions Oct 21, 2025
if getattr(volume, "size_mib", None):
disk_size_mib += volume.size_mib

return disk_size_mib
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why do we need this if it's coming from the message itself? I don't like that the node can report whatever it wants.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Up

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.

Because on the message we don't have the real sizes used on the VMs, like on volumes and on runtime and code. The idea of this PR is to show the real resources used by the VMs. Indeed the PR need tobe finished solving the TODO tasks, I have put on review just to check the format.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

From our conversation earlier, the goal of this PR is unclear. Let's not merge it until its purpose is clarified.

@aliel aliel force-pushed the ol-aleph-615-executions-resources branch from 23087df to bff740b Compare March 23, 2026 11:12
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