Skip to content

Conversation

@olethanh
Copy link
Collaborator

@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

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 64.76%. Comparing base (105c7f0) to head (23087df).

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   64.68%   64.76%   +0.08%     
==========================================
  Files          88       88              
  Lines        8160     8169       +9     
  Branches      734      737       +3     
==========================================
+ Hits         5278     5291      +13     
+ Misses       2653     2647       -6     
- Partials      229      231       +2     

☔ 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 from fee8c98 to 3e33743 Compare October 21, 2025 10:57
@nesitor nesitor force-pushed the ol-aleph-615-executions-resources branch 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
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.

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