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

gradle: search for python3.11 binary for AL2023 support #31227

Merged
merged 6 commits into from
Oct 10, 2023

Conversation

postamar
Copy link
Contributor

@postamar postamar commented Oct 10, 2023

I broke airbyte-ci last week for all java connectors by making version 3.10+ a requirement for python in gradle. This PR fixes this by installing and using python3.11 in the amazoncorretto-based gradle containers. Under the hood, it's Amazon Linux 2023, which comes with python 3.9 by default.

@vercel
Copy link

vercel bot commented Oct 10, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
airbyte-docs ⬜️ Ignored (Inspect) Visit Preview Oct 10, 2023 7:47pm

@postamar postamar marked this pull request as ready for review October 10, 2023 19:04
@postamar
Copy link
Contributor Author

postamar commented Oct 10, 2023

Testing on source-mysql here: https://github.com/airbytehq/airbyte/actions/runs/6473740068

edit: it works

@postamar postamar requested a review from a team October 10, 2023 19:18
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.

Couple comments. Bordering on should address. But Im all for unblocking now and fixing up after

try {
if ("python3.11 --version".execute().waitFor() == 0) {
// python3.11 definitely exists at this point, use it instead of 'python3'.
pythonBinary "python3.11"
Copy link
Contributor

Choose a reason for hiding this comment

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

❓why cant we bind python to python3.11 at the container level?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -80,6 +80,15 @@ class AirbytePythonPlugin implements Plugin<Project> {
envPath = venvDirectoryName
minPythonVersion '3.10'

// Amazon Linux support.
Copy link
Contributor

Choose a reason for hiding this comment

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

📚 could use some elaboration on why we do this instead of just run python.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fair!

@@ -90,7 +90,7 @@ async def _run(self) -> StepResult:
"findutils", # gradle requires xargs, which is shipped in findutils.
"jq", # required by :airbyte-connector-test-harnesses:acceptance-test-harness to inspect docker images.
"npm", # required by :format.
"pip", # required by :format.
"python3.11-pip", # required by :format.
Copy link
Contributor

Choose a reason for hiding this comment

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

❗some tools (ci_credentials, pipelines) cant currently support python3.11, this wont be an issue here but is an edge case. is python 3.10 available instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For some reason that I don't understand, no. If it comes to that, it'll probably be simpler to change the base container to something other than amazoncorretto. I only picked it because openjdk was no longer maintained and amazoncorretto has LTS.

@postamar postamar merged commit ae2ca40 into master Oct 10, 2023
19 of 20 checks passed
@postamar postamar deleted the postamar/fix-check-python-in-airbyte-ci branch October 10, 2023 20:15
ariesgun pushed a commit to ariesgun/airbyte that referenced this pull request Oct 20, 2023
ariesgun pushed a commit to ariesgun/airbyte that referenced this pull request Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants