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

Skip to content

Conversation

@1yam
Copy link
Member

@1yam 1yam commented Jun 13, 2025

This PR implement Port Forwarding and also simplify some heavy logic is now on SDK side,
This also refactor the UI parts of aleph instance list to have his own class to build the UI

Related ClickUp, GitHub or Jira tickets : ALEPH-XXX

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

The documentation regarding the impacted features is available on:

Not pushed yett

The changes in the documentation are available here:

Not pushed yett

Changes

This pull request introduces several updates to the Aleph client, focusing on enhancing instance management, port forwarding capabilities, and simplifying code. Key changes include adding support for port forwarding, improving instance deletion logic, and simplifying the list_instances command to leverage new utility methods.

Instance Management Enhancements:

  • Improved logic for deleting instances by adding support for erasing associated VMs and handling auto-scheduled instances more robustly. [1] [2]
  • Simplified the list_instances command to use utility methods for fetching instances and allocations, removing manual filtering and processing logic.

Port Forwarding Features:

  • Added port forwarding functionality during instance creation, enabling TCP and UDP port management.
  • Introduced a new sub-command port-forwarder to manage port forwarding for instances.

Codebase Simplification:

  • Removed unused imports and redundant code in src/aleph_client/commands/instance/__init__.py and src/aleph_client/commands/instance/network.py. [1] [2] [3]
  • Consolidated utility methods for fetching instance-related information, reducing code duplication. [1] [2]

Dependency Updates:

  • Updated the aleph-sdk-python dependency to a new branch for improved network support.

Help Strings:

  • Added detailed help strings for port forwarding options to improve user guidance.

How to test

Print screen / video

Notes

Things that the reviewers should know: known bugs that are out of the scope of the PR, other trade-offs that were made.
If the PR depends on a PR in another repo, or merges into another PR (i.o. main), it should also be mentioned here

@codecov
Copy link

codecov bot commented Jun 23, 2025

Codecov Report

Attention: Patch coverage is 66.40927% with 174 lines in your changes missing coverage. Please review.

Project coverage is 60.91%. Comparing base (20a3e1f) to head (2e980e4).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
...c/aleph_client/commands/instance/port_forwarder.py 59.72% 75 Missing and 14 partials ⚠️
src/aleph_client/commands/instance/display.py 79.32% 25 Missing and 18 partials ⚠️
src/aleph_client/commands/instance/__init__.py 50.00% 17 Missing and 7 partials ⚠️
src/aleph_client/commands/instance/network.py 50.00% 13 Missing and 5 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #376      +/-   ##
==========================================
- Coverage   61.64%   60.91%   -0.73%     
==========================================
  Files          19       20       +1     
  Lines        3379     3718     +339     
  Branches      473      524      +51     
==========================================
+ Hits         2083     2265     +182     
- Misses       1055     1184     +129     
- Partials      241      269      +28     

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

@1yam 1yam requested a review from nesitor June 24, 2025 11:02
@aleph-im aleph-im deleted a comment from github-actions bot Jun 26, 2025
@nesitor nesitor merged commit 3480aed into master Jun 26, 2025
14 of 15 checks passed
@nesitor nesitor deleted the 1yam-ipv4 branch June 26, 2025 15:42
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