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

Remove unused webbackend search code. #17008

Merged
merged 11 commits into from
Sep 26, 2022
54 changes: 0 additions & 54 deletions airbyte-api/src/main/openapi/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2014,27 +2014,6 @@ paths:
$ref: "#/components/schemas/WebBackendConnectionRead"
"422":
$ref: "#/components/responses/InvalidInputResponse"
/v1/web_backend/connections/search:
post:
tags:
- web_backend
summary: Search connections
operationId: webBackendSearchConnections
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/WebBackendConnectionSearch"
required: true
responses:
"200":
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/WebBackendConnectionReadList"
"422":
$ref: "#/components/responses/InvalidInputResponse"
/v1/web_backend/state/get_type:
post:
tags:
Expand Down Expand Up @@ -3421,39 +3400,6 @@ components:
$ref: "#/components/schemas/SourceSearch"
destination:
$ref: "#/components/schemas/DestinationSearch"
WebBackendConnectionSearch:
type: object
properties:
connectionId:
$ref: "#/components/schemas/ConnectionId"
name:
type: string
namespaceDefinition:
$ref: "#/components/schemas/NamespaceDefinitionType"
namespaceFormat:
type: string
description: Used when namespaceDefinition is 'customformat'. If blank then behaves like namespaceDefinition = 'destination'. If "${SOURCE_NAMESPACE}" then behaves like namespaceDefinition = 'source'.
default: null
example: "${SOURCE_NAMESPACE}"
prefix:
type: string
description: Prefix that will be prepended to the name of each stream when it is written to the destination.
sourceId:
$ref: "#/components/schemas/SourceId"
destinationId:
$ref: "#/components/schemas/DestinationId"
schedule:
$ref: "#/components/schemas/ConnectionSchedule"
scheduleType:
$ref: "#/components/schemas/ConnectionScheduleType"
scheduleData:
$ref: "#/components/schemas/ConnectionScheduleData"
status:
$ref: "#/components/schemas/ConnectionStatus"
source:
$ref: "#/components/schemas/SourceSearch"
destination:
$ref: "#/components/schemas/DestinationSearch"
ConnectionReadList:
type: object
required:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@
import io.airbyte.api.model.generated.WebBackendConnectionRead;
import io.airbyte.api.model.generated.WebBackendConnectionReadList;
import io.airbyte.api.model.generated.WebBackendConnectionRequestBody;
import io.airbyte.api.model.generated.WebBackendConnectionSearch;
import io.airbyte.api.model.generated.WebBackendConnectionUpdate;
import io.airbyte.api.model.generated.WebBackendWorkspaceState;
import io.airbyte.api.model.generated.WebBackendWorkspaceStateResult;
Expand Down Expand Up @@ -818,11 +817,6 @@ public WebBackendConnectionReadList webBackendListAllConnectionsForWorkspace(fin
return execute(() -> webBackendConnectionsHandler.webBackendListAllConnectionsForWorkspace(workspaceIdRequestBody));
}

@Override
public WebBackendConnectionReadList webBackendSearchConnections(final WebBackendConnectionSearch webBackendConnectionSearch) {
return execute(() -> webBackendConnectionsHandler.webBackendSearchConnections(webBackendConnectionSearch));
}

@Override
public WebBackendConnectionRead webBackendGetConnection(final WebBackendConnectionRequestBody webBackendConnectionRequestBody) {
return execute(() -> webBackendConnectionsHandler.webBackendGetConnection(webBackendConnectionRequestBody));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,19 +177,6 @@ private static WebBackendConnectionRead getWebBackendConnectionRead(final Connec
.resourceRequirements(connectionRead.getResourceRequirements());
}

public WebBackendConnectionReadList webBackendSearchConnections(final WebBackendConnectionSearch webBackendConnectionSearch)
throws ConfigNotFoundException, IOException, JsonValidationException {

final List<WebBackendConnectionRead> reads = Lists.newArrayList();
for (final ConnectionRead connectionRead : connectionsHandler.listConnections().getConnections()) {
if (connectionsHandler.matchSearch(toConnectionSearch(webBackendConnectionSearch), connectionRead)) {
reads.add(buildWebBackendConnectionRead(connectionRead));
}
}

return new WebBackendConnectionReadList().connections(reads);
}

// todo (cgardens) - This logic is a headache to follow it stems from the internal data model not
// tracking selected streams in any reasonable way. We should update that.
public WebBackendConnectionRead webBackendGetConnection(final WebBackendConnectionRequestBody webBackendConnectionRequestBody)
Expand Down
Loading