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

Python version upgraded from 3.8 to 3.12 #4106

Closed
wants to merge 62 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
c450447
Python version upgraded from 3.8 to 3.11
gauravmishrack Oct 9, 2024
66a6321
Python version changes done in build_docker_images.yml file
gauravmishrack Oct 9, 2024
ebe4658
Testng 3.8 version test results
gauravmishrack Oct 9, 2024
730ce90
Testing 3.8 tests results
gauravmishrack Oct 15, 2024
d777c07
python 3.11 testing
gauravmishrack Oct 15, 2024
3aff35b
Final Commit for python upgrade
gauravmishrack Oct 17, 2024
9c19e5a
requirements.txt updated for testing
gauravmishrack Oct 21, 2024
ae384de
bullseye to bookworm python update
gauravmishrack Oct 21, 2024
ec44e25
service bus version update
gauravmishrack Oct 21, 2024
ffef58c
rolledback requirement.txt file
gauravmishrack Oct 21, 2024
f892564
resource procesor change
Oct 22, 2024
50e7d70
Bookworm to Bullseye Changes
Oct 22, 2024
6c9e93b
3.12 version upgrade for python
Oct 22, 2024
b50090e
airlockfiles changes
Oct 22, 2024
72a52e8
mlflow changes
Oct 22, 2024
9388e3e
remove stuff
tp-allen Nov 5, 2024
a66f7dc
add in 'the'
tp-allen Nov 5, 2024
25b5422
update
tp-allen Nov 5, 2024
90257f6
Merge branch 'main' into python3.8-Gaurav
tim-allen-ck Nov 5, 2024
8c0ea44
update requirements
tp-allen Nov 5, 2024
ad445e8
updaet
tp-allen Nov 5, 2024
ccfb11d
update
tp-allen Nov 5, 2024
62b0d4b
Merge branch 'main' into python3.8-Gaurav
tim-allen-ck Nov 5, 2024
fadd855
update
tp-allen Nov 5, 2024
0b143cd
update pytest versions
tp-allen Nov 5, 2024
5ca4af3
update starlette
tp-allen Nov 5, 2024
679c468
update
tp-allen Nov 5, 2024
fb7c31e
update mlflow
tp-allen Nov 5, 2024
9972ef7
update
tp-allen Nov 6, 2024
97aa8c0
Merge branch 'main' into python3.8-Gaurav
tim-allen-ck Nov 6, 2024
543110f
update vmss_porter
tp-allen Nov 6, 2024
f8aeaa0
update
tp-allen Nov 6, 2024
74b30ce
Merge branch 'main' into python3.8-Gaurav
tim-allen-ck Nov 7, 2024
ca179c0
update core version
tp-allen Nov 7, 2024
4f4786f
Merge branch 'main' into python3.8-Gaurav
tim-allen-ck Nov 8, 2024
a8e7452
python updates
tp-allen Nov 8, 2024
e6f7063
Merge branch 'main' into python3.8-Gaurav
tim-allen-ck Nov 8, 2024
3ce4e29
update StrEnum
tp-allen Nov 11, 2024
dc5c6d3
Merge branch 'main' into python3.8-Gaurav
tim-allen-ck Nov 11, 2024
7dd21e4
fix api messages
tp-allen Nov 12, 2024
19960ae
Merge branch 'main' into python3.8-Gaurav
tim-allen-ck Nov 12, 2024
e36ca15
add in user, edit output.sh, revert schema_extra
tp-allen Nov 13, 2024
809deb3
Merge branch 'main' into python3.8-Gaurav
tim-allen-ck Nov 13, 2024
85a2927
Merge branch 'main' into python3.8-Gaurav
tim-allen-ck Nov 20, 2024
933b3fd
Merge branch 'main' into python3.8-Gaurav
tim-allen-ck Nov 26, 2024
71d05f5
updates
tp-allen Nov 28, 2024
87dad1f
update oydantic version
tp-allen Nov 29, 2024
73662fe
Merge branch 'main' into python3.8-Gaurav
tim-allen-ck Nov 29, 2024
d05ffb5
update
tp-allen Nov 29, 2024
c27ba61
Merge branch 'main' into python3.8-Gaurav
tim-allen-ck Nov 29, 2024
4ee2bdb
update
tp-allen Dec 2, 2024
d99e195
update
tp-allen Dec 2, 2024
2661fd3
Merge branch 'main' into python3.8-Gaurav
tim-allen-ck Dec 2, 2024
aaf9408
linting
tp-allen Dec 2, 2024
178010f
update
tp-allen Dec 2, 2024
b7323ea
update changelog
tp-allen Dec 2, 2024
dd77986
remove pydantic chnages
tp-allen Dec 2, 2024
56d66d8
update
tp-allen Dec 2, 2024
5d9c549
update
tp-allen Dec 2, 2024
08d5619
Merge branch 'main' into python3.8-Gaurav
tim-allen-ck Dec 4, 2024
6d581be
update cli dependencies
tp-allen Dec 4, 2024
084af4e
update version
tp-allen Dec 4, 2024
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
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.166.1/containers/python-3/.devcontainer/base.Dockerfile

# [Choice] Python version: 3, 3.9, 3.8, 3.7, 3.6
ARG VARIANT="3.8"
ARG VARIANT="3.12"
ARG TARGETPLATFORM="linux/amd64"
FROM --platform="${TARGETPLATFORM}" mcr.microsoft.com/vscode/devcontainers/python:dev-${VARIANT}-bullseye

Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

**BREAKING CHANGES & MIGRATIONS**:
* InnerEye and MLFlow bundles depreciated and removed from main. If you wish to update and deploy these worksapce services they can be retrieved from release 0.19.1. ([#4127](https://github.com/microsoft/AzureTRE/issues/4127))
* Upgrade Python version from 3.8 to 3.12 ([#3949](https://github.com/microsoft/AzureTRE/issues/3949))

FEATURES:

Expand All @@ -17,9 +18,10 @@ ENHANCEMENTS:
* Update Guacamole version and dependencies ([#4140](https://github.com/microsoft/AzureTRE/issues/4140))
* Add partial (core resources only) support for customer managed keys ([#4141](https://github.com/microsoft/AzureTRE/issues/4142), [#4144](https://github.com/microsoft/AzureTRE/issues/4144))
* Update the Azure CLI version to 2.67.0 in dev container and vmss ([#4157](https://github.com/microsoft/AzureTRE/pull/4157))
* Upgrade Python version from 3.8 to 3.12 ([#3949](https://github.com/microsoft/AzureTRE/issues/3949))

BUG FIXES:
- Update KeyVault references in API to use the version so Terraform cascades the update ([#4112](https://github.com/microsoft/AzureTRE/pull/4112))
* Update KeyVault references in API to use the version so Terraform cascades the update ([#4112](https://github.com/microsoft/AzureTRE/pull/4112))

COMPONENTS:

Expand Down
2 changes: 1 addition & 1 deletion airlock_processor/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# To enable ssh & remote debugging on app service change the base image to the one below
# FROM mcr.microsoft.com/azure-functions/python:4-python3.8-appservice as base
FROM mcr.microsoft.com/azure-functions/python:4-python3.8-slim as base
FROM mcr.microsoft.com/azure-functions/python:4-python3.12 as base

COPY requirements.txt /
RUN pip install --no-cache-dir -r /requirements.txt
Expand Down
2 changes: 1 addition & 1 deletion airlock_processor/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.7.2"
__version__ = "0.8.0"
4 changes: 2 additions & 2 deletions airlock_processor/requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Dev requirements
pytest==7.2.0
mock==5.0.0
pytest==8.3.3
mock==5.1.0
13 changes: 7 additions & 6 deletions airlock_processor/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Do not include azure-functions-worker as it may conflict with the Azure Functions platform
azure-core==1.30.0
azure-core==1.31.0
azure-functions==1.17.0
azure-storage-blob==12.19.0
azure-identity==1.16.1
azure-mgmt-storage==21.1.0
azure-mgmt-resource==23.0.1
pydantic==1.10.13
azure-storage-blob==12.23.1
azure-identity==1.19.0
azure-mgmt-storage==21.2.1
azure-mgmt-resource==23.2.0
pydantic==1.10.19
setuptools==75.3.0
8 changes: 4 additions & 4 deletions api_app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
FROM python:3.8-slim-bullseye as base
FROM python:3.12-slim-bullseye AS base
COPY requirements.txt /.
RUN pip3 install --no-cache-dir -r requirements.txt

FROM base as test
FROM base AS test
COPY requirements-dev.txt /.
RUN pip3 install --no-cache-dir -r requirements-dev.txt
COPY . /api
WORKDIR /api
RUN ./run_tests_and_exit_succesfully.sh


FROM scratch as test-results
FROM scratch AS test-results
COPY --from=test /test-results/* /.


FROM base as runtime
FROM base AS runtime
COPY . /api
WORKDIR /api
RUN groupadd -r api && useradd -r -s /bin/false -g api api_user
Expand Down
2 changes: 1 addition & 1 deletion api_app/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.19.3"
__version__ = "0.20.2"
3 changes: 1 addition & 2 deletions api_app/models/domain/airlock_operations.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
from pydantic import Field
from pydantic.types import UUID4
from pydantic.schema import Optional
from models.domain.azuretremodel import AzureTREModel
from typing import List
from typing import List, Optional
from models.domain.airlock_request import AirlockFile


Expand Down
13 changes: 6 additions & 7 deletions api_app/models/domain/airlock_request.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
from enum import Enum
from typing import List, Dict
from enum import StrEnum
from typing import List, Dict, Optional

from models.domain.azuretremodel import AzureTREModel
from pydantic import Field, validator
from pydantic.schema import Optional
from resources import strings


class AirlockRequestStatus(str, Enum):
class AirlockRequestStatus(StrEnum):
"""
Airlock Resource status
"""
Expand All @@ -25,12 +24,12 @@ class AirlockRequestStatus(str, Enum):
Failed = strings.AIRLOCK_RESOURCE_STATUS_FAILED


class AirlockRequestType(str, Enum):
class AirlockRequestType(StrEnum):
Import = strings.AIRLOCK_REQUEST_TYPE_IMPORT
Export = strings.AIRLOCK_REQUEST_TYPE_EXPORT


class AirlockActions(str, Enum):
class AirlockActions(StrEnum):
Review = strings.AIRLOCK_ACTION_REVIEW
Cancel = strings.AIRLOCK_ACTION_CANCEL
Submit = strings.AIRLOCK_ACTION_SUBMIT
Expand All @@ -41,7 +40,7 @@ class AirlockFile(AzureTREModel):
size: float = Field(title="size", description="size of the file in bytes")


class AirlockReviewDecision(str, Enum):
class AirlockReviewDecision(StrEnum):
Approved = strings.AIRLOCK_REVIEW_DECISION_APPROVED
Rejected = strings.AIRLOCK_REVIEW_DECISION_REJECTED

Expand Down
6 changes: 3 additions & 3 deletions api_app/models/domain/costs.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
from datetime import datetime, timedelta, date
from typing import List, Optional
from pydantic import BaseModel
from enum import Enum
from enum import StrEnum
import random
import uuid


class GranularityEnum(str, Enum):
class GranularityEnum(StrEnum):
daily = "Daily"
none = "None"


class CurrencyEnum(str, Enum):
class CurrencyEnum(StrEnum):
USD = "USD"
ILS = "ILS"

Expand Down
4 changes: 2 additions & 2 deletions api_app/models/domain/operation.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from enum import Enum
from enum import StrEnum
from typing import List, Optional

from pydantic import Field
Expand All @@ -9,7 +9,7 @@
from resources import strings


class Status(str, Enum):
class Status(StrEnum):
"""
Operation status
"""
Expand Down
4 changes: 2 additions & 2 deletions api_app/models/domain/request_action.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from enum import Enum
from enum import StrEnum


class RequestAction(str, Enum):
class RequestAction(StrEnum):
Install = "install"
UnInstall = "uninstall"
Upgrade = "upgrade"
4 changes: 2 additions & 2 deletions api_app/models/domain/resource.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from enum import Enum
from enum import StrEnum
from typing import Optional, Union, List
from pydantic import BaseModel, Field, validator
from models.domain.azuretremodel import AzureTREModel
from models.domain.request_action import RequestAction
from resources import strings


class ResourceType(str, Enum):
class ResourceType(StrEnum):
"""
Type of resource to deploy
"""
Expand Down
2 changes: 1 addition & 1 deletion api_app/models/domain/shared_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ class SharedService(Resource):
"""
Shared service request
"""
resourceType = ResourceType.SharedService
resourceType: ResourceType = ResourceType.SharedService
2 changes: 1 addition & 1 deletion api_app/models/domain/user_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ class UserResource(Resource):
ownerId: str = Field("", title="Owner of the user resource")
parentWorkspaceServiceId: str = Field("", title="Parent Workspace Service ID", description="Service target Workspace Service id")
azureStatus: dict = Field({}, title="Azure Status", description="Azure status, varies per user resource")
resourceType = ResourceType.UserResource
resourceType: ResourceType = ResourceType.UserResource
2 changes: 1 addition & 1 deletion api_app/models/domain/user_resource_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@

class UserResourceTemplate(ResourceTemplate):
parentWorkspaceService: str = Field("", title="Parent Workspace Service", description="The parent workspace service under which services with this template can be created")
resourceType = ResourceType.UserResource
resourceType: ResourceType = ResourceType.UserResource
2 changes: 1 addition & 1 deletion api_app/models/domain/workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Workspace(Resource):
Workspace request
"""
workspaceURL: str = Field("", title="Workspace URL", description="Main endpoint for workspace users")
resourceType = ResourceType.Workspace
resourceType: ResourceType = ResourceType.Workspace


class WorkspaceAuth(AzureTREModel):
Expand Down
2 changes: 1 addition & 1 deletion api_app/models/domain/workspace_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ class WorkspaceService(Resource):
Workspace service request
"""
workspaceId: str = Field("", title="Workspace ID", description="Service target Workspace id")
resourceType = ResourceType.WorkspaceService
resourceType: ResourceType = ResourceType.WorkspaceService
4 changes: 2 additions & 2 deletions api_app/models/schemas/status.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from enum import Enum
from enum import StrEnum
from typing import List

from pydantic import BaseModel

from resources import strings


class StatusEnum(str, Enum):
class StatusEnum(StrEnum):
ok = strings.OK
not_ok = strings.NOT_OK

Expand Down
4 changes: 2 additions & 2 deletions api_app/models/schemas/workspace.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from enum import Enum
from enum import StrEnum
from typing import List

from pydantic import BaseModel, Field
Expand All @@ -23,7 +23,7 @@ def get_sample_workspace(workspace_id: str, spec_workspace_id: str = "0001") ->
}


class AuthProvider(str, Enum):
class AuthProvider(StrEnum):
"""
Auth Provider
"""
Expand Down
4 changes: 2 additions & 2 deletions api_app/requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Dev requirements
pytest-asyncio==0.21.1
pytest-asyncio==0.24.0
httpx==0.25.0
mock==5.1.0
pytest==7.4.3
pytest==8.3.3
45 changes: 23 additions & 22 deletions api_app/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
aiohttp==3.9.4
azure-core==1.30.0
azure-cosmos==4.5.1
azure-eventgrid==4.15.0
azure-identity==1.16.1
azure-mgmt-compute==30.3.0
azure-mgmt-cosmosdb==9.3.0
aiohttp==3.10.10
azure-core==1.31.0
azure-cosmos==4.7.0
azure-eventgrid==4.20.0
azure-identity==1.19.0
azure-mgmt-compute==33.0.0
azure-mgmt-cosmosdb==9.6.0
azure-mgmt-costmanagement==4.0.1
azure-mgmt-resource==23.0.1
azure-mgmt-storage==21.1.0
azure-monitor-opentelemetry~=1.6
azure-servicebus==7.11.3
azure-storage-blob==12.19.0
fastapi==0.110.0
fastapi-utils==0.2.1
gunicorn==22.0.0
azure-mgmt-resource==23.2.0
azure-mgmt-storage==21.2.1
azure-monitor-opentelemetry==1.6.4
azure-servicebus==7.12.3
azure-storage-blob==12.23.1
fastapi==0.115.3
gunicorn==23.0.0
jsonschema[format_nongpl]==4.19.1
msal==1.26.0
opentelemetry.instrumentation.logging>=0.44b0
pandas==2.0.3
PyJWT==2.8.0
pytz==2022.7
python-dateutil==2.8.2
msal==1.31.0
opentelemetry-instrumentation-logging==0.49b2
pandas==2.2.2
PyJWT==2.9.0
pytz==2024.2
python-dateutil==2.9.0
semantic-version==2.10.0
uvicorn[standard]==0.23.2
setuptools==75.3.0
uvicorn[standard]==0.31.0
pydantic==1.10.19
12 changes: 6 additions & 6 deletions cli/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# if you update this file, update the install_requires in setup.py as well
click==8.1.3
httpx~=0.23.0
msal==1.26.0
httpx==0.25.0
msal==1.31.0
jmespath==1.0.1
tabulate==0.9.0
pygments==2.16.1
PyJWT==2.8.0
azure-cli-core==2.57.0
azure-identity==1.16.1
aiohttp==3.9.4
PyJWT==2.9.0
azure-cli-core==2.65.0
azure-identity==1.19.0
aiohttp==3.10.10
10 changes: 5 additions & 5 deletions cli/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from setuptools import setup

PROJECT = 'azure-tre-cli'
VERSION = '0.2.3'
VERSION = '0.2.4'

try:
long_description = open('README.md', 'rt').read()
Expand Down Expand Up @@ -46,10 +46,10 @@
"jmespath==1.0.1",
"tabulate==0.9.0",
"pygments==2.16.1",
"PyJWT==2.8.0",
"azure-cli-core==2.57.0",
"azure-identity==1.14.1",
"aiohttp==3.9.4"
"PyJWT==2.9.0",
"azure-cli-core==2.65.0",
"azure-identity==1.19.0",
"aiohttp==3.10.10"
],

namespace_packages=[],
Expand Down
2 changes: 1 addition & 1 deletion core/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.11.5"
__version__ = "0.11.6"
6 changes: 3 additions & 3 deletions e2e_tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# API
httpx==0.25.0
pytest==7.4.3
pytest-asyncio==0.21.1
starlette==0.36.3
pytest==8.3.3
pytest-asyncio==0.24.0
starlette==0.41.2
pytest-timeout==2.2.0
pytest-xdist==3.3.1
backoff==2.2.1
2 changes: 1 addition & 1 deletion resource_processor/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.9.4"
__version__ = "0.10.0"
Loading
Loading