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

Feature/serverless zio #2975

Merged
merged 6 commits into from
Jun 26, 2023
Merged

Feature/serverless zio #2975

merged 6 commits into from
Jun 26, 2023

Conversation

TigranOhanyan
Copy link
Contributor

Closes #2931

@adamw
Copy link
Member

adamw commented Jun 21, 2023

@kciesielski could you take a look maybe? :)

@kciesielski kciesielski self-assigned this Jun 22, 2023
@kciesielski kciesielski added the enhancement New feature or request label Jun 22, 2023
Copy link
Member

@kciesielski kciesielski left a comment

Choose a reason for hiding this comment

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

Thanks a lot! Looks great, I just had 3 super minor comments, but generally LGTM.

build.sbt Outdated
if (!samReady) {
sam.destroy()
val exit = sam.exitValue()
log.error(s"failed to start sam local within 60 seconds (exit code: $exit")
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
log.error(s"failed to start sam local within 60 seconds (exit code: $exit")
log.error(s"failed to start sam local within 60 seconds (exit code: $exit)")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

build.sbt Outdated
Tests.Cleanup(() => {
sam.destroy()
val exit = sam.exitValue()
log.info(s"stopped sam local (exit code: $exit")
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
log.info(s"stopped sam local (exit code: $exit")
log.info(s"stopped sam local (exit code: $exit)")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -9,7 +9,7 @@ import sttp.tapir.server.interceptor.RequestResult
import sttp.tapir.server.interceptor.reject.RejectInterceptor
import sttp.tapir.server.interpreter.{BodyListener, FilterServerEndpoints, ServerInterpreter}

private[lambda] abstract class AwsServerInterpreter[F[_]: MonadError] {
private[aws] abstract class AwsServerInterpreter[F[_]: MonadError] {
Copy link
Member

Choose a reason for hiding this comment

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

question: This change isn't needed, right? Or maybe I'm missing something?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That is required, because sttp.tapir.serverless.aws.ziolambda.AwsZioServerInterpreter depends on sttp.tapir.serverless.aws.lambda.AwsServerInterpreter and for these two the closest common package is sttp.tapir.serverless.aws. That is why it should be private to [aws] to make the code compile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Serverless support for ZIO
3 participants