- Notifications
You must be signed in to change notification settings - Fork 4.9k
🎉 Source e2e test: support custom schema #9720
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
Conversation
| /test connector=connectors/source-e2e-test
|
| /test connector=connectors/source-e2e-test
|
bb2b890 to dba33fe Compare | /test connector=connectors/source-e2e-test
|
| /test connector=connectors/source-e2e-test
|
| /test connector=connectors/source-e2e-test-cloud
|
| To unblock Subodh, I will publish and merge this PR now. But feel free to leave any comment or request changes. I will update the connector in a follow-up PR. |
| /publish connector=connectors/source-e2e-test
|
| /publish connector=connectors/source-e2e-test-cloud
|
| | ||
| final SchemaStore schemaStore = new SchemaStore(true); | ||
| final Schema schema = schemaStore.loadSchemaJson(Jsons.serialize(stream.getStream().getJsonSchema())); | ||
| final Generator generator = new Generator(ContinuousFeedConstants.MOCK_JSON_CONFIG, schemaStore, random.get()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: I think this is equivalent to just passing new Random(seed), since you're not passing the threadlocal into a separate thread
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Will do.
| return endOfData(); | ||
| } | ||
| | ||
| if (messageIntervalMs.isPresent() && emittedMessages.get() != 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checking my understanding: the iterator will be processed single-threadedly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so. Looks like the read is handled in one thread only.
...rce-e2e-test/src/main/java/io/airbyte/integrations/source/e2e_test/ContinuousFeedSource.java Show resolved Hide resolved
...rce-e2e-test/src/main/java/io/airbyte/integrations/source/e2e_test/ContinuousFeedSource.java Show resolved Hide resolved
airbyte-integrations/connectors/source-e2e-test/src/main/resources/json_schema_draft_07.json Show resolved Hide resolved
...e2e-test/src/test/java/io/airbyte/integrations/source/e2e_test/ContinuousFeedConfigTest.java Show resolved Hide resolved
...ntegrations/connectors/source-e2e-test/src/test/resources/parse_mock_catalog_test_cases.json Show resolved Hide resolved
| }); | ||
| } | ||
| | ||
| protected void assertRecordMessages(final List<AirbyteRecordMessage> recordMessages) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add a javadoc comment explaining what this method should do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. Will do.
| import java.util.concurrent.ThreadLocalRandom; | ||
| | ||
| /** | ||
| * This acceptance test is mostly the same as {@code ContinuousFeedSourceAcceptanceTest}. The only |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could this just extend ContinuousFeedSourceAcceptanceTest and override getImageName?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is possible. However, I was not able to make gradle work with this set up. Will leave a TODO for now.
| @@ -0,0 +1,67 @@ | |||
| # End-to-End Testing Source Cloud Variant | |||
| | |||
| This is the Cloud variant of the [E2E Test Source](https://docs.airbyte.io/integrations/sources/e2e-test). It only allows the "continuous feed" mode with finite number of record messages. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add an explanation of why this is necessary+separate from the non-cloud variant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. Good point.
What
source-e2e-testconnector to allow users to specify arbitrary catalog with single or multiple streams.TODOs
UI
Single-stream continuous feed mode

Multi-stream continuous feed mode

Recommended reading order
e2e-test.mdspec.jsonContinuousFeedSource.javaContinuousFeedConfig.java🚨 User Impact 🚨
Pre-merge Checklist
Community member or Airbyter
Community member? Grant edit access to maintainers (instructions)airbyte_secret./gradlew :airbyte-integrations:connectors:<name>:integrationTest.README.mdConnector'sbootstrap.md. See description and examplesdocs/SUMMARY.mddocs/integrations/<source or destination>/<name>.mdincluding changelog. See changelog exampledocs/integrations/README.mdairbyte-integrations/builds.mdAirbyter
If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.
/test connector=connectors/<name>command is passing./publishcommand described here