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

Factors trigger #2693

Merged
merged 8 commits into from
Aug 1, 2024
Merged

Factors trigger #2693

merged 8 commits into from
Aug 1, 2024

Conversation

lann
Copy link
Collaborator

@lann lann commented Jul 30, 2024

This turned into a bit of a mega-PR, but I have split out some smaller commits, including:

  • Add SpinFilesMounter
  • Add intermediate FactorsExecutorApp type

Note that while this mostly a straight port, I have also implemented 2 breaking changes for Spin 3.0:

  • Drop support for executing WAGI modules
    • still need to fix up detection and errors for uncomponentizable modules
  • Drop the HTTP trigger base field
    • the default value of / is still permitted with a warning

I've left the existing spin-trigger and spin-trigger-http crates for now as there is still some functionality that needs to be ported to factors:

  • Outbound HTTP features that were implemented in spin-trigger-http: client TLS, self and service chained requests
  • spin-trigger-http benchmarks

crates/factors-executor/src/lib.rs Outdated Show resolved Hide resolved
crates/factors-executor/src/lib.rs Outdated Show resolved Hide resolved
@@ -0,0 +1,30 @@
[package]
name = "spin-trigger2"
Copy link
Collaborator

Choose a reason for hiding this comment

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

👀

Signed-off-by: Lann Martin <lann.martin@fermyon.com>
Signed-off-by: Lann Martin <lann.martin@fermyon.com>
Signed-off-by: Lann Martin <lann.martin@fermyon.com>
Signed-off-by: Lann Martin <lann.martin@fermyon.com>
Signed-off-by: Lann Martin <lann.martin@fermyon.com>
Signed-off-by: Lann Martin <lann.martin@fermyon.com>
Signed-off-by: Lann Martin <lann.martin@fermyon.com>
These temporary copies to ease refactoring.

Signed-off-by: Lann Martin <lann.martin@fermyon.com>
@lann lann marked this pull request as ready for review August 1, 2024 15:51
@lann lann requested a review from rylev August 1, 2024 16:00
Copy link
Collaborator

@rylev rylev left a comment

Choose a reason for hiding this comment

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

This is when things start to get a bit scary - the trigger2 crate has a lot of overlap with the existing trigger crate, and it's hard to see where things differ. I think we're at the point that I'd like to see integration of factors happened as quickly as possible so we stop living in a world where things can easily diverge.

use crate::{server::HttpExecutor, Store, TriggerInstanceBuilder};

#[derive(Clone)]
pub struct HttpHandlerExecutor {
Copy link
Collaborator

Choose a reason for hiding this comment

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

It'd be good to document what this is - an HttpExector that can execute wasi and spin http incoming requests.

@lann
Copy link
Collaborator Author

lann commented Aug 1, 2024

This is when things start to get a bit scary - the trigger2 crate has a lot of overlap with the existing trigger crate, and it's hard to see where things differ. I think we're at the point that I'd like to see integration of factors happened as quickly as possible so we stop living in a world where things can easily diverge.

Agreed. I've been struggling with a more principled refactor here and at this point I just want to get something merged to build on.

@lann lann merged commit a2b1573 into fermyon:factors Aug 1, 2024
2 checks passed
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.

2 participants