-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
ci_connector_ops: POC of CI connector pipelines in python #23487
Conversation
Affected Connector ReportThe latest commit has removed all connector-related changes. There are no more dependent connectors for this PR. |
7d7e48b
to
593a81b
Compare
593a81b
to
e388dbf
Compare
@@ -44,37 +44,38 @@ def output_folder(self) -> Path: | |||
def input_folder(self) -> Path: | |||
return self._volume_base / f"run_{self._runs}" / "input" | |||
|
|||
def _prepare_volumes(self, config: Optional[Mapping], state: Optional[Mapping], catalog: Optional[ConfiguredAirbyteCatalog]): | |||
def _prepare_image(self, config: Optional[Mapping], state: Optional[Mapping], catalog: Optional[ConfiguredAirbyteCatalog]): |
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.
This is a patch whose reason is detailed here and that I'd prefer to avoid.
@@ -42,7 +42,7 @@ extend-ignore = [ | |||
[tool.isort] | |||
profile = "black" | |||
color_output = false | |||
skip_gitignore = true | |||
# skip_gitignore = true |
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.
This is to allow black to run in a non-git context.
tools/ci_connector_ops/ci_connector_ops/pipelines/actions/builds.py
Outdated
Show resolved
Hide resolved
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.
Very cool POC!
### Install | ||
```bash | ||
cd tools/ci_connector_ops | ||
python -m venv .venv (please use Python 3.10) |
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.
How do we enforce or change our python version?
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.
The package declares that it requires Python 3.10 here:
airbyte/tools/ci_connector_ops/setup.py
Line 51 in 1c49dc7
python_requires=">=3.10", |
I'm using pyenv to switch my python version to 3.10 when I'm working on this project. Our developers should have pyenv installed as I think it's part of our core python development tooling.
This file says to pyenv to switch to 3.10 when you're working on this code directory:
3.10.0 |
tools/ci_connector_ops/ci_connector_ops/pipelines/actions/builds.py
Outdated
Show resolved
Hide resolved
tools/ci_connector_ops/ci_connector_ops/pipelines/connectors_ci.py
Outdated
Show resolved
Hide resolved
tools/ci_connector_ops/ci_connector_ops/pipelines/connectors_ci.py
Outdated
Show resolved
Hide resolved
...grations/bases/connector-acceptance-test/connector_acceptance_test/utils/connector_runner.py
Outdated
Show resolved
Hide resolved
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.
Nice work 👍 🙂
I didn't review everything because I need to stop for now and don't want to leave it pending.
tools/ci_connector_ops/ci_connector_ops/pipelines/actions/tests.py
Outdated
Show resolved
Hide resolved
tools/ci_connector_ops/ci_connector_ops/pipelines/connectors_ci.py
Outdated
Show resolved
Hide resolved
tools/ci_connector_ops/ci_connector_ops/pipelines/connectors_ci.py
Outdated
Show resolved
Hide resolved
tools/ci_connector_ops/ci_connector_ops/pipelines/connectors_ci.py
Outdated
Show resolved
Hide resolved
tools/ci_connector_ops/ci_connector_ops/pipelines/actions/builds.py
Outdated
Show resolved
Hide resolved
tools/ci_connector_ops/ci_connector_ops/pipelines/connectors_ci.py
Outdated
Show resolved
Hide resolved
tools/ci_connector_ops/ci_connector_ops/pipelines/actions/builds.py
Outdated
Show resolved
Hide resolved
Thank you so much @helderco for your review and suggestions!!! |
5329bd4
to
7e514e8
Compare
7e514e8
to
36e7508
Compare
c79568a
to
5e9d05e
Compare
5e9d05e
to
bcff84c
Compare
This reverts commit 7be6cce.
I'll merge now. There are still great improvements to make but I feel like they should be done incrementally. IMO the current state of this PR accomplished the goal of reimplementing airbyte-python.gradle and airbyte-connector-acceptance.gradle in Python with Dagger.
cc @evantahler @cpdeethree @bnchrch @jpadams @kpenfound |
@alafanechere the https://github.com/airbytehq/airbyte/actions/runs/4391568285 test is failing but says Am I right? or should I wait until it's fixed on your side? |
What
Closes #23504
This is an attempt at rewriting airbyte-python.gradle and airbyte-connector-acceptance-test.gradle in Python (with the use of Dagger).
The motivation behind this work can be found here
I apologize for the size of the PR but I'd like to use it as a common playground for Dagger team and us to iterate on best practices and optimization they could suggest.
How
pipelines
subpackage inci_connector_ops
connectors-ci
command that can run CI pipelines on one our multiple connectors and according to code change:connectors-ci test-connectors --name=source-pokeapi --name=source-openweather connectors-ci test-connectors --modified # Test only connectors modified in the current branch
Recommended reading order
All the other change (commits before 0431cf6) are made to improve/patch our existing tooling to work in a CI context with Dagger.
The target DAG
🚨 User Impact 🚨
Before assessing a user impact I'd like to first get my question to Dagger teams answered:
https://github.com/airbytehq/airbyte/blob/augustin/poc/ci-in-python/tools/ci_connector_ops/ci_connector_ops/pipelines/README.md