Skip to content

Conversation

@odesenfans
Copy link
Collaborator

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.

@odesenfans odesenfans marked this pull request as draft May 22, 2023 12:30
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.
@odesenfans odesenfans force-pushed the od-instance-messages branch from 3702743 to e2e432b Compare May 22, 2023 16:52
@odesenfans odesenfans marked this pull request as ready for review May 22, 2023 16:53
@odesenfans odesenfans requested a review from hoh May 22, 2023 16:53
setup.cfg Outdated
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
Copy link
Member

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 ?

PostContent,
ProgramContent,
StoreContent,
StoreContent, InstanceContent,
Copy link
Member

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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this duplication ?

@odesenfans odesenfans merged commit cc0b466 into master May 31, 2023
@odesenfans odesenfans deleted the od-instance-messages branch May 31, 2023 13:19
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.

4 participants