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

Add WellKnownTypes to the Orchestrator #21897

Merged
merged 4 commits into from
Jan 26, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 3 additions & 0 deletions airbyte-container-orchestrator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ ENV AIRBYTE_ENTRYPOINT "/app/${APPLICATION}-${VERSION}/bin/${APPLICATION}"

WORKDIR /app

# Grab well-known types file
COPY WellKnownTypes.json /app

# Move orchestrator app
ADD bin/${APPLICATION}-${VERSION}.tar /app

Expand Down
15 changes: 15 additions & 0 deletions airbyte-container-orchestrator/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import groovy.json.JsonBuilder
import groovy.yaml.YamlSlurper

plugins {
id 'application'
}
Expand Down Expand Up @@ -54,6 +57,18 @@ application {
applicationDefaultJvmArgs = ['-XX:+ExitOnOutOfMemoryError', '-XX:MaxRAMPercentage=75.0']
}

task generateWellKnownTypes() {
edgao marked this conversation as resolved.
Show resolved Hide resolved
doLast {
def wellKnownTypesYaml = project(':airbyte-protocol').file('protocol-models/src/main/resources/airbyte_protocol/well_known_types.yaml').text
def parsedYaml = new YamlSlurper().parseText(wellKnownTypesYaml)
def wellKnownTypesJson = new JsonBuilder(parsedYaml).toPrettyString()
def targetFile = project.file("build/docker/WellKnownTypes.json")
targetFile.getParentFile().mkdirs()
targetFile.text = wellKnownTypesJson
}
}

tasks.named("buildDockerImage") {
dependsOn copyGeneratedTar
dependsOn generateWellKnownTypes
}
1 change: 1 addition & 0 deletions airbyte-workers/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ task generateWellKnownTypes() {

tasks.named("buildDockerImage") {
dependsOn copyGeneratedTar
dependsOn generateWellKnownTypes
edgao marked this conversation as resolved.
Show resolved Hide resolved
}

// Ideally, we would have buildDockerImage depend on generateWellKnownTypes
Expand Down