-
Notifications
You must be signed in to change notification settings - Fork 247
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
http-php
template not working with latest spin
#1210
Comments
Perhaps a wasm ABI incompatibility with the runtime version being used? |
does this fall under our backward compatibility promise? |
If our assumption of the cause is correct, I don't think this scenario (upstream breaking changes) would (or could) fall under a backwards compatibility promise. At this point, I think the best we can do is ensure templates are updated as needed for compatibility with spin for a given release... and it appears this template might not have been updated accordingly (CI/testing gap; soon to be addressed 😉 ?) Does this template run successfully with an older Spin release? |
@vdice Upstream breaking change absolutely falls under the backward compatibility promise. If we have updated to a new version of a dependency, and that new version breaks existing apps, then we've not maintained backward compatibility. It doesn't matter that the dependency is what caused it. It matters that an app that used to run, and has not changed, no longer runs. (Note that if PHP changed in a breaking way, that would be a different matter, because existing apps - that is, existing builds of PHP - would continue to run.) In this case, we are still at 0.x, and don't have that full stability guarantee in place. But if the ABI change theory is correct we will need to be super careful about this once we hit 1.0. |
I see the same error with Spin 0.7 and 0.8. And Spin 0.6 didn't support URL components. It's a puzzler. @technosophos You authored the PHP template and it clearly worked for you at that point. Would you be able to try it again now please? Thanks! |
Yeah, I will give it a test and see if I can figure it out. |
I started with Spin 0.8 and the version of the PHP template from that. $ spin new http-php test-php-tpl
Project description: Hello
HTTP base: /
HTTP path: /...
$ cd test-php-tpl/
$ ls
spin.toml src
$ spin up
Serving http://127.0.0.1:3000
Available Routes:
test-php-tpl: http://127.0.0.1:3000 (wildcard)
$ spin --version
spin 0.8.0 (7086236 2023-01-31) So that seems to have worked. Updated to Spin 0.9 and newest templates. Removed the old test and tried again: $ spin new http-php test-php-tpl
Description:
HTTP base: /
HTTP path: /...
$ cd test-php-tpl/
$ spin up
Preparing Wasm modules is taking a few seconds...
Serving http://127.0.0.1:3000
Available Routes:
test-php-tpl: http://127.0.0.1:3000 (wildcard) Edit: Spin TOML: spin_version = "1"
authors = ["Matt Butcher <[email protected]>"]
description = ""
name = "test-php-tpl"
trigger = { type = "http", base = "/" }
version = "0.1.0"
[[component]]
id = "test-php-tpl"
files = [ { source = "./src", destination = "/" } ]
allowed_http_hosts = []
[component.source]
url = "https:/vmware-labs/webassembly-language-runtimes/releases/download/php%2F7.4.32%2B20221124-2159d1c/php-cgi-7.4.32.speed-optimized.wasm"
digest = "sha256:511720698dee56134ed8a08a87131d33c3ea8a64b6726cd6710d624bca4ceb6c"
[component.trigger]
executor = { type = "wagi"}
route = "/..." |
Just to be clear - and I apologise that this is undoubtedly a stupid question - you did hit or curl the pages, not just run up the server, right? You are on Mac M1, right? I am on WSL... @rajatjindal what OS/arch are you on? |
Err... no... I misread the error as being on |
I was trying on Mac M2. I can give it a shot on my intel based Apple too later today |
Can you try the URL |
This is the workaround for this that I currently have: https:/technosophos/php-hello-spin/blob/main/spin.toml I can definitely include this in the template. I left it out because it uses a second component to do the redirecting. |
@technosophos Genius! I'm not too fussed about the template. It might be nice, though I don't know how it would play if the HTTP |
Can this be closed? |
I think so, unless y'all would like me to add the redirector to the language template to automatically reroute traffic from |
@rajatjindal are you ok with updating the template to use the redirect workaround (to |
yes, I think that makes sense. |
while trying to add tests for
http-php
, it seems it is not working.steps followed (Refer below for full logs of commands run and logs)
spin 0.9.0 (77985cc 2023-02-28)
onapple silicon
(didn't tried on other one)http-php
spin up
http://127.0.0.1:3000/
, observe following error on spin process sideDetailed logs
The text was updated successfully, but these errors were encountered: