Skip to content

Commit

Permalink
Metadata: Remove definition, spec, mask and secret mask files (#6438)
Browse files Browse the repository at this point in the history
  • Loading branch information
bnchrch committed May 22, 2023
1 parent 15d6505 commit 3797fc7
Show file tree
Hide file tree
Showing 15 changed files with 18 additions and 1,138 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void testSchedulerLogs() {

/**
* This test ensures the masking file generated by
* {@link io.airbyte.config.specs.ConnectorSpecMaskGenerator} is accessible in the server. This is
* {@link io.airbyte.config.specs.ConnectorSpecMaskDownloader} is accessible in the server. This is
* required to ensure the server masks connector secrets in logs. Since the logic and the generated
* spec come from different modules the easiest way to test this is in a downstream consumer
* application.
Expand Down
9 changes: 9 additions & 0 deletions airbyte-commons/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
id "java-library"
id "de.undercouch.download" version "5.4.0"
}

dependencies {
Expand All @@ -9,4 +10,12 @@ dependencies {
implementation 'com.jayway.jsonpath:json-path:2.7.0'
}

task downloadSpecSecretMask(type: Download) {
src 'https://connectors.airbyte.com/files/registries/v0/specs_secrets_mask.yaml'
dest new File(projectDir, 'src/main/resources/seed/specs_secrets_mask.yaml')
overwrite true
}

tasks.processResources.dependsOn(downloadSpecSecretMask)

Task publishArtifactsTask = getPublishArtifactsTask("$rootProject.ext.version", project)
6 changes: 0 additions & 6 deletions airbyte-config/init/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,6 @@ tasks.named("buildDockerImage") {

Task publishArtifactsTask = getPublishArtifactsTask("$rootProject.ext.version", project)

task validateIcons(type: JavaExec, dependsOn: [compileJava]) {
classpath = sourceSets.main.runtimeClasspath
mainClass = 'io.airbyte.config.init.IconValidationTask'
}

validateIcons.shouldRunAfter processResources
processResources {
from("${project.rootDir}/airbyte-connector-builder-resources")
}

This file was deleted.

42 changes: 6 additions & 36 deletions airbyte-config/specs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import java.util.concurrent.TimeUnit

plugins {
id 'java-library'
id "de.undercouch.download" version "5.4.0"
}

dependencies {
Expand All @@ -14,43 +15,12 @@ dependencies {
implementation project(':airbyte-json-validation')
}

task downloadConnectorRegistry(type: JavaExec, dependsOn: compileJava) {
/**
* run this once a day or if the file doesn't exist. if you want to force this task to run
* do so with --rerun e.g. ./gradlew :airbyte-config:specs:downloadConnectorRegistry --info --rerun
*/
def outputFile = file(rootProject.project(':airbyte-config:init').projectDir.path + '/src/main/resources/seed/oss_registry.json')
outputs.upToDateWhen { outputFile.exists() &&
System.currentTimeMillis() - outputFile.lastModified() < TimeUnit.DAYS.toMillis(1) }
classpath = sourceSets.main.runtimeClasspath
mainClass = 'io.airbyte.config.specs.ConnectorRegistryDownloader'
args project(":airbyte-config:init").projectDir
task downloadConnectorRegistry(type: Download) {
src 'https://connectors.airbyte.com/files/registries/v0/oss_registry.json'
dest new File(project(":airbyte-config:init").projectDir, 'src/main/resources/seed/oss_registry.json')
overwrite true
}

project(":airbyte-config:init").tasks.processResources.dependsOn(downloadConnectorRegistry)
project(":airbyte-config:init").tasks.processTestResources.dependsOn(downloadConnectorRegistry)
project(":airbyte-config:init").tasks.test.dependsOn(downloadConnectorRegistry)


task generateConnectorSpecsMask(type: JavaExec, dependsOn: downloadConnectorRegistry) {
classpath = sourceSets.main.runtimeClasspath

mainClass = 'io.airbyte.config.specs.ConnectorSpecMaskGenerator'

args '--resource-root'
args new File(project(":airbyte-config:init").projectDir, '/src/main/resources')
}

// TODO (ben): Remove once cloud is no longer depenedant on this.
task generateSeedConnectorSpecs(type: JavaExec, dependsOn: generateConnectorSpecsMask) {
classpath = sourceSets.main.runtimeClasspath

mainClass = 'io.airbyte.config.specs.SeedConnectorSpecGenerator'

args '--seed-root'
args new File(project(":airbyte-config:init").projectDir, '/src/main/resources/seed')
}

project(":airbyte-config:init").tasks.processResources.dependsOn(generateConnectorSpecsMask)
project(":airbyte-config:init").processResources.dependsOn(downloadConnectorRegistry)

Task publishArtifactsTask = getPublishArtifactsTask("$rootProject.ext.version", project)

This file was deleted.

This file was deleted.

Loading

0 comments on commit 3797fc7

Please sign in to comment.