-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: process instance messages #443
Conversation
Problem: users cannot send `INSTANCE` messages because the format is not yet supported by CCNs. Solution: support them, obviously. Modified the program handler to support both programs and instances. Renamed most program-related functions to the more generic `vm` naming convention. DB-wise, the same tables are reused for instances and programs. The `vms` table (previously named `programs`) now contains entries for instances and programs. A new table is dedicated to rootfs volumes as that is an instance-only feature. The advantage of reusing the same tables is that the logic for instances and programs can be unified, for example the balance/cost views only require minor updates.
3702743
to
e2e432b
Compare
setup.cfg
Outdated
@@ -40,7 +40,7 @@ install_requires = | |||
aiohttp==3.8.4 | |||
aioipfs@git+https://github.com/aleph-im/aioipfs.git@d671c79b2871bb4d6c8877ba1e7f3ffbe7d20b71 | |||
alembic==1.8.1 | |||
aleph-message==0.3.2 | |||
aleph-message@git+https://github.com/aleph-im/aleph-message@2983925295643634785a6a712d09e8f5c58642a2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to publish an update of aleph-message first ?
src/aleph/db/models/messages.py
Outdated
@@ -10,7 +10,7 @@ | |||
ForgetContent, | |||
PostContent, | |||
ProgramContent, | |||
StoreContent, | |||
StoreContent, InstanceContent, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
black
would not like this
|
||
|
||
def delete_vm(session: DbSession, vm_hash: str) -> None: | ||
_ = _delete_vm(session=session, where=VmBaseDb.item_hash == vm_hash) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this duplication ?
Problem: users cannot send
INSTANCE
messages because the format is not yet supported by CCNs.Solution: support them, obviously. Modified the program handler to support both programs and instances. Renamed most program-related functions to the more generic
vm
naming convention.DB-wise, the same tables are reused for instances and programs. The
vms
table (previously namedprograms
) now contains entries for instances and programs. A new table is dedicated to rootfs volumes as that is an instance-only feature. The advantage of reusing the same tables is that the logic for instances and programs can be unified, for example the balance/cost views only require minor updates.