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: change how runner provisioning works #2590

Merged
merged 3 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@ junit*.xml
/readme-tests
/docs/public
.ftl.lock
docker-build/
4 changes: 0 additions & 4 deletions Dockerfile.box
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ RUN go mod download -x

COPY . /src/

# Build runner template
RUN just build-kt-runtime

# Build runner
RUN just errtrace
# Reset timestamps so that the build state is reset
Expand All @@ -37,7 +34,6 @@ WORKDIR /root/

ENV PATH="/root/jre/bin:$PATH"
COPY --from=builder /hermit/pkg/openjre-18.0.2.1_1/ ./jre/
COPY --from=builder /src/build/template template
COPY --from=builder /src/build/release/ftl .
RUN mkdir deployments
# Where the module artifacts are stored
Expand Down
6 changes: 1 addition & 5 deletions Dockerfile.runner
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ RUN go mod download -x

COPY . /src/

# Build runner template
RUN just build-kt-runtime

# Build runner
RUN just errtrace
# Reset timestamps so that the build state is reset
Expand All @@ -41,7 +38,6 @@ WORKDIR /root/

ENV PATH="/root/jre/bin:$PATH"
COPY --from=builder /hermit/pkg/openjre-18.0.2.1_1/ ./jre/
COPY --from=builder /src/build/template template
COPY --from=builder /src/build/release/ftl-runner .
COPY --from=builder /src/build/release/ftl .
RUN mkdir deployments
Expand All @@ -52,4 +48,4 @@ ENV FTL_ENDPOINT="http://host.docker.internal:8892"
ENV FTL_RUNNER_BIND="http://0.0.0.0:8893"
ENV FTL_RUNNER_ADVERTISE="http://127.0.0.1:8893"

CMD ["/root/ftl-runner", "--language=kotlin", "--language=go", "--template-dir=template", "--deployment-dir=deployments"]
CMD ["/root/ftl-runner", "--template-dir=template", "--deployment-dir=deployments"]
9 changes: 1 addition & 8 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ set shell := ["bash", "-c"]
WATCHEXEC_ARGS := "-d 1s -e proto -e go -e sql -f sqlc.yaml"
RELEASE := "build/release"
VERSION := `git describe --tags --always | sed -e 's/^v//'`
RUNNER_TEMPLATE_ZIP := "backend/controller/scaling/localscaling/template.zip"
TIMESTAMP := `date +%s`
SCHEMA_OUT := "backend/protos/xyz/block/ftl/v1/schema/schema.proto"
ZIP_DIRS := "go-runtime/compile/build-template go-runtime/compile/external-module-template go-runtime/compile/main-work-template internal/projectinit/scaffolding go-runtime/scaffolding jvm-runtime/java/scaffolding jvm-runtime/kotlin/scaffolding"
Expand Down Expand Up @@ -79,7 +78,7 @@ build-sqlc:
@mk backend/controller/sql/{db.go,models.go,querier.go,queries.sql.go} backend/controller/cronjobs/sql/{db.go,models.go,querier.go,queries.sql.go} internal/configuration/sql/{db.go,models.go,querier.go,queries.sql.go} : backend/controller/sql/queries.sql backend/controller/sql/async_queries.sql backend/controller/cronjobs/sql/queries.sql internal/configuration/sql/queries.sql backend/controller/sql/schema sqlc.yaml -- "just init-db && sqlc generate"

# Build the ZIP files that are embedded in the FTL release binaries
build-zips: build-kt-runtime
build-zips:
@for dir in {{ZIP_DIRS}}; do (cd $dir && mk ../$(basename ${dir}).zip : . -- "rm -f $(basename ${dir}.zip) && zip -q --symlinks -r ../$(basename ${dir}).zip ."); done

# Rebuild frontend
Expand All @@ -105,12 +104,6 @@ publish-extension: package-extension
build-intellij-plugin:
@cd frontend/intellij && gradle buildPlugin

# Kotlin runtime is temporarily disabled; these instructions create a dummy zip in place of the kotlin runtime jar for
# the runner.
build-kt-runtime:
@mkdir -p build/template/ftl && touch build/template/ftl/temp.txt
@cd build/template && zip -q --symlinks -r ../../{{RUNNER_TEMPLATE_ZIP}} .

# Format console code.
format-frontend:
cd {{CONSOLE_ROOT}} && pnpm run lint:fix
Expand Down
4 changes: 2 additions & 2 deletions backend/controller/console/testdata/go/console/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading