Skip to content

Commit

Permalink
Remove Integrations.java and initially persisted specs (#535)
Browse files Browse the repository at this point in the history
  • Loading branch information
sherifnada authored Oct 9, 2020
1 parent 6ceb3d2 commit 8e2d973
Show file tree
Hide file tree
Showing 12 changed files with 36 additions and 301 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion airbyte-scheduler/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ dependencies {
implementation project(':airbyte-config:models')
implementation project(':airbyte-config:persistence')
implementation project(':airbyte-db')
implementation project(':airbyte-integrations')
implementation project(':airbyte-workers')

testImplementation "org.testcontainers:postgresql:1.15.0-rc2"
Expand Down
1 change: 0 additions & 1 deletion airbyte-server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ dependencies {
implementation project(':airbyte-config:persistence')
implementation project(':airbyte-config:init')
implementation project(':airbyte-db')
implementation project(':airbyte-integrations')
implementation project(':airbyte-scheduler')

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public ConfigurationApi(final ConfigRepository configRepository, final Scheduler
webBackendConnectionsHandler = new WebBackendConnectionsHandler(connectionsHandler, sourceImplementationsHandler, jobHistoryHandler);
webBackendSourceImplementationHandler = new WebBackendSourceImplementationHandler(sourceImplementationsHandler, schedulerHandler);
webBackendDestinationImplementationHandler = new WebBackendDestinationImplementationHandler(destinationImplementationsHandler, schedulerHandler);
debugInfoHandler = new DebugInfoHandler();
debugInfoHandler = new DebugInfoHandler(configRepository);
}

// WORKSPACE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,25 @@

import com.google.common.collect.Lists;
import io.airbyte.api.model.DebugRead;
import io.airbyte.integrations.Integrations;
import io.airbyte.commons.docker.DockerUtils;
import io.airbyte.config.persistence.ConfigRepository;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Stream;
import javax.annotation.Nullable;
import org.apache.commons.io.IOUtils;

public class DebugInfoHandler {

private ConfigRepository configRepository;

public DebugInfoHandler(ConfigRepository configRepository) {
this.configRepository = configRepository;
}

public DebugRead getInfo() {
List<Map<String, String>> integrationImages = getIntegrationImages();
List<Map<String, String>> runningCoreImages = getRunningCoreImages();
Expand Down Expand Up @@ -88,10 +95,14 @@ private static List<Map<String, String>> getRunningCoreImages() {
}
}

private static List<Map<String, String>> getIntegrationImages() {
private List<Map<String, String>> getIntegrationImages() {
try {
return Arrays.stream(Integrations.values())
.map(Integrations::getTaggedImage)
Stream<String> sourceImages =
configRepository.listStandardSources().stream().map(s -> DockerUtils.getTaggedImageName(s.getDockerRepository(), s.getDockerImageTag()));
Stream<String> destinationImages =
configRepository.listStandardDestinations().stream()
.map(d -> DockerUtils.getTaggedImageName(d.getDockerRepository(), d.getDockerImageTag()));
return Stream.concat(sourceImages, destinationImages)
.map(image -> {
try {
String hash = runAndGetOutput(Lists.newArrayList("docker", "images", "--no-trunc", "--quiet", image));
Expand Down
Loading

0 comments on commit 8e2d973

Please sign in to comment.