Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1191 commits
Select commit Hold shift + click to select a range
cc47d58
Minor typo in README.md fixed (#752)
gdelfino Feb 17, 2025
7c9392c
Garbate collector: Free disk space from inactive VM (#746)
olethanh Feb 17, 2025
01ff0c1
Implemented GPU compatibility system (#747)
nesitor Feb 17, 2025
7f6ff3e
Upgrade `aleph-message` version (#753)
nesitor Feb 18, 2025
81618bc
Fix IPv6 egress check on index falesly showing ok
olethanh Feb 18, 2025
bb1158a
fix typo
olethanh Feb 18, 2025
4c4354d
Create Ubuntu 24.04 QEMU runtime (#754)
nesitor Feb 18, 2025
c1967c6
Default log level to info
olethanh Feb 18, 2025
07a7adb
Jira ticket: ALEPH-419
olethanh Feb 19, 2025
92249a9
Fix start error in load_persistent_executions (#759)
olethanh Feb 20, 2025
2de50e6
Problem: If the user creates a flow from the frontend or the CLI, the…
nesitor Feb 19, 2025
6055ad6
Apply rounding in payment monitoring task too
olethanh Feb 21, 2025
f3ef334
Fix DiagnosticVM, force ipv4 connexion on /internet check (#760)
olethanh Feb 21, 2025
3a01121
Attempt to fix the packaging issue on Ubuntu 22.02
olethanh Feb 25, 2025
63b7a02
Update dep in Makefile
olethanh Feb 25, 2025
346325f
Force setup tool version
olethanh Feb 26, 2025
d1a90aa
Create an intermediate venv with the proper setup tools version
olethanh Feb 26, 2025
467098e
Add dept in Dockerfile for ubuntu-22.04 and debian too
olethanh Feb 26, 2025
1a38ca7
Fix: Stdout stdout caused concurrency issues
hoh Feb 19, 2025
155c276
Fix update_allocation error handling code
olethanh Feb 26, 2025
a34b37d
Fix: Used old versionof python-cpuid
hoh Feb 27, 2025
58f8a74
Fix: Supervisor was restarted when Kubo crashed
hoh Feb 27, 2025
35707c3
Fix: Remove references to slow server api1.aleph.im (#769)
hoh Feb 28, 2025
1c2c180
Chore(deps): Bump sentry-sdk from 1.31 to 2.8.0
dependabot[bot] Feb 27, 2025
9be96a9
Increment `aleph-message` package version (#774)
nesitor Mar 10, 2025
8043bf0
Fix: Missing type annotation
Antonyjin Mar 6, 2025
02db781
Fix: Packages used obsolete Kubo
hoh Mar 4, 2025
f09bdd2
Fix: Kubo 33.2 crashed on Ubuntu 22.04
hoh Mar 11, 2025
7444c81
Fix buggy settings aggregate cache implementation
olethanh Mar 17, 2025
73013a2
Allow /56 subnet for ipv6 pool (#761)
olethanh Mar 18, 2025
8a85ad6
CI: Fix random failures. Merge workflows (#787)
olethanh Mar 31, 2025
7060a90
Clean optional and list with hatch fmt
olethanh Mar 17, 2025
4ae14ce
hatch fmt on examples and tests/
olethanh Mar 17, 2025
57e73fb
Mod: Transform pool.setup() to async func
olethanh Mar 11, 2025
b356827
Add testing for the listing of GPU
olethanh Mar 11, 2025
e67f2c3
Add GPU reservation endpoints with tests
olethanh Mar 11, 2025
a14a78c
Use reservation at vm creation
olethanh Mar 11, 2025
bd20595
mod: Move Reservation class out of VMPool
olethanh Mar 18, 2025
0b8c567
Fix: Detect GPU support for x-vga parameter before applying it
Mar 25, 2025
5484aa5
Add unit tests for GPU x-vga support detection
Mar 25, 2025
d7b027e
Refactor GPU x-vga support detection to use device class
Mar 25, 2025
dff4df3
Fix: Solve code quality issues.
Mar 25, 2025
6ad9094
Fix: Use GpuDevice instead of HostGPU in x-vga support test
Mar 25, 2025
bc693c7
Fix: Solve issue on missing HostGPU field.
Mar 26, 2025
9f6351e
Fix: Update GPU x-vga support tests to use has_x_vga_support property
Mar 26, 2025
70d76d1
Fix: ndppd proxy not loading existing interfaces on supervisor restart
nesitor Mar 24, 2025
db49c0e
Fix: Improved performance on restart avoiding to re-create and restar…
nesitor Mar 24, 2025
c45346c
Usage system: remove reserved usage for volumes
olethanh Mar 24, 2025
a98ad0e
Task monitor_payments make less useless check
olethanh Oct 22, 2024
eff82dc
Do not run DB migratio if --do-not-run
olethanh Oct 23, 2024
2221cd4
Fix: Upgrade Firecracker 1.5.0 -> 1.7.0
hoh Mar 4, 2025
5882e98
Fix leftover network when VM fail to start
olethanh Mar 28, 2025
b62a313
Stop the guest api if a VM fail to start
olethanh Mar 28, 2025
1bd8ed2
Clean up: Remove unused MicroVm.stdoud_task and stderr_task
olethanh Mar 28, 2025
8cbd7d2
Add lock arround the update_allocation commands
olethanh Mar 28, 2025
ba72293
CI: Raise dpkg lock limit that was causing crash
olethanh Apr 2, 2025
e5d6d3b
enh: allow user to reboot from inside the VM (#790)
olethanh Apr 8, 2025
237e3fd
enh: allow user to reboot from inside the VM (#790)
olethanh Apr 8, 2025
edc6da2
enh: Operator auth. Better http error (#788)
olethanh Apr 8, 2025
21a696d
Fix: Revert changes commited accidentally
nesitor Apr 8, 2025
b3cd3fa
Feature: Migrate Pydantic V1 to V2.
nesitor Apr 8, 2025
067123b
Fix: Apply fixes on tests
nesitor Apr 8, 2025
30cafda
Fix: Use the new `aleph-message` published version instead the develo…
nesitor Apr 8, 2025
1a431ea
Fix: Use the new `aleph-message` published version instead the develo…
nesitor Apr 8, 2025
51dc7b1
Fix: Solve TypeAdapter issue handling with a json data.
nesitor Apr 10, 2025
b87ae8a
Confidentials: Update locale settings to en_US UTF-8 during setup (#792)
aliel Apr 11, 2025
838135a
FIX downloading volume from connector (#796)
olethanh Apr 11, 2025
c8388d0
Fix: Upgrade `aleph-message` version dependency to 1.0.0.
nesitor Apr 10, 2025
f599fbe
Fix: Increase Aleph SDK dependency to the new version 2.0.0
nesitor Apr 11, 2025
444353f
Fix ALPEH-517 confidential clean up
olethanh Apr 14, 2025
28582cf
ALEPH-518 Fix Confidential and GPU instance stopping after start
olethanh Apr 15, 2025
7bf21b0
Fix: Solve message class casting issue with requirements field.
nesitor Apr 16, 2025
22963eb
Upgrade diagnostic VM to use an ethereum url that don't return 307
olethanh Apr 15, 2025
f243a39
Internet check : Accept code other than 200 as proper result
olethanh Apr 15, 2025
2be5876
Revert compat fix for pydantic 2 as runtime is on pydantic 1
olethanh Apr 15, 2025
675943a
Make the diagnostic example code compatible with pydantic 1 and 2
olethanh Apr 16, 2025
c10d8f4
Fix disk usage calculation being to small
olethanh Apr 23, 2025
a5e3fef
Fix reserved space calculation
olethanh Apr 23, 2025
0096aa5
fix: Grub root device must be placed in a proper location to avoid bo…
aliel May 5, 2025
a4ee1b5
ALEPH-512 ensure we always return json for error
olethanh May 5, 2025
18b2fb8
mod: Use signal to add server version header
olethanh May 5, 2025
bdc5b7f
mod: setup_webapp take the VmPool as arg. VmPool remove loop arg
olethanh Apr 6, 2025
2776c69
enh: Instance start Do not block instance start on ping ALEPH-287
olethanh Apr 8, 2025
f6aea75
enh: write debug login token to a file so we can use it even when log…
olethanh Apr 9, 2025
4269166
Add /v2/about/executions/list endpoint with more info
olethanh Apr 9, 2025
7bdbbce
Instance creation: Reuse starting vm, handle stopping VM
olethanh Apr 9, 2025
d0edb80
stop controller from execution.stop()
olethanh Apr 9, 2025
0caf637
mod remove warning for unused var
olethanh Apr 9, 2025
d1ea2f8
mod remove unused funtion stop_permanent_execution
olethanh Apr 9, 2025
93440d7
mod remove dead code on qemu instance
olethanh Apr 9, 2025
722b521
mod: remove unused code: ping, instance wait_for_init
olethanh Apr 9, 2025
ac2f1c1
Improve Test test_create_qemu_instance_online change sig to async
olethanh Apr 9, 2025
3baf74c
Test test_create_qemu_instance
olethanh Apr 10, 2025
1326cbe
Fix py.test setup message
olethanh Apr 10, 2025
0c02d64
firewall.py List failed rule insertion for debugging
olethanh Apr 11, 2025
170939c
test: Patch journal.stream so the output of qemu process is shown in …
olethanh Apr 11, 2025
7e4be8f
test: Ensure that test are run inside their own directory
olethanh Apr 14, 2025
8eebffa
Test new endpoint, add fix for non prepared Execution
olethanh Apr 18, 2025
b5ea0c6
Update CPU and memory details by switching to lshw method instead of …
aliel Feb 16, 2024
4d35a59
Refactor get_hardware_info() to use async subprocess.run for improved…
aliel Apr 5, 2024
9c95d2d
Fix code style
aliel Apr 5, 2024
5b7d1c5
Remove duplicate cors headers
olethanh Apr 30, 2024
5049996
Problem: async funcs cannot be lru_cached
olethanh Apr 30, 2024
bf33943
fix lshw parsing for memory info
olethanh Apr 30, 2024
f024888
Move async_cache decorator to utils module
olethanh Apr 30, 2024
1f0f7d5
Change router order
olethanh Apr 30, 2024
7550e53
Adapt the tests
olethanh May 15, 2024
29f403f
add test for /about/capability
olethanh May 15, 2024
fe6f98d
Fix dependencies in ci
olethanh May 17, 2024
e2fda77
Fix tests and parsing
olethanh May 6, 2025
7865b42
mod: uniformize coding style
olethanh May 19, 2025
1a1597f
Fix: Solve CI/CD issue with Digital Ocean access token.
nesitor Jun 4, 2025
d0efa53
wip
olethanh May 26, 2025
ac6566d
Fix started_at not being set for program
olethanh May 27, 2025
5589de6
DB: fix execution.save crashing when updating
olethanh May 27, 2025
a55d610
Handle user aggregate not existing gracefully
olethanh May 27, 2025
23f7ba9
Fix alembic crash when generating migrations
olethanh May 29, 2025
33b4af7
SAve port mapping to database
olethanh May 30, 2025
32b5d43
firewall Do not create prerouting chain if it already exists
olethanh May 30, 2025
bc9d6d3
fix protocol specification
olethanh May 30, 2025
e95d2aa
Do not assign an already forward port, even if nothing is listening o…
olethanh May 30, 2025
6ffa4bb
fix db migration
olethanh May 30, 2025
f542090
fix mapped_port_format
olethanh May 30, 2025
5d6a2e6
add remove port redirection method
olethanh May 30, 2025
8ec2bc9
fixup! Do not assign an already forward port, even if nothing is list…
olethanh May 30, 2025
38dba30
Update ports
olethanh May 30, 2025
507e5d5
Add /control/update endpoint to refresh port config
olethanh May 30, 2025
4f7863d
typing and test
olethanh May 30, 2025
61d1fb8
mod rework network
olethanh May 30, 2025
ba5cc3f
mod rework network
olethanh May 30, 2025
a1ffa1e
fix tests
olethanh Jun 2, 2025
f382fbc
Add 2 tests for operate_update
olethanh Jun 2, 2025
8231dc1
Fix cleanup issue
olethanh Jun 3, 2025
f44cdf5
fix running in v2 executions
olethanh Jun 3, 2025
96f88d1
Address review comment
olethanh Jun 4, 2025
a1b8ce2
Fix: Solve failing tests.
nesitor Jun 4, 2025
28a4d09
Feature: Use the last version of aleph-message package.
nesitor Jun 4, 2025
085ff96
Port redirect: Only redirect for instance
olethanh Jun 5, 2025
50d2591
Port redirect: Avoid redirecting the same port
olethanh Jun 5, 2025
92c0499
Add ipv4_ip on /v2/excutions/list
olethanh Jun 5, 2025
104f6be
Fix: Solve errors using the redirect ports on existing instances.
Jun 5, 2025
d80517a
firewall: Support multiple base chain
olethanh Jun 5, 2025
0e9f919
firewall improve docstric and typing
olethanh Jun 5, 2025
69f1c86
resource.py remouve unused duplicate code warning
olethanh Jun 5, 2025
c684c04
firewall: Reuse the prerouting chain name if it already exists
olethanh Jun 5, 2025
2bd4c09
Fix: Solve code quality issue.
Jun 5, 2025
a787875
Fix: Solved failing test.
Jun 5, 2025
2f53790
Fix: Added missing field on aggregate handling and fixed issue on red…
Jun 5, 2025
2eceafd
Add rule so we can reach the vm dport in all case
olethanh Jun 5, 2025
29487bd
Fix redirect rule deletion
olethanh Jun 5, 2025
66946d7
fix second issue with redirect rule removing
olethanh Jun 6, 2025
58b20dc
firewall Avoid creating duplicate rule and jump
olethanh Jun 6, 2025
a83f1e8
Add tests for firewall.py
olethanh Jun 6, 2025
a461d8a
firewall Don't create duplicate rule for jump to vm
olethanh Jun 6, 2025
d3aa0e0
mode Simplify check_nftables_redirections
olethanh Jun 6, 2025
3f28128
firewall No duplicate rule for redirect
olethanh Jun 6, 2025
fab16b7
Reorg code
olethanh Jun 6, 2025
124aeea
doc
olethanh Jun 6, 2025
3584770
New chain aleph-supervisor-prerouting to contain the redirect rule
olethanh Jun 6, 2025
63eeaf8
add debug info
olethanh Jun 6, 2025
35ce27f
fix supervisor-filter rule recreating
olethanh Jun 6, 2025
8af90ca
firewall: Prevent dict reuse
olethanh Jun 6, 2025
bbd33b2
firewall Map correct interface
olethanh Jun 6, 2025
a1e962c
load_persistant_execution Ensure routing table and rules for VM exists
olethanh Jun 6, 2025
af4d58b
Fix bug in load_execution with multiple instance
olethanh Jun 6, 2025
ee3400f
Fix bug where port were reassigned
olethanh Jun 6, 2025
12496c1
Fix wrong variable being used when fetching from aggregate
olethanh Jun 10, 2025
f6d5a24
fix: change runtime warmup timeout from 1s to 5s
aliel Jun 13, 2025
56b9002
ALEPH-435 Fix DBUS error when enabling controller
olethanh Jun 17, 2025
18f2648
Refactor Ensure we properly have a manager and bus before calling
olethanh Jun 17, 2025
795ef6e
Update README.md
san-npm Jun 20, 2025
fa4562b
Fixed docs url with the new one
nesitor Jun 20, 2025
e9e6677
Fix /about/usage/system on some arch
olethanh Jun 27, 2025
4c54e02
ALEPH-565 domain support WIP
olethanh Jun 13, 2025
f344c78
remove unused arg
olethanh Jun 16, 2025
5526468
use correct ip
olethanh Jun 18, 2025
6b29d6b
Add settings for haproxy path
olethanh Jun 18, 2025
a1b530e
Set backend server in maintenance mode before deleting it
olethanh Jun 18, 2025
fe7c276
Update from VmPool
olethanh Jun 18, 2025
ec49fde
fix update command
olethanh Jun 18, 2025
646c6e4
Ensure we update domain config at start
olethanh Jun 18, 2025
29e1b47
Apply domain mapping on update endpoint
olethanh Jun 18, 2025
967c1e8
Force the update of haproxy at start since it doesn't seem to load pr…
olethanh Jun 18, 2025
2b084e6
Remove unused testing code, update doc
olethanh Jun 18, 2025
7724d05
Add default haproxy config for packaging
olethanh Jun 18, 2025
a813999
list the file as conffile in debian package
olethanh Jun 18, 2025
fe4e78c
fix haproxy packaging
olethanh Jun 18, 2025
d67860b
fixup! Update from VmPool
olethanh Jun 18, 2025
fc7edf2
packaging Add haproxy to depps
olethanh Jun 20, 2025
33e1d91
improve Typing
olethanh Jun 23, 2025
fbacbae
mod: split mapfile writing to a separate function
olethanh Jun 23, 2025
c76ddbd
Remove conflict with haproxy defualt default config file
olethanh Jun 25, 2025
af7d3da
Handle the SSL termination directly in HAProxy
olethanh Jun 25, 2025
4d433ae
add settings for the domain list
olethanh Jul 4, 2025
e3af2a4
Only add port forwarding for instances
olethanh Jul 8, 2025
eff0f3d
Fix CI logs
olethanh Jul 11, 2025
4512aad
Only load domain at start if there are executions
olethanh Jul 11, 2025
a99ef78
remove space that got added
olethanh Jul 14, 2025
16a552d
mod: fetch_list_and_update2 -> fetch_list_and_update
olethanh Jul 14, 2025
d8982af
Add comment over empty HAPROXY map files
olethanh Jul 14, 2025
2e9fead
Improve the haconfig file
olethanh Jul 14, 2025
699a1dd
HaProxy force bind to ipv6
olethanh Jul 15, 2025
439f5f9
HaProxy send log to stdout
olethanh Jul 15, 2025
58e2cf4
Fix: Added missing IPv6 handling on metrics route
nesitor Jul 15, 2025
c978419
HaProxy Certbots make certificate challange possible without stopping…
olethanh Jul 15, 2025
91891de
Fix Instance network not working on server reboot
olethanh Jul 23, 2025
03f4952
Fix cpu detection
olethanh Jul 16, 2025
7afb6c2
Improve logging for error
olethanh Jul 16, 2025
32ed047
update doc on how to setup the dev environment
olethanh Jul 18, 2025
82439ed
Speed up free port detection
olethanh Jul 18, 2025
17666b7
Do not remove fallback server when updating backend
olethanh Jul 18, 2025
1ad9e11
Add debug endpoint for haproxy
olethanh Jul 18, 2025
83af4b9
Connect the record when loading persistant exec
olethanh Jul 18, 2025
312e307
Domain mapping: Filter request on CRN domain
olethanh Jul 23, 2025
bccff9c
haproxy Unify the fallback_local frontend name accross http and https
olethanh Jul 23, 2025
08be323
fmt
olethanh Jul 23, 2025
87df619
ALEPH-603 Add test for HaProxy custom domains
olethanh Jul 23, 2025
a6a7b1f
fix GH-814 gradual increase in waiting time
aliel Jul 11, 2025
d76e5dc
Fix: Solve code quality issue.
nesitor Jul 24, 2025
cebba2e
Fix: Increase Server connection timeout.
nesitor Jul 25, 2025
4ef9eed
HaProxy: Fix targeting issue
olethanh Jul 29, 2025
b6eecf3
Fast port allocation checker: move to its own file
olethanh Jul 29, 2025
b3ed458
Update /debug/haproxy with more info
olethanh Jul 29, 2025
05a9072
HaProxy make SSH routing possible
olethanh Jul 29, 2025
7ad7213
Fix haproxy vm local ip check
aliel Aug 9, 2025
53cab70
/control/allocation now return stopped vm
olethanh Jul 29, 2025
79a32c4
Fix test for control/allocation
olethanh Jul 30, 2025
c00355a
fix: Broken docs links
RezaRahemtola Aug 5, 2025
caaf4f2
Fix IPv4 https forwarding not working
olethanh Aug 27, 2025
cd893a5
Feature: Handle 2 new message status
Aug 6, 2025
c79a8cc
Fix: Solved error on message status conditional and fixed tests
nesitor Aug 12, 2025
8bf9c51
Feature: Implement credits payment method monitoring, same as PAYG.
Aug 8, 2025
60a4b41
Fix: Refactor to unify getting execution price method making it compa…
nesitor Aug 14, 2025
3f4ed01
Feature: Support Credits payment method on the notify endpoint.
Sep 25, 2025
8bc622f
Fix: Replaced the cost field for the new one.
Sep 25, 2025
9d8aacf
Fix: Improved some method docs
Sep 25, 2025
38a0303
Fix: Require at least 1 hour of credits to start the instance.
Sep 25, 2025
7b842b2
Fix: Solved issues on 2 failing tests
nesitor Sep 25, 2025
7c09a87
Feature: Upgrade `aleph_message` version to `1.0.5`
nesitor Oct 8, 2025
9698fae
Fix: Put right signature on model_validation method.
nesitor Oct 8, 2025
e7e58ba
Fix getting hold and credit balance of user
olethanh Sep 26, 2025
0df5b82
Update src/aleph/vm/orchestrator/payment.py
olethanh Sep 26, 2025
37e70c5
Add test for user balance check api
olethanh Sep 26, 2025
5e4f6fa
Handle edge case if server response is invalid
olethanh Sep 26, 2025
fde619c
Fix: Disable IPFS service from installation and delete from the curre…
Oct 9, 2025
105c7f0
Fix: Removed line on Readme file
nesitor Oct 9, 2025
47f1da9
WIP ALEPH-615 Expose resources for executions
olethanh Sep 16, 2025
4ff0947
fix formating
olethanh Sep 18, 2025
a9e0f2c
Simplify only adding one `resources` field instead to create another …
nesitor Oct 21, 2025
23087df
Fix: Solved not passing tests and returned value as integer instead o…
nesitor Oct 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@
**/*.pyc
**/__pycache__

**/rootfs/
**/*.sqlite3
# **/*.squashfs
**/*.bin
**/*.ext4
**/*.zip
**/*.pyz
**/*.rdb
**/*.key
**/data.tgz
/pydantic/
**/target
/packaging/sevctl/target
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
34 changes: 34 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Explain what problem this PR is resolving

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 has been updated regarding these changes.
- [ ] Dependencies update in the project.toml have been mirrored in the Debian package build script `packaging/Makefile`

## Changes

Explain the changes that were made. The idea is not to list exhaustively all the changes made (GitHub already provides a full diff), but to help the reviewers better understand:
- which specific file changes go together, e.g: when creating a table in the front-end, there usually is a config file that goes with it
- the reasoning behind some changes, e.g: deleted files because they are now redundant
- the behaviour to expect, e.g: tooltip has purple background color because the client likes it so, changed a key in the API response to be consistent with other endpoints

## How to test

Explain how to test your PR.
If a specific config is required explain it here (account, data entry, ...)

## Print screen / video

Upload here screenshots or videos showing the changes if relevant.

## 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
34 changes: 34 additions & 0 deletions .github/scripts/extract_droplet_ipv4.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/usr/bin/env python3
"""
Extract the IP address of a DigitalOcean Droplet
from the JSON returned by `doctl compute droplet get $name --output json
"""

import json
import sys

droplet_raw = sys.stdin.read()
try:
droplet_info = json.loads(droplet_raw)
if not droplet_info:
sys.exit("No droplet info")
if "errors" in droplet_info:
sys.exit(droplet_raw)
if "networks" not in droplet_info[0]:
sys.exit(f"droplet_info[] {droplet_info[0]}")
elif ("v4" not in droplet_info[0]["networks"]) or not droplet_info[0]["networks"]["v4"]:
sys.exit("networks {}".format(droplet_info[0]["networks"]))
else:
print(droplet_info[0]["networks"]["v4"], file=sys.stderr)
for network in droplet_info[0]["networks"]["v4"]:
if network["type"] == "public":
print(network["ip_address"]) # noqa: T201
break
else:
sys.exit("No public ipv4 found")

except Exception as e:
if not isinstance(e, SystemExit):
print(f"Failed to find ipv4: {e}", file=sys.stderr) # noqa: T201
print(droplet_raw, file=sys.stderr) # noqa: T201
raise
Loading