-
Notifications
You must be signed in to change notification settings - Fork 216
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
Upgrade from python3.8
to python3.10
#5311
Changes from all commits
d228f34
9724cf2
a57d335
3505591
94c283a
2352527
46dc9d2
99faa76
a468ed3
9d0b034
8668e5a
f4c1374
9f054d0
cf3596a
6f861e1
5ea9c28
b26219e
ac40551
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ jobs: | |
Codeql.SkipTaskAutoInjection: true | ||
skipComponentGovernanceDetection: true | ||
pool: | ||
vmImage: ubuntu-20.04 | ||
vmImage: ubuntu-22.04 | ||
steps: | ||
- checkout: none | ||
|
||
|
@@ -26,7 +26,7 @@ jobs: | |
skipComponentGovernanceDetection: true | ||
sshKey: $[ dependencies.generate_ssh_key.outputs['generate_ssh_key.sshKey'] ] | ||
pool: | ||
vmImage: ubuntu-20.04 | ||
vmImage: ubuntu-22.04 | ||
steps: | ||
- script: | | ||
env | ||
|
@@ -65,10 +65,10 @@ jobs: | |
|
||
- script: | | ||
set -ex | ||
python3.8 -m venv ./scripts/azure_deployment/.env | ||
python3.10 -m venv ./scripts/azure_deployment/.env | ||
source ./scripts/azure_deployment/.env/bin/activate | ||
pip install -r ./scripts/azure_deployment/requirements.txt | ||
python3.8 scripts/azure_deployment/arm_template.py deploy aci \ | ||
python3.10 scripts/azure_deployment/arm_template.py deploy aci \ | ||
--subscription-id $(CCF_AZURE_SUBSCRIPTION_ID) \ | ||
--resource-group ccf-aci \ | ||
--region northeurope \ | ||
|
@@ -91,7 +91,7 @@ jobs: | |
- job: deploy_secondary_aci | ||
displayName: "Deploy Secondary ACI" | ||
pool: | ||
vmImage: ubuntu-20.04 | ||
vmImage: ubuntu-22.04 | ||
dependsOn: | ||
- generate_ssh_key | ||
variables: | ||
|
@@ -132,10 +132,10 @@ jobs: | |
|
||
- script: | | ||
set -ex | ||
python3.8 -m venv ./scripts/azure_deployment/.env | ||
python3.10 -m venv ./scripts/azure_deployment/.env | ||
source ./scripts/azure_deployment/.env/bin/activate | ||
pip install -r ./scripts/azure_deployment/requirements.txt | ||
python3.8 scripts/azure_deployment/arm_template.py deploy aci \ | ||
python3.10 scripts/azure_deployment/arm_template.py deploy aci \ | ||
--subscription-id $(CCF_AZURE_SUBSCRIPTION_ID) \ | ||
--resource-group ccf-aci \ | ||
--region northeurope \ | ||
|
@@ -185,7 +185,7 @@ jobs: | |
- job: cleanup_aci | ||
displayName: "Cleanup ACI" | ||
pool: | ||
vmImage: ubuntu-20.04 | ||
vmImage: ubuntu-22.04 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is also updating some of the dependencies to 22.04, which feels like a bigger change than Python 3.10. Can we describe that in the PR title, and changelog if necessary? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should have only been done on CI jobs that used Python (3.8 but now 3.10) but do not make use of any of our containers. In other words, it's not a user-facing change, but simply for us to use 22.04 for a few CI agents. I'll reflect that in the PR description. |
||
dependsOn: | ||
- generate_ssh_key | ||
- deploy_primary_aci | ||
|
@@ -219,10 +219,10 @@ jobs: | |
|
||
- script: | | ||
set -ex | ||
python3.8 -m venv ./scripts/azure_deployment/.env | ||
python3.10 -m venv ./scripts/azure_deployment/.env | ||
source ./scripts/azure_deployment/.env/bin/activate | ||
pip install -r ./scripts/azure_deployment/requirements.txt | ||
python3.8 scripts/azure_deployment/arm_template.py remove aci \ | ||
python3.10 scripts/azure_deployment/arm_template.py remove aci \ | ||
--subscription-id $(CCF_AZURE_SUBSCRIPTION_ID) \ | ||
--resource-group ccf-aci \ | ||
--aci-type dynamic-agent \ | ||
|
@@ -234,7 +234,7 @@ jobs: | |
- script: | | ||
source ./scripts/azure_deployment/.env/bin/activate | ||
if [[ ${{ parameters.secondaries.count }} != 0 ]]; then | ||
python3.8 scripts/azure_deployment/arm_template.py remove aci \ | ||
python3.10 scripts/azure_deployment/arm_template.py remove aci \ | ||
--subscription-id $(CCF_AZURE_SUBSCRIPTION_ID) \ | ||
--resource-group ccf-aci \ | ||
--aci-type dynamic-agent \ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
- name: Add Python repository | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am confused by this, doesn't 22.04 ship with 3.10? If so, why do we need the ppa? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This PR doesn't update the base container image to 22.04, and only updates Python to 3.10. Updating our container images to 22.04 will be a bigger change (in a separate PR) which cannot be completed just yet because of the lack of Open Enclave packages on 22.04. |
||
apt_repository: | ||
repo: "ppa:deadsnakes/ppa" | ||
state: present | ||
update_cache: yes | ||
become: yes | ||
|
||
- name: Include vars for Clang | ||
include_vars: "clang{{ clang_version }}.yml" | ||
|
||
|
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.
I think we ought to switch to calling
python3
everywhere, and communicate the version requirement through https://packaging.python.org/en/latest/guides/distributing-packages-using-setuptools/#python-requiresWherever we can, using a shebang line or setuptools entry points would be nicer too, to avoid having to specify which python, now that 2.x is thoroughly obsolete.