Skip to content

Conversation

@1yam
Copy link
Member

@1yam 1yam commented Dec 4, 2025

This PR adds:

  • Filter on CRN list to allow user to filter crn from crn list based on a vm resources (vcpus, ram, disk)

Related ClickUp, GitHub or Jira tickets : ALEPH-

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.

Changes

This pull request enhances the filtering capabilities of the CRN (Compute Resource Node) service by allowing users to filter nodes based on specific VM resource requirements (CPU, memory, disk). To support this, new data models for system usage and VM resources have been introduced, and the filtering logic has been updated accordingly.

Filtering and API Enhancements

  • Added a new VmResources model to specify VM requirements (vCPUs, memory in MiB, disk in MiB), and updated the filter_crn method to accept this as an optional parameter. The method now filters nodes based on available resources, ensuring that only nodes meeting the specified criteria are returned. [1] [2] [3] [4]

Data Model Additions

  • Introduced several new models (CpuLoad, CoreFrequencies, CpuInfo, MemoryInfo, DiskInfo, UsagePeriod, SystemUsage) to represent detailed system usage statistics for CRNs. These are now included in the CRN model as an optional system_usage field, enabling resource-based filtering. [1] [2] [3]

@1yam 1yam requested a review from nesitor December 4, 2025 15:43
@aleph-im aleph-im deleted a comment from github-actions bot Dec 4, 2025
@1yam 1yam requested a review from odesenfans December 23, 2025 14:21
@1yam 1yam self-assigned this Dec 23, 2025
Copy link
Contributor

@odesenfans odesenfans left a comment

Choose a reason for hiding this comment

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

A few remarks.

@1yam 1yam force-pushed the 1yam-better-filter-crn branch from 5f94591 to a6861a6 Compare December 24, 2025 13:53
@1yam 1yam requested a review from odesenfans January 5, 2026 13:19
Copy link
Contributor

@odesenfans odesenfans left a comment

Choose a reason for hiding this comment

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

Minor comments, looks okay besides that.

@1yam 1yam force-pushed the 1yam-better-filter-crn branch from 2a5daff to a57000e Compare January 14, 2026 11:29
@odesenfans odesenfans merged commit 7373c43 into main Jan 14, 2026
37 checks passed
@odesenfans odesenfans deleted the 1yam-better-filter-crn branch January 14, 2026 16:47
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