-
Notifications
You must be signed in to change notification settings - Fork 412
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
Call Driver#.start only when Server#.install is first called (#2381) #2872
Call Driver#.start only when Server#.install is first called (#2381) #2872
Conversation
|
||
override def port: Int = bindPort | ||
override def port[R]: URIO[R, Int] = serverStarted.await.orDie |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
serverStarted
will block indefinitely until install
is called for the first time. Should we add a comment that mentions this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I don't love that this now returns a ZIO
-- I couldn't think of any way around this since port may or may not be present depending on if the driver has been started.
ZIO.environment[R].flatMap(env => driver.addApp(httpApp, env.prune[R])) | ||
for { | ||
_ <- initialInstall.succeed(()) | ||
_ <- serverStarted.await.orDie |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My opinion here was that if we fail to start the driver for any reason that this error should be raised as a "defect" -- this seems like an unrecoverable error to me but please let me know if you disagree.
💵 To receive payouts, sign up on Algora, link your Github account and connect with Stripe/Alipay. |
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #2872 +/- ##
==========================================
- Coverage 64.64% 64.47% -0.17%
==========================================
Files 156 156
Lines 9113 9143 +30
Branches 1584 1605 +21
==========================================
+ Hits 5891 5895 +4
- Misses 3222 3248 +26 ☔ View full report in Codecov by Sentry. |
You got one failure:
|
85395f9
to
c2fbe71
Compare
Arg, sorry about that. Fixed and force pushed. |
c2fbe71
to
f2c35e8
Compare
Hrm, it looks like this step |
b09f217
to
b271586
Compare
/claim #2381