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

Java CDK 'no-op': v0.0.1, v0.0.2 #28687

Merged
merged 134 commits into from
Aug 21, 2023
Merged

Java CDK 'no-op': v0.0.1, v0.0.2 #28687

merged 134 commits into from
Aug 21, 2023

Conversation

aaronsteers
Copy link
Collaborator

@aaronsteers aaronsteers commented Jul 25, 2023

Note
Part of this epic.

(Replaces #28446.)

What

New Java CDK for Sources DB. For an overview, you can read a preview of the developer-facing docs here:

This should be considered a "no-op" version of the CDK. The PR is non-invasive so that it can be merged without issue and without merge conflicts.

In this PR, we will:

  1. Create a CDK test flow.
  2. Create a CDK publish flow (MavenLocal).
  3. Map a dependency from at least one connector to the CDK.
  4. Create a CDK publish flow (public Maven).
  5. Create CI flows to manage the test and publish lifecycle tasks.
  6. Point all Java connectors to depend on the CDK.

Working and timely tests are critical to use having confidence to deploy the next time around.

  1. The airbyte-ci test command was previously skipping execution of unit tests. This PR brings back unit tests.
  2. Posgres had two flaky unit tests which I've disabled. I've logged an issue for follow-up here:
  3. Added --fail-fast, --code-tests-only, and --fast-tests-only to the airbyte-ci connectors test command. If no arguments are set, then the default behaviors are unchanged.
    • As of now, the 'fast tests' are just all of the unit tests. We can add handling for 'slow' unit tests in the future if needed.
    • "Code tests" are everything except pre-release checklist and metadata items - including format checks, unit tests, and integration tests. This mode allows you to see your code is working before investing in metadata, version bumps, changelogs, etc.
    • "Fail fast" is a setting we can pass down to gradle, but it's also a behavior we can implement on our side. The current behavior is to tell Gradle to abort tests once it sees its first failure, and also then in our control flow, we return without running more tests.
    • Sample usage when debugging, using all three flags:
      • airbyte-ci connectors --name=source-postgres test --fail-fast --code-tests-only --fast-tests-only

Immediate fast-follow PR can be merged as soon as this one does:

And this v0.0.1 PR moves code into the CDK:

How

Describe the solution

Recommended reading order

  1. Readme (to understand DX): airbyte-cdk/java/airbyte-cdk/README.md
  2. Gradle tasks: build.gradle and airbyte-cdk/java/airbyte-cdk/build.gradle
  3. Example changes to source-mysql, esp. build.gradle in airbyte-integrations/connectors/source-mysql.

Not ready yet or to-be-ignored:

  1. CI flows - these are still under development.
  2. Misc auto-formatting changes on unrelated files. I cannot turn these off as of now and they are implemented automatically by the CI bot.

🚨 User Impact 🚨

(No breaking changes.)

Pre-merge Actions

Expand the relevant checklist and delete the others.

New Connector

Community member or Airbyter

  • Community member? Grant edit access to maintainers (instructions)
  • Unit & integration tests added and passing. Community members, please provide proof of success locally e.g: screenshot or copy-paste unit, integration, and acceptance test output. To run acceptance tests for a Python connector, follow instructions in the README. For java connectors run ./gradlew :airbyte-integrations:connectors:<name>:integrationTest.
  • Connector version is set to 0.0.1
    • Dockerfile has version 0.0.1
  • Documentation updated
    • Connector's README.md
    • Connector's bootstrap.md. See description and examples
    • docs/integrations/<source or destination>/<name>.md including changelog with an entry for the initial version. See changelog example
    • docs/integrations/README.md

Airbyter

If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.

  • Create a non-forked branch based on this PR and test the below items on it
  • Build is successful
  • If new credentials are required for use in CI, add them to GSM. Instructions.
Updating a connector

Community member or Airbyter

  • Grant edit access to maintainers (instructions)
  • Unit & integration tests added

Airbyter

If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.

  • Create a non-forked branch based on this PR and test the below items on it
  • Build is successful
  • If new credentials are required for use in CI, add them to GSM. Instructions.

@aaronsteers aaronsteers requested a review from a team as a code owner July 25, 2023 19:04
@octavia-squidington-iii octavia-squidington-iii added the CDK Connector Development Kit label Jul 25, 2023
@aaronsteers aaronsteers marked this pull request as draft July 25, 2023 19:06
@aaronsteers aaronsteers removed the request for review from a team July 25, 2023 19:06
@github-actions
Copy link
Contributor

Coverage report for source-postgres

There is no coverage information present for the Files changed

Total Project Coverage 69.48% 🍏

1 similar comment
@github-actions
Copy link
Contributor

Coverage report for source-postgres

There is no coverage information present for the Files changed

Total Project Coverage 69.48% 🍏

@aaronsteers
Copy link
Collaborator Author

aaronsteers commented Aug 21, 2023

Pre-release test publish for Postgres (all succeeded):

For BigQuery:

For Source-Faker (not touched, but is used as a random python check):

@github-actions
Copy link
Contributor

destination-bigquery test report (commit f53263334d) - ✅

⏲️ Total pipeline duration: 33mn56s

Step Result
Java Connector Unit Tests
Build connector tar
Build destination-bigquery docker image for platform linux/x86_64
Build airbyte/normalization:dev
Java Connector Integration Tests
Validate airbyte-integrations/connectors/destination-bigquery/metadata.yaml
Connector version semver check
QA checks

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=destination-bigquery test

@github-actions
Copy link
Contributor

Coverage report for source-postgres

There is no coverage information present for the Files changed

Total Project Coverage 69.48% 🍏

1 similar comment
@github-actions
Copy link
Contributor

Coverage report for source-postgres

There is no coverage information present for the Files changed

Total Project Coverage 69.48% 🍏

@github-actions
Copy link
Contributor

source-postgres test report (commit f53263334d) - ❌

⏲️ Total pipeline duration: 32mn00s

Step Result
Java Connector Unit Tests
Build connector tar
Build source-postgres docker image for platform linux/x86_64
Java Connector Integration Tests
Acceptance tests
Validate airbyte-integrations/connectors/source-postgres/metadata.yaml
Connector version semver check
Connector version increment check
QA checks

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-postgres test

@github-actions
Copy link
Contributor

destination-bigquery test report (commit 676b3c96a3) - ✅

⏲️ Total pipeline duration: 31mn26s

Step Result
Java Connector Unit Tests
Build connector tar
Build destination-bigquery docker image for platform linux/x86_64
Build airbyte/normalization:dev
Java Connector Integration Tests
Validate airbyte-integrations/connectors/destination-bigquery/metadata.yaml
Connector version semver check
Connector version increment check
QA checks

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=destination-bigquery test

@github-actions
Copy link
Contributor

source-postgres test report (commit 676b3c96a3) - ❌

⏲️ Total pipeline duration: 30mn26s

Step Result
Java Connector Unit Tests
Build connector tar
Build source-postgres docker image for platform linux/x86_64
Java Connector Integration Tests
Acceptance tests
Validate airbyte-integrations/connectors/source-postgres/metadata.yaml
Connector version semver check
Connector version increment check
QA checks

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-postgres test

@aaronsteers
Copy link
Collaborator Author

/approve-and-merge reason="postgres metadata test failure is unrelated, will be addressed in #27872"

@octavia-approvington
Copy link
Contributor

This code is at peace with itself
imagine karate kid approving

@octavia-approvington octavia-approvington merged commit d094b15 into master Aug 21, 2023
18 of 22 checks passed
@octavia-approvington octavia-approvington deleted the 28445-java-cdk-001 branch August 21, 2023 19:01
@aaronsteers aaronsteers changed the title Java CDK 'no-op': v0.0.1 Java CDK 'no-op': v0.0.1, v0.0.2 Aug 21, 2023
@github-actions
Copy link
Contributor

Coverage report for source-postgres

There is no coverage information present for the Files changed

Total Project Coverage 69.48% 🍏

1 similar comment
@github-actions
Copy link
Contributor

Coverage report for source-postgres

There is no coverage information present for the Files changed

Total Project Coverage 69.48% 🍏

@github-actions
Copy link
Contributor

source-postgres test report (commit f744342be0) - ✅

⏲️ Total pipeline duration: 34mn46s

Step Result
Java Connector Unit Tests
Build connector tar
Build source-postgres docker image for platform linux/x86_64
Java Connector Integration Tests
Acceptance tests
Validate airbyte-integrations/connectors/source-postgres/metadata.yaml
Connector version semver check
Connector version increment check
QA checks

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-postgres test

@github-actions
Copy link
Contributor

destination-bigquery test report (commit f744342be0) - ❌

⏲️ Total pipeline duration: 07mn50s

Step Result
Java Connector Unit Tests
Build connector tar
Build destination-bigquery docker image for platform linux/x86_64
Build airbyte/normalization:dev
Java Connector Integration Tests
Validate airbyte-integrations/connectors/destination-bigquery/metadata.yaml
Connector version semver check
Connector version increment check
QA checks

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=destination-bigquery test

@github-actions
Copy link
Contributor

destination-bigquery test report (commit 5510cd1751) - ❌

⏲️ Total pipeline duration: 32mn30s

Step Result
Java Connector Unit Tests
Build connector tar
Build destination-bigquery docker image for platform linux/x86_64
Build airbyte/normalization:dev
Java Connector Integration Tests
Validate airbyte-integrations/connectors/destination-bigquery/metadata.yaml
Connector version semver check
Connector version increment check
QA checks

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=destination-bigquery test

@github-actions
Copy link
Contributor

source-postgres test report (commit 5510cd1751) - ❌

⏲️ Total pipeline duration: 04mn00s

Step Result
Java Connector Unit Tests
Build connector tar
Build source-postgres docker image for platform linux/x86_64
Java Connector Integration Tests
Acceptance tests
Validate airbyte-integrations/connectors/source-postgres/metadata.yaml
Connector version semver check
Connector version increment check
QA checks

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-postgres test

harrytou pushed a commit to KYVENetwork/airbyte that referenced this pull request Sep 1, 2023
Co-authored-by: aaronsteers <aaronsteers@users.noreply.github.com>
Co-authored-by: Conor <cpdeethree@users.noreply.github.com>
Co-authored-by: cpdeethree <conor@airbyte.io>
Co-authored-by: Augustin <augustin@airbyte.io>
Co-authored-by: Joe Bell <joseph.bell@airbyte.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Publish initial docs for Java CDK.
8 participants