https://kotlinlang.org logo
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
kotless
  • s

    Sam

    09/18/2019, 1:46 PM
    Hello everyone
    t
    • 2
    • 1
  • s

    Sam

    09/18/2019, 3:48 PM
    I’m waiting for documentation of
    kotless
    t
    • 2
    • 1
  • h

    homeless

    10/17/2019, 1:04 PM
    Hello all Can I deploy without terraform at kotless?
    t
    • 2
    • 112
  • n

    neil

    12/06/2019, 9:52 AM
    @TanVD I am running ktor on ECS. Are there any plans to support ECS services in kotless?
    t
    d
    • 3
    • 8
  • a

    annyce

    12/27/2019, 6:38 PM
    Figured it out, the
    ktor-locations
    feature is not supported. Changed the code to use the default post method and the method was detected.
    t
    • 2
    • 1
  • a

    annyce

    12/27/2019, 6:46 PM
    I'm still unable to load the site
    <https://api.ktor-kotless-ufo.info/>
    or the the graphql endpoint. Any ideas are appreciated. But I'll just keep trying in the meantime. Thanks
    ✔️ 1
    t
    • 2
    • 4
  • v

    v79

    01/02/2020, 10:55 AM
    Forgive this newbie - I'm creating the simplest kotless-ktor web app, but my gradle deploy task is failing with the error "The system cannot find the path specified.". Is there any way of identifying which file it can't find?
    Skipping task ':classes' as it has no actions.
    :classes (Thread[Daemon worker,5,main]) completed. Took 0.0 secs.
    :shadowJar (Thread[Daemon worker,5,main]) started.
    
    > Task :shadowJar UP-TO-DATE
    Skipping task ':shadowJar' as it is up-to-date.
    :shadowJar (Thread[Daemon worker,5,main]) completed. Took 0.021 secs.
    :initialize (Thread[Daemon worker,5,main]) started.
    The system cannot find the path specified.
    
    > Task :initialize
    Task ':initialize' is not up-to-date because:
      Task.upToDateWhen is false.
    :initialize (Thread[Daemon worker,5,main]) completed. Took 0.103 secs.
    :deploy (Thread[Daemon worker,5,main]) started.
    The system cannot find the path specified.
    
    > Task :deploy
    Task ':deploy' is not up-to-date because:
      Task.upToDateWhen is false.
    :deploy (Thread[Daemon worker,5,main]) completed. Took 0.037 secs.
    
    BUILD SUCCESSFUL in 6s
    So the failure is in the "deploy" block. Do I need to tell gradle where the `aws`and `sam`applications are installed?
    ✔️ 1
    t
    • 2
    • 7
  • v

    v79

    01/03/2020, 8:52 PM
    Does Kotless have an opinion on user authentication and session management? Is that part of the Terraform model, or should we just roll our own?
    t
    • 2
    • 2
  • t

    TanVD

    01/04/2020, 10:53 PM
    Few highlights for next release: During current development iteration I am focusing on a local start functionality. Ultimate goal is to provide Kotless user with ability to debug application fully locally, inside IDE and don't bother about mocking any AWS service. To achieve this Kotless uses LocalStack -- during local start plugin will start LocalStack container with services, used by application, and will apply configuration to them (e.g. it will apply DynamoDB tables definitions, that are located in Terraform extensions files) If user deploys application and all the infrastructure from Kotless + Terraform extensions -- it should start locally and work exactly like in a cloud. It will work both for Kotless DSL and Ktor. AWS Emulation support is already in master and works for example projects -- shortener and site. If you have any ideas, comments -- don't hesitate to reply in thread or DM me 🙂
    👍 4
    • 1
    • 1
  • h

    hymnfortheweekend

    01/18/2020, 8:35 AM
    I have same problem with this issue (https://github.com/JetBrains/kotless/issues/14)! But solution in issue doesn't work at me :C How to solve this problem?
    t
    • 2
    • 10
  • m

    Martin Wenisch

    02/05/2020, 10:17 AM
    Hi, I'm testing kotless generated tf for new project and I have need for
    vpc_config
    setting in my
    resource "aws_lambda_function" "merged_0"
    . Right now I'm solving it by using
    <http://override.tf|override.tf>
    file for deployment (which limits me to
    MergeLambda.All
    ). Is there better way how to integrate Lambdas into VPC? Also, I wonder if there is interest for PR with
    vpc_config
    integrated into
    LambdaFunction
    and
    LambdaFactory
    as it might be worth solving it by custom patch. Thank you.
    t
    • 2
    • 4
  • t

    TanVD

    04/15/2020, 9:38 PM
    Yep, you are right. In general right now it does not solve cold-start problem completey (while I am working on some runtime-related improvement that may a bit help). But Kotless I aim to support MPP (JS/Native), so eventually I hope that Kotless be able to fix cold-start problem completely 🙂
    :thread-please: 1
    👍 3
    m
    • 2
    • 2
  • g

    gumil

    04/24/2020, 10:05 PM
    hello people, I am having an error running kotless locally:
    > Can't get Docker image: RemoteDockerImage(imageName=localstack/localstack:0.9.4)
    I am not sure what to do next. I only followed the official documentation
    t
    • 2
    • 2
  • t

    TanVD

    05/24/2020, 3:12 PM
    Hey, folks 🙂 Just a quick heads-up. Next release would be all about the support of Spring Boot.
    🎉 3
    • 1
    • 1
  • m

    Mattlangsenkamp

    06/16/2020, 5:02 AM
    Does the kotless framework support graphQL? if so what libraries are recommended?
    t
    a
    • 3
    • 3
  • m

    Mattlangsenkamp

    06/18/2020, 4:58 AM
    aside from adding
    @DynamoDBTable(tableName, PermissionLevel.ReadWrite)
    to the object that has the client object is there anything else I need to do on the aws side? ikeep getting a
    :assumed-role/graphql-post/graphql-post is not authorized to perform: dynamodb:Scan on resource
    error
    t
    • 2
    • 14
  • g

    gumil

    06/18/2020, 7:10 PM
    Are there good documentation on how to use
    @Post
    usin kotless dsl?
    t
    • 2
    • 12
  • g

    gumil

    06/19/2020, 3:24 PM
    Here is a telegram bot made possible with kotless https://github.com/gumil/NookBot
    🔥 2
    t
    • 2
    • 1
  • g

    gumil

    06/19/2020, 6:26 PM
    is there a way to add environment variables automatically in AWS lambda through kotless?
    t
    h
    • 3
    • 9
  • t

    TanVD

    06/23/2020, 10:02 PM
    Hey all! I wonder, how much of people here is using: 1. Amazon Web Services 2. Google Cloud Platform 3. Microsoft Azure 4. Any other (comment in thread) Please, choose the number below or write the platform you use in a thread 🙂
    2️⃣ 6
    1️⃣ 15
    3️⃣ 6
    m
    i
    l
    • 4
    • 7
  • m

    Mattlangsenkamp

    06/28/2020, 7:59 PM
    Kotless autowarming is essentially just a cron that calls an endpoint every couple minutes to keep it in the AWS ready queue. Is my understanding of this correct?
    t
    • 2
    • 7
  • m

    Mattlangsenkamp

    07/08/2020, 5:47 PM
    During the deploy process are any ec2 instances spun up?
    t
    • 2
    • 1
  • l

    LeoColman

    07/19/2020, 3:58 AM
    How to write a Ktor test that runs from within Kotless?
    withTestApplication { 
        handleRequest(Get, "/xx").response.content shouldContain "yyy"
    }
    doesn't seem to work for
    class Server : Kotless() {
        
        override fun prepare(app: Application) {
            app.routing { 
                static("/") {
                    resource("/xx", "yy.html")
                }
            }
        }
    }
    What am I missing?
    t
    • 2
    • 3
  • l

    LeoColman

    07/19/2020, 5:25 PM
    Is there any example that runs on Api Gateway + Kotless (ktor)?
    t
    • 2
    • 52
  • l

    LeoColman

    07/19/2020, 10:30 PM
    Is it possible to define a per-lambda timeout?
    t
    • 2
    • 1
  • c

    Christophe Smet

    07/23/2020, 6:53 PM
    Stupid question.
    ./gradlew local
    works perfect, but i launches a new docker instance every time. How can I deploy something locally again without new docker instances?
    t
    • 2
    • 15
  • m

    Mattlangsenkamp

    07/31/2020, 10:08 PM
    is setting up CORs needed to be done in the gradle.kts file? I installed CORS within ktor but i am still getting CORS related errors when I try and access the server from apollo client
    t
    • 2
    • 4
  • t

    TanVD

    08/25/2020, 10:14 AM
    Version 0.1.6 with bug fixes, Java 8 and 11 support and Terraform 0.12 released! Full changelog:
    # 0.1.6 - 2020-08-25
    
    ## Added
    
    * Support for different runtimes: Java 8 and Java 11
    
    ## Changed
    
    * Migrate to Terraform 12 by default
    
    ## Fixed
    
    * Problem with LocalStack not stopping after a run
    👍 1
    🎉 2
    • 1
    • 1
  • d

    dector

    08/27/2020, 6:21 PM
    👋 There is
    pathParameters
    map in
    Request
    . But I can't see in sources if it's filled by some data. (https://github.com/JetBrains/kotless/blob/ae3b2248103a9eef32fb2242c6b78ab2bb54b11f/dsl/common/lang-common/src/main/kotlin/io/kotless/dsl/model/HTTP.kt#L18) I guess defining path parameters is not possible for now (e.g. like in ktor's routing
    /greet/{user}
    ). Or am I missing something?
    t
    • 2
    • 2
  • s

    sikri

    08/30/2020, 1:38 PM
    hey, i’m using ktor version of kotless on terraform file generation phase it generates 3 same resources, resulting in a corrupted terraform file, is there any way to find out why it generates 3 same resources?
    t
    • 2
    • 6
Powered by Linen
Title
s

sikri

08/30/2020, 1:38 PM
hey, i’m using ktor version of kotless on terraform file generation phase it generates 3 same resources, resulting in a corrupted terraform file, is there any way to find out why it generates 3 same resources?
t

TanVD

08/30/2020, 2:02 PM
It is pretty strange. Can you share your code with me? Or any minimal reproducing example. I would take a look. Kotless should generate same resources only if you actually has clashing declarations of HTTP routes
s

sikri

08/30/2020, 2:09 PM
okay, i will prepare repo asap, maybe this evening, thanks for replying
t

TanVD

08/30/2020, 2:42 PM
No problem 🙂 Ping me once you have an example and I'll investigate)
s

sikri

08/30/2020, 6:25 PM
@TanVD i believe the problem is in ktor parser for example, for ktor with koin next code is valid:
routing {
   // koin
   get<GetAllUsersEndpoint>().invoke(this)
}

class GetAllUsersEndpoint(
   private val usecase: Usecase
) : (Route) -> Route {
   fun invoke(route: Route) = route.get("allUsers") {
      .... //logic
   }
}
but I assume kotless’ ktor parser expect for routes and endpoints do be ALWAYS declared in a body of “routing” due to the fact that it is for small serverless lambdas, it is not a problem, but imo it should be mentioned anywhere that routes and endpoints SHOULD be declared in
routing
DSL
t

TanVD

08/30/2020, 6:35 PM
Hm, I would not say that it is kind of a rule. Your example should be working and too. If it does not work -- it is definitely a bug in Kotless parser logic 🙂 Kotless must evaluate all functions bodies that are able to somehow access
Routing
context. Could you please file an issue?
In general case, Kotless should not have any limitations and should be able to deploy any kinds of Ktor applications. All the situations in which Kotless does not produce the same REST API Ktor can be considered as bugs. Definitely, there will be some implementation-related limitations (for example, Kotless probably would not work for a very large projects with a routing tree of thousands of parts), but it is definitely not that case
View count: 8