Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
7cc02a0
Exit when encountering a config erro
akashkulk May 21, 2024
5b1249d
Fix
akashkulk May 21, 2024
64d0b7f
toggle cdk
akashkulk May 21, 2024
b8cf8f9
Merge branch 'master' into akash/config-error
akashkulk May 21, 2024
c551aee
Merge branch 'master' into akash/config-error
akashkulk May 22, 2024
a9dc3eb
comment out
akashkulk May 22, 2024
f6ad9a9
Merge branch 'master' into akash/config-error
akashkulk May 28, 2024
6d688a6
fix
akashkulk May 28, 2024
125e391
Disable config error tests in integration test runner
akashkulk May 28, 2024
a3ba64b
Uncomment tests
akashkulk May 28, 2024
7c2bbcc
Mock out testReadException
akashkulk May 28, 2024
c589d93
enable testREadException
akashkulk May 28, 2024
bafea3d
revert
akashkulk May 28, 2024
f8c1b6b
FIx check
akashkulk May 28, 2024
0589919
Merge branch 'master' into akash/config-error
akashkulk May 28, 2024
74f1707
Merge branch 'master' into akash/config-error
akashkulk May 28, 2024
69f6b25
toggle mssql and mysql
akashkulk May 29, 2024
6a3cf33
Merge branch 'master' into akash/config-error
akashkulk May 29, 2024
d9d9073
revert build.gradle
akashkulk May 29, 2024
09ce5a4
Merge branch 'master' into akash/config-error
akashkulk May 29, 2024
e29db84
Merge branch 'master' into akash/config-error
akashkulk May 29, 2024
1e0d2f4
Fix versions
akashkulk May 29, 2024
527c71c
Revert postgres docs
akashkulk May 29, 2024
2584e72
Merge branch 'master' into akash/config-error
akashkulk May 29, 2024
398c5ae
Bump cdk once agaain
akashkulk May 29, 2024
c9f5789
Merge branch 'master' into akash/config-error
akashkulk May 29, 2024
3e39f14
toggle
akashkulk May 29, 2024
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions airbyte-cdk/java/airbyte-cdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ corresponds to that version.

| Version | Date | Pull Request | Subject |
|:--------|:-----------|:-----------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 0.36.2 | 2024-05-29 | [\#38538](https://github.com/airbytehq/airbyte/pull/38357) | Exit connector when encountering a config error. |
| 0.36.0 | 2024-05-29 | [\#38358](https://github.com/airbytehq/airbyte/pull/38358) | Plumb generation_id / sync_id to destinations code |
| 0.35.14 | 2024-05-28 | [\#38738](https://github.com/airbytehq/airbyte/pull/38738) | make ThreadCreationInfo cast as nullable |
| 0.35.13 | 2024-05-28 | [\#38632](https://github.com/airbytehq/airbyte/pull/38632) | minor changes to allow conversion of snowflake tests to kotlin |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ internal constructor(
ConnectorExceptionUtil.getDisplayMessage(rootConfigErrorThrowable),
)
// On receiving a config error, the container should be immediately shut down.
System.exit(1)
} else if (ConnectorExceptionUtil.isTransientError(rootTransientErrorThrowable)) {
AirbyteTraceMessageUtility.emitTransientErrorTrace(
e,
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version=0.36.1
version=0.36.2
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import java.util.concurrent.TimeUnit
import java.util.concurrent.atomic.AtomicBoolean
import java.util.function.Consumer
import org.apache.commons.lang3.ThreadUtils
import org.assertj.core.api.AssertionsForClassTypes
import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test
Expand Down Expand Up @@ -221,32 +220,6 @@ internal class IntegrationRunnerTest {
Mockito.verify(jsonSchemaValidator).validate(any(), any())
}

@Test
@Throws(Exception::class)
fun testReadException() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you explain why we need to remove this test?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test fails now that we are properly exiting when catching the exception. We are changing the behavior of re-throwing the exception

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, in this case, we might be interested in using this JUnit rule to verify the exit status:

https://stefanbirkner.github.io/system-rules/#ExpectedSystemExit

val intConfig = IntegrationConfig.read(configPath, configuredCatalogPath, statePath)
val configErrorException = ConfigErrorException("Invalid configuration")

Mockito.`when`(cliParser.parse(ARGS)).thenReturn(intConfig)
Mockito.`when`(source.read(CONFIG, CONFIGURED_CATALOG, STATE))
.thenThrow(configErrorException)

val expectedConnSpec = Mockito.mock(ConnectorSpecification::class.java)
Mockito.`when`(source.spec()).thenReturn(expectedConnSpec)
Mockito.`when`(expectedConnSpec.connectionSpecification).thenReturn(CONFIG)

val jsonSchemaValidator = Mockito.mock(JsonSchemaValidator::class.java)
val throwable =
AssertionsForClassTypes.catchThrowable {
IntegrationRunner(cliParser, stdoutConsumer, null, source, jsonSchemaValidator)
.run(ARGS)
}

AssertionsForClassTypes.assertThat(throwable).isInstanceOf(ConfigErrorException::class.java)
// noinspection resource
Mockito.verify(source).read(CONFIG, CONFIGURED_CATALOG, STATE)
}

@Test
@Throws(Exception::class)
fun testCheckNestedException() {
Expand Down
2 changes: 1 addition & 1 deletion airbyte-integrations/connectors/source-mysql/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
}

airbyteJavaConnector {
cdkVersionRequired = '0.35.11'
cdkVersionRequired = '0.36.2'
features = ['db-sources']
useLocalCdk = false
}
Expand Down
2 changes: 1 addition & 1 deletion airbyte-integrations/connectors/source-mysql/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ data:
connectorSubtype: database
connectorType: source
definitionId: 435bb9a5-7887-4809-aa58-28c27df0d7ad
dockerImageTag: 3.4.5
dockerImageTag: 3.4.6
dockerRepository: airbyte/source-mysql
documentationUrl: https://docs.airbyte.com/integrations/sources/mysql
githubIssueLabel: source-mysql
Expand Down
1 change: 1 addition & 0 deletions docs/integrations/sources/mysql.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ Any database or table encoding combination of charset and collation is supported

| Version | Date | Pull Request | Subject |
|:--------|:-----------| :--------------------------------------------------------- |:------------------------------------------------------------------------------------------------------------------------------------------------|
| 3.4.6 | 2024-05-29 | [38538](https://github.com/airbytehq/airbyte/pull/38538) | Exit connector when encountering a config error. |
| 3.4.5 | 2024-05-23 | [38198](https://github.com/airbytehq/airbyte/pull/38198) | Sync sending trace status messages indicating progress. |
| 3.4.4 | 2024-05-15 | [38208](https://github.com/airbytehq/airbyte/pull/38208) | disable counts in full refresh stream in state message. |
| 3.4.3 | 2024-05-13 | [38104](https://github.com/airbytehq/airbyte/pull/38104) | Handle transient error messages. |
Expand Down