Skip to content

Commit

Permalink
remove loadData
Browse files Browse the repository at this point in the history
  • Loading branch information
cgardens committed Nov 1, 2022
1 parent 3719424 commit 2e6407c
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 177 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,4 @@ public Map<String, Stream<JsonNode>> dumpConfigs() throws IOException {
return decoratedPersistence.dumpConfigs();
}

@Override
public void loadData(final ConfigPersistence seedPersistence) throws IOException {
decoratedPersistence.loadData(seedPersistence);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,4 @@ <T> ConfigWithMetadata<T> getConfigWithMetadata(AirbyteConfig configType, String

Map<String, Stream<JsonNode>> dumpConfigs() throws IOException;

void loadData(ConfigPersistence seedPersistence) throws IOException;

}
Original file line number Diff line number Diff line change
Expand Up @@ -1638,14 +1638,6 @@ public Map<String, Stream<JsonNode>> dumpConfigs() throws IOException {
return result;
}

@Override
public void loadData(final ConfigPersistence seedConfigPersistence) throws IOException {
database.transaction(ctx -> {
updateConfigsFromSeed(ctx, seedConfigPersistence);
return null;
});
}

@VisibleForTesting
void updateConfigsFromSeed(final DSLContext ctx, final ConfigPersistence seedConfigPersistence) throws SQLException {
LOGGER.info("Updating connector definitions from the seed if necessary...");
Expand Down Expand Up @@ -1940,8 +1932,8 @@ static class ConnectorInfo {
ConnectorInfo(final String definitionId, final JsonNode definition) {
this.definitionId = definitionId;
this.definition = definition;
this.dockerRepository = definition.get("dockerRepository").asText();
this.dockerImageTag = definition.get("dockerImageTag").asText();
dockerRepository = definition.get("dockerRepository").asText();
dockerImageTag = definition.get("dockerImageTag").asText();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,6 @@ public Map<String, Stream<JsonNode>> dumpConfigs() throws IOException {
return decoratedPersistence.dumpConfigs();
}

@Override
public void loadData(final ConfigPersistence seedPersistence) throws IOException {
decoratedPersistence.loadData(seedPersistence);
}

private <T> void validateJson(final T config, final AirbyteConfig configType) throws JsonValidationException {
final JsonNode schema = JsonSchemaValidator.getSchema(configType.getConfigSchemaFile());
schemaValidator.ensure(schema, Jsons.jsonNode(config));
Expand Down

This file was deleted.

0 comments on commit 2e6407c

Please sign in to comment.