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

[wasm] Add a new wasm webserver command #1001

Merged
merged 2 commits into from
Mar 1, 2023
Merged

Conversation

radical
Copy link
Member

@radical radical commented Mar 1, 2023

  • starts a webserver in the given app path
  • waits till a timeout
  • adds support for serving default files like index.html.

Prompted by need to run blazor published apps by starting a webserver for them

- ends after a timeout, or can be killed.
- Convert all the command line arguments to TestWebServerOptions. This
also helps to avoid having to add new method arguments to
WebServer to add more options.
- And add a --web-server-use-default-files option that serves files like
`index.html` and `default.html` by default.
Copy link
Member

@pavelsavara pavelsavara left a comment

Choose a reason for hiding this comment

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

LGMT. Could you please explain where/how this would be used ? Thanks.

@maraf
Copy link
Member

maraf commented Mar 1, 2023

Do we want to merge it with the simple server from the runtime repo?

@radical
Copy link
Member Author

radical commented Mar 1, 2023

Do we want to merge it with the simple server from the runtime repo?

Do you mean the webserver in the app host?

@pavelsavara
Copy link
Member

Do we want to merge it with the simple server from the runtime repo?

Do you mean use this xharness instead of simple server ?

Pros: one codebase, consistent behavior
Cons: wait for xharness to propagate to runtime repo on any change

We also want to have blazor like server as part of the host. Should we replace simple server with that ?
Where would that live ? In SDK ?

@radical
Copy link
Member Author

radical commented Mar 1, 2023

LGMT. Could you please explain where/how this would be used ? Thanks.

Prompted by need to run blazor published apps by starting a webserver for them. See dotnet/runtime#82748

@pavelsavara
Copy link
Member

pavelsavara commented Mar 1, 2023

Another consideration is that the web server in the host, should be rather production grade. xharness is rather test utility.
Our simple server is also test utility and has helpers for our internal needs (collecting benchmark results and now also simulating errors).

@radical
Copy link
Member Author

radical commented Mar 1, 2023

Another consideration is that the web server in the host, should be rather production grade. xharness is rather test utility.
Our simple server is also test utility and has helpers for our internal needs (collecting benchmark results and now also simulating errors).

Yep, I don't think it is worth trying to share the webserver here, and in the apphost. And I'm looking at this as for tests, and a generic-ish one (though it has some wasm specific bits, which is fine).

@radical
Copy link
Member Author

radical commented Mar 1, 2023

Failures are unrelated.

@radical radical enabled auto-merge (squash) March 1, 2023 16:37
@radical radical disabled auto-merge March 1, 2023 16:37
@radical
Copy link
Member Author

radical commented Mar 1, 2023

@premun the Apple-simulator job keeps failing. It isn't related to this pr, but I can't merge because of it. What can I do?

@premun
Copy link
Member

premun commented Mar 1, 2023

Seems like the queue is backed up. I can try to merge myself.

@premun premun merged commit 05d4d5f into dotnet:main Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request test-runners TestRunner area wasm WASM area
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants