aleph-im / aleph-client

Lightweight Python Client library for the Aleph.im network
MIT License
11 stars 12 forks source link

Attaching arguments to the command #230

Open nesitor opened 2 weeks ago

nesitor commented 2 weeks ago

I have discovered a bug that we have now on the main branch of aleph-client version. If you try to upload a program, specifying an immutable volume like this:

aleph program upload app main:app --immutable-volume ref=1f941c7c7aef010e577d6c4f174def93ea503c9d60bb4c0634dd1b45675653f8,mount=/opt/packages --runtime 63f07193e6ee9d207b7d1fcf8286f9aee34e6f12f101d2ec77c1229f92964696

With the latest release of the package, it works quite well, just publishes the program message with the correct volume and that's fine, but with the code on main branch, it requests to you again if you want to attach a volume:

Parallel mksquashfs: Using 16 processors
Creating 4.0 filesystem on /home/master/code/ubisoft/champions-vm/app.squashfs, block size 131072.
[=============================================================================================================================================================================================================================================================================|] 2/2 100%

Exportable Squashfs 4.0 filesystem, gzip compressed, data block size 131072
    compressed data, compressed metadata, compressed fragments,
    compressed xattrs, compressed ids
    duplicates are removed
Filesystem size 6.06 Kbytes (0.01 Mbytes)
    39.92% of uncompressed filesystem size (15.19 Kbytes)
Inode table size 68 bytes (0.07 Kbytes)
    52.31% of uncompressed inode table size (130 bytes)
Directory table size 67 bytes (0.07 Kbytes)
    76.14% of uncompressed directory table size (88 bytes)
Number of duplicate files found 0
Number of inodes 4
Number of files 2
Number of fragments 1
Number of symbolic links 0
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 2
Number of ids (unique uids + gids) 1
Number of uids 1
    master (1000)
Number of gids 1
    master (1000)
Add volume ? [y/n]: n
Your program has been uploaded on aleph.im

Available on:
  https://aleph.sh/vm/d6a1e01c3403c61d7409c8f1452d97013d93b1e77a60b01536a585aa1b317f8e
  https://22q6ahbuapdb25ajzdyuklmxae6zhmphpjqlafjwuwc2ugzrp6ha.aleph.sh
Visualise on:
 https://explorer.aleph.im/address/ETH/0xA07B1214bAe0D5ccAA25449C3149c0aC83658874/message/PROGRAM/d6a1e01c3403c61d7409c8f1452d97013d93b1e77a60b01536a585aa1b317f8e

If you say no, because it is already attached as an argument on the command, it publishes the message but without the immutable volume. And if you say that yes, it requests to you the fields to create a persistent or ephemeral volume, but the immutable one is not created.