Skip to content

Commit 3a88fe4

Browse files
xiaohansongdanidelvalle-frontiers
authored andcommitted
should have workspaceid for update connection (airbytehq#22512)
* should have workspaceid for update connection * add test
1 parent 4dd8d30 commit 3a88fe4

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

airbyte-commons-server/src/main/java/io/airbyte/commons/server/handlers/SchedulerHandler.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,8 @@ public CheckConnectionRead checkSourceConnectionFromSourceIdForUpdate(final Sour
192192
final SourceCoreConfig sourceCoreConfig = new SourceCoreConfig()
193193
.sourceId(updatedSource.getSourceId())
194194
.connectionConfiguration(updatedSource.getConfiguration())
195-
.sourceDefinitionId(updatedSource.getSourceDefinitionId());
195+
.sourceDefinitionId(updatedSource.getSourceDefinitionId())
196+
.workspaceId(updatedSource.getWorkspaceId());
196197

197198
return checkSourceConnectionFromSourceCreate(sourceCoreConfig);
198199
}

airbyte-commons-server/src/test/java/io/airbyte/commons/server/handlers/SchedulerHandlerTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,8 @@ void testCheckSourceConnectionFromUpdate() throws IOException, JsonValidationExc
265265
final SourceConnection submittedSource = new SourceConnection()
266266
.withSourceId(source.getSourceId())
267267
.withSourceDefinitionId(source.getSourceDefinitionId())
268-
.withConfiguration(source.getConfiguration());
268+
.withConfiguration(source.getConfiguration())
269+
.withWorkspaceId(source.getWorkspaceId());
269270
when(synchronousSchedulerClient.createSourceCheckConnectionJob(submittedSource, DESTINATION_DOCKER_IMAGE, protocolVersion, false))
270271
.thenReturn((SynchronousResponse<StandardCheckConnectionOutput>) jobResponse);
271272
when(secretsRepositoryWriter.statefulSplitEphemeralSecrets(

0 commit comments

Comments
 (0)