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

fix: include JAR dependencies in Kotlin deploys #486

Merged
merged 1 commit into from
Oct 12, 2023

Conversation

alecthomas
Copy link
Collaborator

By adding the following fragment to the POM:

<execution>
    <id>copy-dependencies</id>
    <phase>compile</phase>
    <goals>
        <goal>copy-dependencies</goal>
    </goals>
    <configuration>
        <outputDirectory>${project.build.directory}/dependency</outputDirectory>
        <includeScope>runtime</includeScope>
    </configuration>
</execution>

ftl deploy ./target will upload all dependencies as well as compiled source. This actually works super well in practice, and I think we can completely remove the need for building a custom ftl-runner Docker image.

One issue is that this now results in the runners having to download quite a few MB of artefacts on each deploy, but we can mitigate this by making the controller->runner artefact download process incremental too, and have each runner maintain its own cache. Probably something for later though, as it's generally pretty fast so far (eg. runner4 | info: Downloaded 148 artefacts in 1.562282s).

By adding the following fragment to the POM:

```xml
<execution>
    <id>copy-dependencies</id>
    <phase>compile</phase>
    <goals>
        <goal>copy-dependencies</goal>
    </goals>
    <configuration>
        <outputDirectory>${project.build.directory}/dependency</outputDirectory>
        <includeScope>runtime</includeScope>
    </configuration>
</execution>
```

`ftl deploy ./target` will upload all dependendcies as well as compiled
source. This actually works super well in practice, and I think we can
completely remove the need for building a custom `ftl-runner` Docker
image.

One issue is that this now results in the runners having to download
quite a few MB of artefacts on each deploy, but we can mitigate this by
making the controller->runner artefact download process incremental too,
and have each runner maintain its own cache. Probably something for
later though, as it's generally pretty fast so far.
@alecthomas alecthomas force-pushed the aat/include-dependency-jars branch from 40457f8 to 9fe3eaf Compare October 12, 2023 02:57
@alecthomas alecthomas merged commit c931fa1 into main Oct 12, 2023
9 checks passed
@alecthomas alecthomas deleted the aat/include-dependency-jars branch October 12, 2023 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant