From 729ba9436187498510a6f3d4d2820417e2c894a9 Mon Sep 17 00:00:00 2001 From: Catherine Noll Date: Sat, 16 Nov 2024 09:47:10 -0500 Subject: [PATCH] refactor: add previosVersionDockerImageTag to connector rollout start input (#14632) Co-authored-by: Pedro S. Lopez --- .../airbyte/commons/server/handlers/ConnectorRolloutHandler.kt | 3 +++ .../shared/models/ConnectorRolloutActivityInputStart.kt | 1 + .../rollout/worker/ConnectorRolloutWorkflowImplTest.kt | 1 + 3 files changed, 5 insertions(+) diff --git a/airbyte-commons-server/src/main/kotlin/io/airbyte/commons/server/handlers/ConnectorRolloutHandler.kt b/airbyte-commons-server/src/main/kotlin/io/airbyte/commons/server/handlers/ConnectorRolloutHandler.kt index f2e627adf6..0b996027e5 100644 --- a/airbyte-commons-server/src/main/kotlin/io/airbyte/commons/server/handlers/ConnectorRolloutHandler.kt +++ b/airbyte-commons-server/src/main/kotlin/io/airbyte/commons/server/handlers/ConnectorRolloutHandler.kt @@ -473,6 +473,7 @@ open class ConnectorRolloutHandler rollout.id, connectorRolloutWorkflowStart.updatedBy, rollout.rolloutStrategy, + actorDefinitionService.getActorDefinitionVersion(rollout.initialVersionId).dockerImageTag, rollout, ), ) @@ -497,6 +498,7 @@ open class ConnectorRolloutHandler connectorRolloutUpdate.id, connectorRolloutUpdate.updatedBy, getRolloutStrategyForManualUpdate(connectorRollout.rolloutStrategy), + actorDefinitionService.getActorDefinitionVersion(connectorRollout.initialVersionId).dockerImageTag, connectorRollout, ), ) @@ -538,6 +540,7 @@ open class ConnectorRolloutHandler connectorRolloutFinalize.id, connectorRolloutFinalize.updatedBy, getRolloutStrategyForManualUpdate(connectorRollout.rolloutStrategy), + actorDefinitionService.getActorDefinitionVersion(connectorRollout.initialVersionId).dockerImageTag, connectorRollout, ), ) diff --git a/airbyte-connector-rollout-shared/src/main/kotlin/io/airbyte/connector/rollout/shared/models/ConnectorRolloutActivityInputStart.kt b/airbyte-connector-rollout-shared/src/main/kotlin/io/airbyte/connector/rollout/shared/models/ConnectorRolloutActivityInputStart.kt index 5e5e27dc02..1d861874c5 100644 --- a/airbyte-connector-rollout-shared/src/main/kotlin/io/airbyte/connector/rollout/shared/models/ConnectorRolloutActivityInputStart.kt +++ b/airbyte-connector-rollout-shared/src/main/kotlin/io/airbyte/connector/rollout/shared/models/ConnectorRolloutActivityInputStart.kt @@ -11,5 +11,6 @@ data class ConnectorRolloutActivityInputStart( var rolloutId: UUID, var updatedBy: UUID? = null, var rolloutStrategy: ConnectorEnumRolloutStrategy? = null, + var initialVersionDockerImageTag: String? = null, var connectorRollout: ConnectorRollout? = null, ) diff --git a/airbyte-connector-rollout-worker/src/test/kotlin/io/airbyte/connector/rollout/worker/ConnectorRolloutWorkflowImplTest.kt b/airbyte-connector-rollout-worker/src/test/kotlin/io/airbyte/connector/rollout/worker/ConnectorRolloutWorkflowImplTest.kt index d9156b7c19..0c153fd00b 100644 --- a/airbyte-connector-rollout-worker/src/test/kotlin/io/airbyte/connector/rollout/worker/ConnectorRolloutWorkflowImplTest.kt +++ b/airbyte-connector-rollout-worker/src/test/kotlin/io/airbyte/connector/rollout/worker/ConnectorRolloutWorkflowImplTest.kt @@ -155,6 +155,7 @@ class ConnectorRolloutWorkflowImplTest { USER_ID, ROLLOUT_STRATEGY, null, + null, ), ) }