https://kotlinlang.org logo
Join SlackCommunities
Powered by
# kotless
  • a

    Abhishek Bansal

    04/17/2021, 1:19 PM
    [Solved] What is the best way to manage different deployment environments in Kotless? Like
    staging
    ,
    production
    etc? One way that I can think of right now is to do this
    Copy code
    profile = System.getEnv("ENV_PROFILE")
    and so on instead of hardcoding them. And how can I set some of the environment variables on lambda. Like for instance if I am writing a service which calls some other service but that other service URL depends on an environment variable. Is that kind of configuration supported?
    • 1
    • 1
  • a

    Abhishek Bansal

    04/25/2021, 2:48 PM
    Is there a way to skip API Gateway configuration in kotless and just create the lambda?
    t
    • 2
    • 1
  • a

    Alexandre Brown

    05/09/2021, 4:26 AM
    Hello, I am trying to deploy a hello world application to AWS with GraalVM but I get this error :
    Copy code
    Unable to find method ''boolean com.google.common.base.Platform.stringIsNullOrEmpty(java.lang.String)''
    'boolean com.google.common.base.Platform.stringIsNullOrEmpty(java.lang.String)'
    
    Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
    
    Re-download dependencies and sync project (requires network)
    The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
    
    Stop Gradle build processes (requires restart)
    Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.
    
    In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.
    I deleted my gradle cache and it didn't solve the issue. My first intuition would be to believe I am missing something in my
    reflection.json
    but I am not sure. I can build the project, I can deploy locally, I cannot deploy to AWS. Versions : • JVM : 1.4.21 • Gradle : 7.0 • JVM Target: 11 • Kotless: 0.1.7-beta-5 • DSL: ktor-lang 0.1.7-beta-5 Here is the repo : https://github.com/AlexandreBrown/KotlessSetup Any help is appreciated
    t
    • 2
    • 3
  • i

    Imran/Malic

    05/11/2021, 4:25 PM
    Is there a beta version with GCP support or what would be needed to use it there, regarding changes in generated config files?
  • s

    Sean Abbott

    06/02/2021, 2:20 PM
    Hiya! I'm trying to see if kotless will work for us; I have a simple hello world running locally just fine, but whenever I try to generate, I get
    Copy code
    Execution failed for task ':serverless:generate'.
    > 'org.jetbrains.kotlin.analyzer.AnalysisResult org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration$default(org.jetbrains.kotlin.com.intellij.openapi.project.Project, java.util.Collection, org.jetbrains.kotlin.resolve.BindingTrace, org.jetbrains.kotlin.config.CompilerConfiguration, kotlin.jvm.functions.Function1, kotlin.jvm.functions.Function2, org.jetbrains.kotlin.com.intellij.psi.search.GlobalSearchScope, int, java.lang.Object)'
    I have no idea where to go looking for how to troubleshoot this. Any suggestions?
    t
    • 2
    • 5
  • a

    Ajay Puli

    06/22/2021, 3:18 PM
    Heyy I'm trying run my kotless project after adding the AWS dependency (similar to github example repo) But It is showing this error
    Copy code
    Execution failed for task ':local'.
    > Could not resolve all files for configuration ':runtimeClasspath'.
       > Could not find io.kotless:kotless-lang-aws:0.1.7-beta-5.
         Searched in the following locations:
           - <https://dl.google.com/dl/android/maven2/io/kotless/kotless-lang-aws/0.1.7-beta-5/kotless-lang-aws-0.1.7-beta-5.pom>
           - <https://repo.maven.apache.org/maven2/io/kotless/kotless-lang-aws/0.1.7-beta-5/kotless-lang-aws-0.1.7-beta-5.pom>
           - <https://jcenter.bintray.com/io/kotless/kotless-lang-aws/0.1.7-beta-5/kotless-lang-aws-0.1.7-beta-5.pom>
           - <https://maven.springframework.org/release/io/kotless/kotless-lang-aws/0.1.7-beta-5/kotless-lang-aws-0.1.7-beta-5.pom>
           - <https://maven.restlet.com/io/kotless/kotless-lang-aws/0.1.7-beta-5/kotless-lang-aws-0.1.7-beta-5.pom>
           - file:/Users/puliajay/Documents/kotlin_backend/Sample_Kotless/lib/kotless-lang-aws-0.1.7-beta-5.jar
           - file:/Users/puliajay/Documents/kotlin_backend/Sample_Kotless/lib/kotless-lang-aws.jar
           - file:/Users/puliajay/Documents/kotlin_backend/Sample_Kotless/lib1/kotless-lang-aws-0.1.7-beta-5.jar
           - file:/Users/puliajay/Documents/kotlin_backend/Sample_Kotless/lib1/kotless-lang-aws.jar
           - file:/Users/puliajay/Documents/kotlin_backend/Sample_Kotless/lib2/kotless-lang-aws-0.1.7-beta-5.jar
           - file:/Users/puliajay/Documents/kotlin_backend/Sample_Kotless/lib2/kotless-lang-aws.jar
         Required by:
             project :
    Please tell me how to resolve this error.
    t
    • 2
    • 2
  • v

    v79

    08/09/2021, 7:05 PM
    Does
    kotless
    have a relationship to
    ktor
    ?
    b
    • 2
    • 2
  • v

    v79

    08/10/2021, 7:30 PM
    I'm struggling with a "Hello world" example with kotless 0.1.7-beta-5, kotlin 1.4.21 - I can run locally, but the
    deploy
    or
    plan
    tasks fail with the error:
    Copy code
    Execution failed for task ':initialize'.
    > Command failed: 'D:\Development\Experiments\Kotless\KotlessTestBeta\build\kotless-bin\terraform  '
    
    * Try:
    Run with --info or --debug option to get more log output. Run with --scan to get full insights.
    
    * Exception is:
    org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':initialize'.
    	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:188)
    	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$$Lambda$481/0x0000000000000000.accept(Unknown Source)
    In my build folder there is no folder called
    kotless-bin\terraform
    .
    t
    • 2
    • 8
  • n

    nordiauwu

    08/11/2021, 4:06 PM
    Hey guys, what is the status of kotless? Is it abandoned or something?
    plus one 3
    g
    t
    • 3
    • 7
  • v

    v79

    08/19/2021, 9:32 PM
    Hi, using Kotless + Ktor I've just added my first route with a route parameter -
    get("/load-markdown/{s3key}")
    - this is working fine locally, but when I try to deploy to AWS, terraform blows up with an Invalid resource name message:
    Copy code
    Error: Invalid resource name
    
      on <http://KotlessTestBeta.tf|KotlessTestBeta.tf> line 79, in resource "aws_api_gateway_integration" "load_markdown_{s3key}_get":
      79: resource "aws_api_gateway_integration" "load_markdown_{s3key}_get" {
    
    A name must start with a letter or underscore and may contain only letters,
    digits, underscores, and dashes.
    What horrible thing have I done wrong? (Kotless 0.2.0 compiled from source).
    t
    • 2
    • 7
  • v

    v79

    08/20/2021, 2:53 PM
    I've raised defect https://github.com/JetBrains/kotless/issues/110 when trying to delete a Ktor route from a Kotless project.
    👍 4
  • r

    Ronny Bräunlich

    11/16/2021, 6:25 PM
    Hi everyone, I would like to help developing kotless. Is there a good issue to start with? The existing ones hardly have any tags assigned, so there is no "good for starters" issue. Any advice?
    t
    • 2
    • 5
  • á

    Álvaro Blázquez Checa

    12/22/2021, 4:39 PM
    Hi everyone. I am playing around with kotless. So far so good. And I am deploying my test project to aws. In order to do that I am trying to use an aws role with minimal permissions. In a real project could be problematic to use a role with full admin permissions.
    • 1
    • 5
  • s

    Suser

    12/29/2021, 3:45 AM
    hey guys, noob question, is there currently any support for something real-time like websockets in kotless?
    t
    • 2
    • 3
  • m

    miqbaldc

    01/05/2022, 11:32 AM
    Does it possible to runs #kotless with Kotlin 1.5.z using latest version #kotless? (even though it says required 1.3.z)
    t
    • 2
    • 3
  • h

    Hakon Grotte

    02/09/2022, 1:38 PM
    Has anyone managed to debug kotless' Gradle task "local" with IntelliJ breakpoints? I have attempted to run with jvmarg
    -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005
    on jvm target 11, and subsequently my Remove JVM debug manages to connect, loggint the following message:
    Connected to the target VM, address: 'localhost:5005', transport: 'socket'
    . When I attempt to run my route endpoints IntelliJ does not stop on my breakpoints
    t
    • 2
    • 9
  • p

    PJ Walstrom

    02/10/2022, 6:17 PM
    Using kotless 0.2.0, kotlin 1.5.32, gradle 7.4 I get the following error. Any suggestions?
    Copy code
    $ ./gradlew deploy
    > Task :generate FAILED
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    A problem was found with the configuration of task ':generate' (type 'KotlessGenerateTask').
      - In plugin 'io.kotless' type 'io.kotless.plugin.gradle.tasks.gen.KotlessGenerateTask' property 'myTargetVersion' doesn't have a configured value.
    t
    • 2
    • 2
  • a

    audax

    02/25/2022, 11:42 AM
    I would like to us AWS Lambda Layers with kotless. I build and upload to the layer in an extra terraform file and then override the
    merged_0
    aws_lambda_function resource with a
    layers
    attribute.
  • a

    audax

    02/25/2022, 11:43 AM
    What I don't like about this is the hardcoded name
    merged_0
    .
  • a

    audax

    02/25/2022, 11:43 AM
    Is there another more elegant way?
  • e

    elect

    04/11/2022, 3:21 PM
    what's the status in terms of integration and support of Terraform in Kotless?
    t
    • 2
    • 1
  • v

    Venerabletechie

    05/31/2022, 2:25 PM
    Any updates or roadmaps for Kotless. I was very interested in following the progress and our prototypes of moving our code to serverless.
    plus one 5
  • v

    v79

    06/12/2022, 2:17 PM
    Has anyone found an alternative to Kotless for serverless development? I know of Osiris https://github.com/cjkent/osiris , but like Kotless it appears to be dead.
    d
    t
    • 3
    • 9
  • m

    Michal Fudala

    09/06/2022, 11:57 AM
    Hi @TanVD We are excited about Kotless at VirtusLab and would like to create a PoC of Kotless with Pulumi (replacing terraform under the hood). What do you think? Does this make sense? I tested Kotless some time ago and had multiple terraform-related problems. For example, mapping method names to terraform resource names was a bit buggy.
  • s

    Shawn Witte

    11/08/2022, 8:57 AM
    Hi, I'm not sure where to ask, so I'll ask here: I'm a mobile dev and I'm trying to figure out how to set up a backend for a personal project. I expect to only ever need to
    GET
    data from the backend and I'd like to update that data on deployments (so people can submit updates to a GitHub repo for ease of collaboration). Is this an ideal usecase for serverless? I had a solution in Ktor that was deploying to Heroku, but they got rid of their free tier and now that I'm poking around again, it looks like serverless might naturally align with my usecase a little better (but I'm not sure, since I have no real backend experience to use as a reference point).
    f
    • 2
    • 2
  • a

    ahmad

    12/02/2022, 9:31 PM
    Hi, I am considering Kotless for a new project (pet project but not a small one). I can see it’s not maintained for more than a year now. Would you still recommend it for serverless projects?
  • t

    t3wad

    12/02/2022, 9:37 PM
    I don't want to hijack your thread, @ahmad with a different question, so as another question: Since kotless is fairly unmaintained at this point, is there some other project out there that achieves some of the same goals as kotless, that is (for my goals) generating infrastructure and deploying directly from source code in a way that is easily runnable locally
  • s

    Sam Gammon

    12/03/2022, 4:50 AM
    @t3wad i am working on a similar solution with some lessons borrowed from Kotless
  • s

    Sam Gammon

    12/03/2022, 4:50 AM
    if interested (it's early) feel free to DM
  • l

    Lunae

    08/07/2024, 5:25 AM
    Heyo, I know it’s been a long while since a message has been posted here but… Just to confirm… is kotless no more?