Closed i-chvets closed 1 year ago
Details in https://github.com/canonical/seldonio-rocks/issues/38 mlserver initial ROCK using 20.04.
mlserver
Summary of changes:
Related issue that can affect the way Python based ROCKs are built: https://github.com/canonical/seldonio-rocks/issues/39
This ROCK has unit tests that can be used to verify integrity of the ROCK. tox -e unit
tox -e unit
unit: commands[0]> rockcraft pack Retrieved base ubuntu:20.04 for amd64 Extracted ubuntu:20.04 Executed: skip pull mlserver (already ran) Executed: skip pull pebble (already ran) Executed: skip pull security-team-requirement (already ran) Executed: skip overlay mlserver (already ran) Executed: skip overlay pebble (already ran) Executed: skip overlay security-team-requirement (already ran) Executed: skip build mlserver (already ran) Executed: skip build pebble (already ran) Executed: skip build security-team-requirement (already ran) Executed: skip stage mlserver (already ran) Executed: skip stage pebble (already ran) Executed: skip stage security-team-requirement (already ran) Executed: skip prime mlserver (already ran) Executed: skip prime pebble (already ran) Executed: skip prime security-team-requirement (already ran) Executed parts lifecycle Exported to OCI archive 'mlserver_1.3.5_20.04_1_amd64.rock' unit: commands[1]> bash -c 'NAME=$(yq eval .name rockcraft.yaml) && VERSION=$(yq eval .version rockcraft.yaml) && ARCH=$(yq eval ".platforms | keys" rockcraft.yaml | awk -F " " '"'"'{ print $2 }'"'"') && ROCK="${NAME}_${VERSION}_${ARCH}" && sudo skopeo --insecure-policy copy oci-archive:$ROCK.rock docker-daemon:$ROCK:$VERSION' Getting image source signatures Copying blob edaedc954fb5 done Copying blob ed0a55874fbb done Copying blob ff45f44d1837 done Copying blob e8c5d6525dae done Copying blob 001a40768bde done Copying config 6d8554aca9 done Writing manifest to image destination Storing signatures unit: commands[2]> pytest -vvv --tb native --show-capture=all --log-cli-level=INFO /home/ubuntu/rocks/seldonio-rocks/mlserver/tests ================================================== test session starts =================================================== platform linux -- Python 3.8.10, pytest-7.4.1, pluggy-1.3.0 -- /home/ubuntu/rocks/seldonio-rocks/mlserver/.tox/unit/bin/python cachedir: .tox/unit/.pytest_cache rootdir: /home/ubuntu/rocks/seldonio-rocks/mlserver plugins: anyio-4.0.0, asyncio-0.21.1, operator-0.29.0 asyncio: mode=strict collected 1 item tests/test_rock.py::test_rock ----------------------------------------------------- live log setup ----------------------------------------------------- INFO pytest_operator.plugin:plugin.py:647 Adding model microk8s-localhost:test-rock-93f8 on cloud microk8s PASSED [100%] --------------------------------------------------- live log teardown ---------------------------------------------------- INFO pytest_operator.plugin:plugin.py:783 Model status: Model Controller Cloud/Region Version SLA Timestamp test-rock-93f8 microk8s-localhost microk8s/localhost 2.9.44 unsupported 15:07:24-04:00 INFO pytest_operator.plugin:plugin.py:789 Juju error logs: INFO pytest_operator.plugin:plugin.py:877 Resetting model test-rock-93f8... INFO pytest_operator.plugin:plugin.py:882 Not waiting on reset to complete. INFO pytest_operator.plugin:plugin.py:855 Forgetting main... ==================================================== warnings summary ==================================================== tests/test_rock.py::test_rock tests/test_rock.py::test_rock /home/ubuntu/rocks/seldonio-rocks/mlserver/.tox/unit/lib/python3.8/site-packages/websockets/protocol.py:218: DeprecationWarning: The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10. self._drain_lock = asyncio.Lock(loop=loop) tests/test_rock.py::test_rock tests/test_rock.py::test_rock /home/ubuntu/rocks/seldonio-rocks/mlserver/.tox/unit/lib/python3.8/site-packages/websockets/protocol.py:977: DeprecationWarning: The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10. yield from asyncio.sleep(self.ping_interval, loop=self.loop) tests/test_rock.py: 20 warnings /home/ubuntu/rocks/seldonio-rocks/mlserver/.tox/unit/lib/python3.8/site-packages/websockets/protocol.py:911: DeprecationWarning: 'with (yield from lock)' is deprecated use 'async with lock' instead with (yield from self._drain_lock): tests/test_rock.py: 18 warnings /home/ubuntu/rocks/seldonio-rocks/mlserver/.tox/unit/lib/python3.8/site-packages/websockets/protocol.py:416: DeprecationWarning: The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10. yield from asyncio.wait( tests/test_rock.py::test_rock tests/test_rock.py::test_rock /home/ubuntu/rocks/seldonio-rocks/mlserver/.tox/unit/lib/python3.8/site-packages/websockets/protocol.py:532: DeprecationWarning: The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10. yield from asyncio.wait_for( tests/test_rock.py::test_rock tests/test_rock.py::test_rock /home/ubuntu/rocks/seldonio-rocks/mlserver/.tox/unit/lib/python3.8/site-packages/websockets/protocol.py:554: DeprecationWarning: The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10. yield from asyncio.wait_for( tests/test_rock.py::test_rock tests/test_rock.py::test_rock /home/ubuntu/rocks/seldonio-rocks/mlserver/.tox/unit/lib/python3.8/site-packages/websockets/protocol.py:1077: DeprecationWarning: The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10. yield from asyncio.wait_for( -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ============================================= 1 passed, 48 warnings in 9.82s ============================================= unit: OK (200.65=setup[0.12]+cmd[157.67,31.30,11.56] seconds) congratulations :) (200.76 seconds)
https://github.com/canonical/seldonio-rocks/issues/39
@sabaini Please review this ROCK. I had to revert it to 20.04 @orfeas-k This one can be used as an example for other mlserver-* ROCK updates.
mlserver-*
@SamirPS Updates were made. Ready for your review.
Description
Details in https://github.com/canonical/seldonio-rocks/issues/38
mlserver
initial ROCK using 20.04.Summary of changes:
Related issue that can affect the way Python based ROCKs are built: https://github.com/canonical/seldonio-rocks/issues/39
Testing
This ROCK has unit tests that can be used to verify integrity of the ROCK.
tox -e unit
Related issues
https://github.com/canonical/seldonio-rocks/issues/39