Skip to content
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

Merged
merged 4 commits into from
May 31, 2023
Merged

Feature: process instance messages #443

merged 4 commits into from
May 31, 2023

Conversation

odesenfans
Copy link
Contributor

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 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
@@ -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
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 ?

@@ -10,7 +10,7 @@
ForgetContent,
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.

3 participants