Skip to content

Conversation

olethanh
Copy link
Collaborator

  • Fetch port forwarding config for the instance from the user aggregate and set it up using nftables
  • Add the redirected port info to the /v2/executions/list endpoint (since we didn't released it yet), as well as the ipv4 address
  • Add the global detect ipv4 of the crn on this endpoint as well
  • Add /control/ITEM_HASH/update endpoint to tell the CRN to reload the config
  • Fixed the database code so we can update the ExecutionRecord instead of only allowing the first save.
  • Add column mapped_port on the DB, use if when reloading persistent_executions.

Related ClickUp, GitHub or Jira tickets : ALEPH-551

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

Notes

At the moment I hard coded a port forwarding of 22/TCC for all instance if there is no aggregate for the user , this is to help testing but will need to be removed before going in production.

Copy link

codecov bot commented Jun 2, 2025

Codecov Report

Attention: Patch coverage is 46.73913% with 147 lines in your changes missing coverage. Please review.

Project coverage is 64.63%. Comparing base (1a1597f) to head (724d02a).
Report is 24 commits behind head on main.

Files with missing lines Patch % Lines
src/aleph/vm/models.py 37.17% 46 Missing and 3 partials ⚠️
src/aleph/vm/network/firewall.py 31.03% 40 Missing ⚠️
...s/versions/2da719d72cea_add_mapped_ports_column.py 0.00% 20 Missing ⚠️
src/aleph/vm/network/port_availability_checker.py 27.27% 16 Missing ⚠️
src/aleph/vm/network/get_interface_ipv4.py 60.00% 4 Missing and 2 partials ⚠️
src/aleph/vm/pool.py 14.28% 6 Missing ⚠️
src/aleph/vm/utils/aggregate.py 76.47% 3 Missing and 1 partial ⚠️
src/aleph/vm/orchestrator/migrations/env.py 0.00% 3 Missing ⚠️
src/aleph/vm/orchestrator/views/__init__.py 84.61% 1 Missing and 1 partial ⚠️
src/aleph/vm/conf.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #806      +/-   ##
==========================================
- Coverage   65.49%   64.63%   -0.86%     
==========================================
  Files          80       84       +4     
  Lines        7330     7576     +246     
  Branches      614      651      +37     
==========================================
+ Hits         4801     4897      +96     
- Misses       2329     2471     +142     
- Partials      200      208       +8     

☔ 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-551-ipv4_port_forwarding branch 2 times, most recently from 0343c46 to 0b7fc79 Compare June 2, 2025 19:24
@nesitor nesitor force-pushed the ol-ALEPH-551-ipv4_port_forwarding branch from c8163b0 to 4e7efa0 Compare June 4, 2025 11:23
@nesitor nesitor merged commit a1b8ce2 into main Jun 4, 2025
59 of 67 checks passed
@nesitor nesitor deleted the ol-ALEPH-551-ipv4_port_forwarding branch June 4, 2025 14:32
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.

2 participants