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

Add support for Python 3.12 #947

Conversation

daniel-zullo-frequenz
Copy link
Contributor

The CI now runs the tests against Python 3.12 as well.

The Dockerfile for arm64 was added to the repository to run the tests for python 3.12 in arm64.

@daniel-zullo-frequenz daniel-zullo-frequenz requested a review from a team as a code owner May 7, 2024 16:50
@github-actions github-actions bot added part:docs Affects the documentation part:tooling Affects the development tooling (CI, deployment, dependency management, etc.) labels May 7, 2024
@daniel-zullo-frequenz daniel-zullo-frequenz marked this pull request as draft May 7, 2024 16:51
@daniel-zullo-frequenz
Copy link
Contributor Author

Most of the changes in this draft need to be pushed in https://github.com/frequenz-floss/frequenz-repo-config-python instead, excepts for dependencies updates.

Copy link
Contributor

@llucax llucax left a comment

Choose a reason for hiding this comment

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

LGTM in general. I'm a bit concerned about having a CI that needs to do so much work, but that's a different topic (only made worse by adding more matrices jobs). At some point I think we should probably only make more intensive checks on pushing to the main branch or nightly.

@daniel-zullo-frequenz daniel-zullo-frequenz marked this pull request as ready for review May 16, 2024 11:59
@daniel-zullo-frequenz daniel-zullo-frequenz added the cmd:skip-release-notes It is not necessary to update release notes for this PR label May 17, 2024
@daniel-zullo-frequenz daniel-zullo-frequenz changed the title [WIP] Add support for Python 3.12 Add support for Python 3.12 May 17, 2024
@daniel-zullo-frequenz
Copy link
Contributor Author

Most of the changes in this draft need to be pushed in frequenz-floss/frequenz-repo-config-python instead, excepts for dependencies updates.

There is already a ticket for it frequenz-floss/frequenz-repo-config-python#168

.github/workflows/ci.yaml Outdated Show resolved Hide resolved
.github/workflows/ci.yaml Outdated Show resolved Hide resolved
@daniel-zullo-frequenz daniel-zullo-frequenz force-pushed the feature/support-python-3.12 branch 2 times, most recently from ff51f2f to 1932012 Compare May 21, 2024 11:00
The CI now runs the tests against Python 3.12 as well.

The Dockerfile for arm64 was added to the repository
to run the tests for python 3.12 in arm64.

Signed-off-by: Daniel Zullo <daniel.zullo@frequenz.com>
Newer versions of grpcio, grpcio-tools and numpy are required
to run pytest_min tests with Python 3.12.

Signed-off-by: Daniel Zullo <daniel.zullo@frequenz.com>
The test installation now includes Python 3.12.

Signed-off-by: Daniel Zullo <daniel.zullo@frequenz.com>
The added job runs if all the `test-installation` matrix jobs
ran and succeeded. The job is required to have a single job
that is used in branch protection rules so that updating the
protection rules is not needed each time we add or remove a job
from the matrix.

Signed-off-by: Daniel Zullo <daniel.zullo@frequenz.com>
The current condition for the `*-all` jobs in the CI were
not correct, as it was skipping the job if the matrix job
succeeded, which is not the desired behavior. We want to
skip the *-all job only if the matrix job was skipped.
The results for `*-all` jobs are now set based on the
matrix job results.

Signed-off-by: Daniel Zullo <daniel.zullo@frequenz.com>
The python version used in the test-installation Dockerfile
was hardcoded and we ended up with a couple of similar
Dockerfiles for different python versions.
Ideally we should keep a single Dockerfile to use
different python versions.

Signed-off-by: Daniel Zullo <daniel.zullo@frequenz.com>
llucax
llucax previously approved these changes May 22, 2024
@llucax llucax added this to the v1.0.0-rc700 milestone May 22, 2024
@daniel-zullo-frequenz daniel-zullo-frequenz added this pull request to the merge queue May 22, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 22, 2024
@@ -3,11 +3,13 @@
# This Dockerfile is used to run the tests in arm64, which is not supported by
# GitHub Actions at the moment.

ARG PYTHON_VERSION="3.11"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@llucax I made a mistake here defining this arg in the global scope and not consuming it within the FROM stage. I think I can define it directly within the local scope of the stage

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed, but it will need a new approval

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tested the arm64 docker file in my local environment with different python versiona and it works smoothly

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, good catch. Will approve.

The python version in the Dockerfile for the arm64 cross-arch
tests is now parameterized to pass the python version as an
argument so that only one Dockerfile is needed for all python
versions.

Signed-off-by: Daniel Zullo <daniel.zullo@frequenz.com>
@daniel-zullo-frequenz
Copy link
Contributor Author

Auto-merge is enabled. So please do not approve it if changes are required

@daniel-zullo-frequenz daniel-zullo-frequenz added this pull request to the merge queue May 22, 2024
Merged via the queue into frequenz-floss:v1.x.x with commit ca89486 May 22, 2024
18 checks passed
@daniel-zullo-frequenz daniel-zullo-frequenz deleted the feature/support-python-3.12 branch May 22, 2024 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmd:skip-release-notes It is not necessary to update release notes for this PR part:docs Affects the documentation part:tooling Affects the development tooling (CI, deployment, dependency management, etc.)
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants