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

#282: Updated python to Python3.10 #286

Merged
merged 14 commits into from
Jun 14, 2024
Merged
4 changes: 2 additions & 2 deletions doc/user_guide/vm-edition/qemu.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
### Overview

1. Open the `VMDK` image
2. Select Ubuntu 20.04 LTS as template
2. Select Ubuntu 22.04 LTS as template
3. [Configure RAM](../system-requirements.md)
4. Start the VM

Expand All @@ -15,7 +15,7 @@
4. Choose: "Create virtual machine from file"<br />
![image info](./img/tutorial-screenshot-create-img.png)
5. Select the downloaded "VMDK" file from step 1
6. Select "Ubuntu 20.04 LTS" as Template, and click "Next"
6. Select "Ubuntu 22.04 LTS" as Template, and click "Next"
![image info](./img/tutorial-screenshot-select-template.png)
7. Select memory size (see section Hardware Requirements), then click "Create"
![image info](./img/tutorial-screenshot-select-resources.png)
Expand Down
4 changes: 2 additions & 2 deletions exasol/ds/sandbox/lib/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

_default_config = {
"time_to_wait_for_polling": 10.0,
# Source AMI is set to Ubuntu 20.04. Owner id '099720109477' == 'Canonical'
# Source AMI is set to Ubuntu 22.04. Owner id '099720109477' == 'Canonical'
"source_ami_filters": {
"name": "ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-*",
"name": "ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-*",
"owner-id": "099720109477",
"architecture": "x86_64",
"state": "available"
Expand Down
2 changes: 1 addition & 1 deletion exasol/ds/sandbox/lib/dss_docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM ubuntu:20.04
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install --no-install-recommends --assume-yes python3 python3-pexpect
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---

apt_dependencies:
- sudo=1.8.31-1ubuntu1.5
- sudo=1.9.9-1ubuntu2.4
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---

apt_dependencies:
- apt-transport-https=2.0.10
- gpg-agent=2.2.19-3ubuntu2.2
- ca-certificates=20230311ubuntu0.20.04.1
- software-properties-common=0.99.9.12
- apt-transport-https=2.4.5
- gpg-agent=2.2.27-3ubuntu2.1
- ca-certificates=20230311ubuntu0.22.04.1
- software-properties-common=0.99.22.9
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ jupyterlab_notebook_folder_initial: "{{ user_home }}/notebooks"
jupyterlab_notebook_folder: "{{ user_home }}/notebooks"

apt_dependencies:
- virtualenv=20.0.17-1ubuntu0.4
- git=1:2.25.1-1ubuntu3.12
- virtualenv=20.13.0+ds-2
- git=1:2.34.1-1ubuntu1.11
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ jupysql==0.10.10
sqlalchemy_exasol==4.6.3
stopwatch.py==2.0.1
boto3==1.26.163
exasol-notebook-connector @ git+https://github.com/exasol/notebook-connector.git@main
exasol-notebook-connector @ git+https://github.com/exasol/notebook-connector.git@bug/tmp_fix_deps
tomuben marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
requirements: "{{ copy_req_file.dest }}"
state: latest
virtualenv: "{{jupyterlab_virtualenv}}"
virtualenv_python: python3.8
virtualenv_python: python3.10
become: "{{need_sudo}}"

- name: Remove requirements file {{ requirements_file }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
name: pip
state: latest
virtualenv: "{{jupyterlab_virtualenv}}"
virtualenv_python: python3.8
virtualenv_python: python3.10
extra_args: "--upgrade"
become: "{{need_sudo}}"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---

apt_dependencies:
- network-manager=1.22.10-1ubuntu2.4
- network-manager=1.36.4-2ubuntu1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---

apt_dependencies:
- rsync=3.1.3-8ubuntu0.7
- rsync=3.2.7-0ubuntu0.22.04.2
1,024 changes: 499 additions & 525 deletions poetry.lock

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ localstack = "^3.1.0"
# see https://github.com/docker/docker-py/issues/3223
docker = {version = "^6.1.3", markers = "sys_platform != 'win32'"}
fabric = "^2.7.1"
requests = "<2.32.0"


[tool.pytest.ini_options]
minversion = "6.0"
Expand Down
11 changes: 7 additions & 4 deletions test/integration/test_create_dss_docker_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@

DOCKER_SOCKET_HOST = "/var/run/docker.sock"

JUPYTER_USER = "jupyter"

_logger = logging.getLogger(__name__)


Expand Down Expand Up @@ -77,7 +79,7 @@ def context(docker_socket_host: Path):

@pytest.fixture
def ubuntu_container_context(request, docker_auth):
spec = DockerImageSpec("ubuntu", "20.04")
spec = DockerImageSpec("ubuntu", "22.04")
pull_docker_image(spec, docker_auth)
def context(path_on_host: Path, path_in_container: str):
return container_context(
Expand Down Expand Up @@ -126,7 +128,7 @@ def request_with_retry(url: str) -> requests.Response:
def test_import_notebook_connector(dss_docker_container):
command = ('/home/jupyter/jupyterenv/bin/python'
' -c "import exasol.nb_connector.secret_store"')
assert_exec_run(dss_docker_container, command)
assert_exec_run(dss_docker_container, command, user=JUPYTER_USER)


def test_install_notebooks(dss_docker_container):
Expand All @@ -137,6 +139,7 @@ def filename_set(string: str) -> Set[str]:
output = assert_exec_run(
dss_docker_container,
"ls --indicator-style=slash /home/jupyter/notebooks",
user=JUPYTER_USER,
)

actual = filename_set(output)
Expand All @@ -153,7 +156,7 @@ def test_docker_socket_access(dss_docker_container):
wait_for_socket_access(dss_docker_container)
output = assert_exec_run(
dss_docker_container,
"docker ps", user="jupyter")
"docker ps", user=JUPYTER_USER)
assert re.match(r"^CONTAINER ID +IMAGE .*", output)


Expand Down Expand Up @@ -298,6 +301,6 @@ def user_and_group(ls_line: str) -> str:
) as container:
testees = [tmp_path, child, sub, grand_child]
command = ls_command(str(tmp_path), notebooks_folder, testees)
output = assert_exec_run(container, command)
output = assert_exec_run(container, command, user=JUPYTER_USER)
for line in output.splitlines():
assert "jupyter:jupyter" == user_and_group(line)
Loading