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

feat(rust): node's http server is enabled by default #8603

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

adrianbenavides
Copy link
Member

@adrianbenavides adrianbenavides commented Nov 5, 2024

  • Node's HTTP server is now enabled by default
  • The --http-server flag is deprecated in favor of --no-healthcheck
  • If no port is provided, the port 23345 will be assigned. If that port is used, a random one will be assigned

I also found a flakyness source in the command wherever we use the find_available_port (and likely in ockam_api). In bats tests, where multiple nodes will run that function at the same time, there can be collisions. That can be fixed by delaying the port assignment until we create the TcpListener. I've created a struct to express the port usage. Here's an example of its usage relevant to this PR.

@adrianbenavides adrianbenavides force-pushed the adrian/node-http-server-enabled-by-defauly branch 4 times, most recently from b18181c to 309f55f Compare November 5, 2024 19:21
@adrianbenavides adrianbenavides marked this pull request as ready for review November 5, 2024 19:30
@adrianbenavides adrianbenavides requested a review from a team as a code owner November 5, 2024 19:30
@adrianbenavides adrianbenavides force-pushed the adrian/node-http-server-enabled-by-defauly branch 6 times, most recently from 4a93e66 to d28bfd5 Compare November 6, 2024 18:57
@adrianbenavides adrianbenavides force-pushed the adrian/node-http-server-enabled-by-defauly branch from d28bfd5 to 28a7ba2 Compare November 7, 2024 15:40
etorreborre
etorreborre previously approved these changes Nov 13, 2024
@adrianbenavides adrianbenavides force-pushed the adrian/node-http-server-enabled-by-defauly branch 2 times, most recently from bb2c2e6 to 0846dfa Compare November 13, 2024 14:15
@adrianbenavides adrianbenavides force-pushed the adrian/node-http-server-enabled-by-defauly branch from 0846dfa to a7466ff Compare November 13, 2024 17:12
@etorreborre etorreborre self-requested a review November 14, 2024 09:46
@adrianbenavides adrianbenavides added this pull request to the merge queue Nov 14, 2024
Merged via the queue into develop with commit 077a489 Nov 14, 2024
31 checks passed
@adrianbenavides adrianbenavides deleted the adrian/node-http-server-enabled-by-defauly branch November 14, 2024 10:03
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