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

[KF-5958] Upgrade to Python3.10+ #1152

Merged
merged 2 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 3 additions & 19 deletions .github/workflows/deploy-to-aks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,13 @@ on:
- cron: "17 0 * * 2"
jobs:
preprocess-input:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
outputs:
processed_bundle_versions: ${{ steps.process_bundle_versions.outputs.bundle_versions }}
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install CLI tools
run: |
sudo snap install yq
Expand All @@ -47,14 +42,13 @@ jobs:

deploy-ckf-to-aks:
needs: preprocess-input
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
matrix:
bundle_version: ${{ fromJSON(needs.preprocess-input.outputs.processed_bundle_versions) }}
fail-fast: false
env:
AZURE_CORE_OUTPUT: none
PYTHON_VERSION: "3.8"

steps:
- name: Checkout repository
Expand All @@ -74,19 +68,9 @@ jobs:
UATS_BRANCH=${{ inputs.uats_branch || env.UATS_BRANCH }}
echo "UATS_BRANCH=${UATS_BRANCH}" >> $GITHUB_ENV

# Remove once https://github.com/canonical/bundle-kubeflow/issues/761
# is resolved and applied to uats repository.
- name: Install python ${{ env.PYTHON_VERSION }}
run: |
sudo add-apt-repository ppa:deadsnakes/ppa -y
sudo apt update -y
sudo apt install python${{ env.PYTHON_VERSION }} python${{ env.PYTHON_VERSION }}-distutils python${{ env.PYTHON_VERSION }}-venv -y

- name: Install CLI tools
run: |
wget https://bootstrap.pypa.io/get-pip.py
python${{ env.PYTHON_VERSION }} get-pip.py
python${{ env.PYTHON_VERSION }} -m pip install tox
pip install tox
sudo snap install juju --classic --channel=${{ env.JUJU_VERSION }}/stable
sudo snap install charmcraft --classic
juju version
Expand Down
23 changes: 3 additions & 20 deletions .github/workflows/deploy-to-eks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,13 @@ on:
- cron: "23 0 * * 2"
jobs:
preprocess-input:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
outputs:
processed_bundle_versions: ${{ steps.process_bundle_versions.outputs.bundle_versions }}
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install CLI tools
run: |
sudo snap install yq
Expand All @@ -47,13 +42,11 @@ jobs:

deploy-ckf-to-eks:
needs: preprocess-input
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
matrix:
bundle_version: ${{ fromJSON(needs.preprocess-input.outputs.processed_bundle_versions) }}
fail-fast: false
env:
PYTHON_VERSION: "3.8"

steps:
- name: Checkout repository
Expand All @@ -73,19 +66,9 @@ jobs:
UATS_BRANCH=${{ inputs.uats_branch || env.UATS_BRANCH }}
echo "UATS_BRANCH=${UATS_BRANCH}" >> $GITHUB_ENV

# Remove once https://github.com/canonical/bundle-kubeflow/issues/761
# is resolved and applied to uats repository.
- name: Install python ${{ env.PYTHON_VERSION }}
run: |
sudo add-apt-repository ppa:deadsnakes/ppa -y
sudo apt update -y
sudo apt install python${{ env.PYTHON_VERSION }} python${{ env.PYTHON_VERSION }}-distutils python${{ env.PYTHON_VERSION }}-venv -y

- name: Install CLI tools
run: |
wget https://bootstrap.pypa.io/get-pip.py
python${{ env.PYTHON_VERSION }} get-pip.py
python${{ env.PYTHON_VERSION }} -m pip install tox
pip install tox
sudo snap install juju --channel=${{ env.JUJU_VERSION }}/stable
sudo snap install charmcraft --classic
juju version
Expand Down
26 changes: 0 additions & 26 deletions .github/workflows/full-bundle-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,34 +77,8 @@ jobs:
}
EOF

- name: Setup Python 3.8
run: |
echo "deb-src http://archive.ubuntu.com/ubuntu/ jammy main" | sudo tee -a /etc/apt/sources.list

sudo apt-get update -yqq
sudo apt-get build-dep -yqq python3
sudo apt-get install -yqq pkg-config

sudo apt-get install -yqq build-essential gdb lcov pkg-config \
libbz2-dev libffi-dev libgdbm-dev libgdbm-compat-dev liblzma-dev \
libncurses5-dev libreadline6-dev libsqlite3-dev libssl-dev \
lzma lzma-dev tk-dev uuid-dev zlib1g-dev

curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash

export PYENV_ROOT="$HOME/.pyenv"
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"

pyenv install 3.8.16
pyenv global 3.8.16

# configure environment variables to be available in subsequent steps
echo "PYENV_ROOT=$PYENV_ROOT" >> "$GITHUB_ENV"
echo "PATH=$PATH" >> "$GITHUB_ENV"

- name: Install tox
run: |
eval "$(pyenv init -)"
pip install tox

- name: Setup operator environment
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description = "charmed-kubeflow.io"
authors = [""]

[tool.poetry.dependencies]
python = "^3.6"
python = ">=3.10"
click = "^7"
pyyaml = "^5.3"

Expand Down