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

Extend entrypoint parameter #77

Merged
merged 11 commits into from
Jan 2, 2024
Merged

Extend entrypoint parameter #77

merged 11 commits into from
Jan 2, 2024

Conversation

MHHukiewitz
Copy link
Member

In reference to aleph-im/aleph-vm#482.

Allows distinction between different types of plain code executions and more freedom in defining how it should be run.

@MHHukiewitz MHHukiewitz requested a review from hoh November 22, 2023 12:48
@hoh
Copy link
Member

hoh commented Nov 22, 2023

I am afraid that this approach would not be easy to maintain. What about splitting the different components ?

    encoding: "squashfs"
    entrypoint: "main:app"
    language: "python"
    interface: "asgi"
    ref: ItemHash
    use_latest: bool = False
    encoding: "squashfs"
    entrypoint: "run dev"
    language: "javascript"
    interface: "npm"
    ref: ItemHash
    use_latest: bool = False
    encoding: "squashfs"
    entrypoint: "http_server.exe"
    language: "golang"
    interface: "executable"
    ref: ItemHash
    use_latest: bool = False

@MHHukiewitz
Copy link
Member Author

  • Does language really make sense here? There are tons of apps that might run a combination of multiple languages, what matters mostly is interface, as you proposed.
  • Should additional args be passed along in the entrypoint field? Might a list of args be easier to integrate?

@MHHukiewitz
Copy link
Member Author

Just highlighting the changes from a29de08. Introducing default values to classes of fields of our message classes lead to verification errors on the check_item_content validator. Setting a default value would result in validation failing. Which brings me to the following question:

Parsing past messages without the default values would lead to mismatch in item_content and item_hash (I just realized).

  • How should we then treat the model instead?
    • Make new properties always optional?
  • Will there be a migration of models at any point in the future?
    • Might we just store the original and then update it according to our migration rules to some kind?
    • Will there be different views on the message (original, implicit)?

@MHHukiewitz
Copy link
Member Author

@hoh good to go

…oint.

Allows distinction between different types of plain code executions and more freedom in defining how it should be run.
Default values in `ProgramContent` could make `item_content` verification fail, as they get added upon parsing. Creating `item_content` now triggers a parsing of `ProgramContent` and dumps its resulting struct.
@MHHukiewitz MHHukiewitz merged commit 92ad3e4 into main Jan 2, 2024
2 checks passed
@MHHukiewitz MHHukiewitz deleted the mhh-entrypoint branch January 2, 2024 13:11
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