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

[airbyte-ci] build python connectors from base images #30456

Conversation

alafanechere
Copy link
Contributor

@alafanechere alafanechere commented Sep 14, 2023

What

Closes #30236
Make our Python connector build step use the base image versions declared in the airbyte-connectors-base-images
package.

How

  • Change BuildConnectorImage to build a connector from the base image version it defined in the metadata,
    otherwise fallback to a dockerfile build.
  • Unit test these changes.

🚨 User Impact 🚨

Any connector declaring the baseImage metadata field will get built using the base image instead of its Dockerfile.

Next steps:

Implement the pre/post build hook logic: #30526

@octavia-squidington-iii octavia-squidington-iii added the area/connectors Connector related issues label Sep 14, 2023
@airbytehq airbytehq deleted a comment from github-actions bot Sep 14, 2023
@alafanechere alafanechere requested a review from a team September 14, 2023 23:08
@alafanechere alafanechere force-pushed the augustin/declare-first-base-image branch from 9350c16 to 3e01715 Compare September 15, 2023 10:10
@alafanechere alafanechere force-pushed the 09-14-change_our_python_connector_build_process_to_use_the_base_images branch from e5e4d7b to 2aef971 Compare September 15, 2023 10:10
@alafanechere alafanechere force-pushed the 09-14-change_our_python_connector_build_process_to_use_the_base_images branch from 2aef971 to 41ce5f5 Compare September 15, 2023 11:25
@alafanechere alafanechere force-pushed the 09-14-change_our_python_connector_build_process_to_use_the_base_images branch from 41ce5f5 to b387477 Compare September 15, 2023 15:08
@alafanechere alafanechere force-pushed the augustin/declare-first-base-image branch from 4dfe568 to 3abf079 Compare September 17, 2023 15:01
@alafanechere alafanechere force-pushed the 09-14-change_our_python_connector_build_process_to_use_the_base_images branch from b387477 to 0113f6a Compare September 17, 2023 15:01
@octavia-squidington-iii octavia-squidington-iii removed the area/connectors Connector related issues label Sep 17, 2023
@alafanechere alafanechere force-pushed the augustin/declare-first-base-image branch from 3abf079 to 31afb94 Compare September 18, 2023 10:39
@alafanechere alafanechere force-pushed the 09-14-change_our_python_connector_build_process_to_use_the_base_images branch from 157ca30 to 894e0b9 Compare September 18, 2023 10:39
@alafanechere alafanechere changed the title change our python connector build process to use the base images [airbyte-ci] build python connectors from base images Sep 18, 2023
@alafanechere alafanechere force-pushed the augustin/declare-first-base-image branch from 31afb94 to de3eeb1 Compare September 18, 2023 14:16
@alafanechere alafanechere removed request for a team October 10, 2023 12:51
@airbyte-oss-build-runner
Copy link
Collaborator

source-auth0 test report (commit 28dc026757) - ✅

⏲️ Total pipeline duration: 01mn47s

Step Result
Connector package install
Build source-auth0 docker image for platform(s) linux/x86_64
Acceptance tests
Code format checks
Validate metadata for source-auth0
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=source-auth0 test

@alafanechere
Copy link
Contributor Author

@alafanechere
Copy link
Contributor Author

@bnchrch and @pedroslopez I reverted the changes for source-file-(secure). Why:

  • Changes on the source-file-secure setup.py require a version bump
  • The source-file-secure version must match the source-file version
  • source-file test are broken (currently under fix in 🐛 source-file: fix integration tests #31152 )

I suggest to fix and bump both of these connector (and 🪓 the source-file Dockerfile) in a separate PR (I'll take car of it). This leads to a temporary code freeze on source-file.

@airbyte-oss-build-runner
Copy link
Collaborator

source-auth0 test report (commit 637103fc7b) - ✅

⏲️ Total pipeline duration: 48.24s

Step Result
Connector package install
Build source-auth0 docker image for platform(s) linux/x86_64
Acceptance tests
Code format checks
Validate metadata for source-auth0
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=source-auth0 test

…the_base_images' of github.com:airbytehq/airbyte into 09-14-change_our_python_connector_build_process_to_use_the_base_images
@airbyte-oss-build-runner
Copy link
Collaborator

source-auth0 test report (commit 9e0793412e) - ✅

⏲️ Total pipeline duration: 01mn02s

Step Result
Connector package install
Build source-auth0 docker image for platform(s) linux/x86_64
Acceptance tests
Code format checks
Validate metadata for source-auth0
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=source-auth0 test

@airbyte-oss-build-runner
Copy link
Collaborator

source-auth0 test report (commit 5e1cacba6a) - ✅

⏲️ Total pipeline duration: 01mn51s

Step Result
Connector package install
Build source-auth0 docker image for platform(s) linux/x86_64
Acceptance tests
Code format checks
Validate metadata for source-auth0
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=source-auth0 test

Copy link
Contributor

@bnchrch bnchrch left a comment

Choose a reason for hiding this comment

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

This is the most beautiful PR I have ever seen 😍

lets merge it.

@alafanechere alafanechere merged commit 5935a38 into master Oct 10, 2023
25 checks passed
@alafanechere alafanechere deleted the 09-14-change_our_python_connector_build_process_to_use_the_base_images branch October 10, 2023 17:16
edgao pushed a commit that referenced this pull request Oct 11, 2023
Co-authored-by: Ben Church <ben@airbyte.io>
Co-authored-by: bnchrch <bnchrch@users.noreply.github.com>
Co-authored-by: alafanechere <alafanechere@users.noreply.github.com>
ariesgun pushed a commit to ariesgun/airbyte that referenced this pull request Oct 20, 2023
Co-authored-by: Ben Church <ben@airbyte.io>
Co-authored-by: bnchrch <bnchrch@users.noreply.github.com>
Co-authored-by: alafanechere <alafanechere@users.noreply.github.com>
ariesgun pushed a commit to ariesgun/airbyte that referenced this pull request Oct 23, 2023
Co-authored-by: Ben Church <ben@airbyte.io>
Co-authored-by: bnchrch <bnchrch@users.noreply.github.com>
Co-authored-by: alafanechere <alafanechere@users.noreply.github.com>
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.

Build two Python connectors using the first base image version
5 participants