Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@nesitor
Copy link
Member

@nesitor nesitor commented Dec 3, 2025

Feature: Implement resource checks before allocating a VM.

Related ClickUp, GitHub or Jira tickets : ALEPH-764

Self proofreading checklist

  • The new code clear, easy to read and well commented.
  • New code does not duplicate the functions of builtin or popular libraries.
  • An LLM was used to review the new code and look for simplifications.
  • New classes and functions contain docstrings explaining what they provide.
  • All new code is covered by relevant tests.
  • Documentation has been updated regarding these changes.
  • Dependencies update in the project.toml have been mirrored in the Debian package build script packaging/Makefile

Changes

Added a filter before VM creation that checks if the CRN have enough resource available to allocate the VM. If not returns an error message telling why cannot allocate it.

How to test

Try to create a big instance inside a CRN with not enough available resources, it should show an error before trying to allocate.

@nesitor nesitor self-assigned this Dec 3, 2025
@nesitor nesitor force-pushed the andres-feature-implement_resource_check_on_allocation branch from 559d2cc to 0180fcc Compare December 3, 2025 19:55
@codecov
Copy link

codecov bot commented Dec 10, 2025

Codecov Report

❌ Patch coverage is 79.71014% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.36%. Comparing base (f51cf96) to head (01c4413).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/aleph/vm/resources.py 81.08% 4 Missing and 3 partials ⚠️
src/aleph/vm/orchestrator/run.py 20.00% 4 Missing ⚠️
src/aleph/vm/pool.py 25.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #852      +/-   ##
==========================================
+ Coverage   65.24%   65.36%   +0.11%     
==========================================
  Files          88       88              
  Lines        8515     8578      +63     
  Branches      756      765       +9     
==========================================
+ Hits         5556     5607      +51     
- Misses       2724     2733       +9     
- Partials      235      238       +3     

☔ 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.

@nesitor nesitor force-pushed the andres-feature-implement_resource_check_on_allocation branch from f2d7b37 to 21bc76d Compare December 15, 2025 17:00
Copy link
Member

@1yam 1yam left a comment

Choose a reason for hiding this comment

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

LGTM

@nesitor nesitor merged commit 07d943d into main Dec 17, 2025
55 of 67 checks passed
@nesitor nesitor deleted the andres-feature-implement_resource_check_on_allocation branch December 17, 2025 09:46
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