-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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: format improvements #32999
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
return await format_container.directory("/src").export(".") | ||
|
||
|
||
def mount_repo_for_formatting( |
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 was not called anywhere.
"pip install pipx", | ||
"pipx ensurepath", | ||
"pipx install poetry", | ||
"poetry install --no-root", |
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 should speed up the python formatting by caching the poetry install
which depends on a poetry.lock file which changes very little over time.
airbyte-ci/connectors/pipelines/pipelines/airbyte_ci/format/fix/commands.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.
Only major concern is around the mounting
airbyte-ci/connectors/pipelines/pipelines/airbyte_ci/format/actions.py
Outdated
Show resolved
Hide resolved
airbyte-ci/connectors/pipelines/pipelines/airbyte_ci/format/check/commands.py
Outdated
Show resolved
Hide resolved
airbyte-ci/connectors/pipelines/pipelines/airbyte_ci/format/containers.py
Outdated
Show resolved
Hide resolved
airbyte-ci/connectors/pipelines/pipelines/airbyte_ci/format/containers.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.
Requesting change as I think:
return await format_container.directory("/airbyte/repo").export(".")
is a typo, it should export /src
. I'll try to push a fix
airbyte-ci/connectors/pipelines/pipelines/airbyte_ci/format/check/commands.py
Outdated
Show resolved
Hide resolved
airbyte-ci/connectors/pipelines/pipelines/airbyte_ci/format/containers.py
Show resolved
Hide resolved
airbyte-ci/connectors/pipelines/pipelines/airbyte_ci/format/containers.py
Outdated
Show resolved
Hide resolved
airbyte-ci/connectors/pipelines/pipelines/airbyte_ci/format/actions.py
Outdated
Show resolved
Hide resolved
airbyte-ci/connectors/pipelines/pipelines/airbyte_ci/format/containers.py
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.
This is great!
Using maven instead of gradle allows us to not suffer from the overhead of starting and configuring gradle + messing up with its cache.
I pushed the small fix in term of consistency of repo mount path.
I checked the check all
performances after modifying a python and a java file:
Runs in 30 seconds 👍.
(The first time you run airbyte-ci format check all
is definitely longer as we're pulling images from remote registries and install deps: I confirm all this is cached in subsequent runs.)
…ntainers.py Co-authored-by: Ella Rohm-Ensing <erohmensing@gmail.com>
Co-authored-by: Ella Rohm-Ensing <erohmensing@gmail.com>
Alright, this should be good to go. |
Notice that the autoformat is failing, but that's expected, as I removed the |
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.
Looks great!
airbyte-ci/connectors/pipelines/pipelines/airbyte_ci/format/containers.py
Show resolved
Hide resolved
airbyte-ci/connectors/pipelines/pipelines/airbyte_ci/format/containers.py
Show resolved
Hide resolved
Co-authored-by: Ella Rohm-Ensing <erohmensing@gmail.com>
Thanks for the reviews! I'll merge shortly. |
This reverts commit 22e1bbd.
I've reverted 22e1bbd and will put it in a separate follow-up PR to not force-merge this one. |
This PR removes the dependency on gradle for airbyte-ci's format command. This PR also improves the performance of the python formatting.