canonical/notebook-operators

Fix bundle testing

Closed this issue · 2 comments

Fix bundle testing

  • Update bundle definition as required.
  • Update README instruction on bundle testing.
  • Provide bundle testing scenario.

NOTE: This can be addressed during Jupyter Controller sidecar re-write.

Integration tests are passing in the latest code.

$ tox -e integration -- --model kubeflow
integration: recreate env because python changed version_info=[3, 10, 6, 'final', 0]->[3, 8, 16, 'final', 0] | executable='/usr/bin/python3.10'->'/usr/bin/python3.8'
integration: remove tox env folder /home/ichvets/cw/dev/notebook-operators/.tox/integration
integration: install_deps> python -I -m pip install -r requirements-integration.txt
integration: commands[0]> pytest -vvs --tb native --show-capture=no --log-cli-level=INFO --asyncio-mode=auto --model kubeflow /home/ichvets/cw/dev/notebook-operators/tests/
================================================ test session starts =================================================
platform linux -- Python 3.8.16, pytest-7.2.0, pluggy-1.0.0 -- /home/ichvets/cw/dev/notebook-operators/.tox/integration/bin/python
cachedir: .tox/integration/.pytest_cache
rootdir: /home/ichvets/cw/dev/notebook-operators
plugins: operator-0.22.0, anyio-3.6.2, asyncio-0.20.3
asyncio: mode=auto
collecting ... collected 3 items

tests/test_charms.py::test_build_and_deploy 
--------------------------------------------------- live log setup ---------------------------------------------------
INFO     pytest_operator.plugin:plugin.py:653 Connecting to existing model uk8s:kubeflow on unspecified cloud
--------------------------------------------------- live log call ----------------------------------------------------
INFO     pytest_operator.plugin:plugin.py:504 Using tmp_path: /home/ichvets/cw/dev/notebook-operators/.tox/integration/tmp/pytest/kubeflow0
INFO     pytest_operator.plugin:plugin.py:948 Building charm jupyter-controller
INFO     pytest_operator.plugin:plugin.py:953 Built charm jupyter-controller in 20.34s
INFO     pytest_operator.plugin:plugin.py:504 Using tmp_path: /home/ichvets/cw/dev/notebook-operators/.tox/integration/tmp/pytest/kubeflow0
INFO     pytest_operator.plugin:plugin.py:948 Building charm jupyter-ui
INFO     pytest_operator.plugin:plugin.py:953 Built charm jupyter-ui in 19.93s
INFO     juju.model:model.py:2088 Deploying ch:amd64/focal/istio-pilot-270
INFO     juju.model:model.py:2088 Deploying ch:amd64/focal/istio-gateway-253
INFO     juju.model:model.py:2715 Waiting for model:
  istio-pilot/0 [allocating] waiting: installing agent
  istio-ingressgateway/0 [allocating] waiting: installing agent
INFO     juju.model:model.py:2715 Waiting for model:
  istio-pilot/0 [allocating] waiting: agent initializing
  istio-ingressgateway/0 [allocating] waiting: agent initializing
INFO     juju.model:model.py:2715 Waiting for model:
  istio-pilot/0 [idle] active: 
  istio-ingressgateway/0 [executing] active: 
INFO     juju.model:model.py:2088 Deploying local:focal/jupyter-ui-0
INFO     juju.model:model.py:2715 Waiting for model:
  jupyter-ui/0 [allocating] waiting: installing agent
INFO     juju.model:model.py:2715 Waiting for model:
  jupyter-ui/0 [executing] active: 
INFO     juju.model:model.py:2088 Deploying local:kubernetes/jupyter-controller-0
INFO     juju.model:model.py:2088 Deploying ch:amd64/focal/admission-webhook-85
INFO     juju.model:model.py:2088 Deploying ch:amd64/focal/kubeflow-profiles-94
INFO     juju.model:model.py:2088 Deploying ch:amd64/focal/kubeflow-dashboard-205
INFO     juju.model:model.py:2715 Waiting for model:
  istio-pilot/0 [idle] active: 
  istio-ingressgateway/0 [idle] active: 
  jupyter-ui/0 [idle] active: 
  jupyter-controller/0 [allocating] waiting: installing agent
  admission-webhook/0 [allocating] waiting: installing agent
  kubeflow-profiles/0 [allocating] waiting: installing agent
  kubeflow-dashboard/0 [allocating] waiting: installing agent
INFO     juju.model:model.py:2715 Waiting for model:
  jupyter-controller/0 [executing] active: 
  admission-webhook/0 [allocating] waiting: agent initializing
  kubeflow-profiles/0 [allocating] waiting: agent initializing
  kubeflow-dashboard/0 [allocating] waiting: agent initializing
INFO     juju.model:model.py:2715 Waiting for model:
  kubeflow-profiles/0 [executing] active: 
  kubeflow-dashboard/0 [idle] active: 
PASSED
tests/test_charms.py::test_create_notebook SKIPPED (Skipping due to this test being inconsistent, and it will be changed soon)
tests/test_charms.py::test_prometheus_grafana_integration 
--------------------------------------------------- live log call ----------------------------------------------------
INFO     juju.model:model.py:2088 Deploying ch:amd64/focal/prometheus-k8s-107
INFO     juju.model:model.py:2088 Deploying ch:amd64/focal/grafana-k8s-67
INFO     juju.model:model.py:2088 Deploying ch:amd64/focal/prometheus-scrape-config-k8s-39
INFO     juju.model:model.py:2715 Waiting for model:
  istio-pilot/0 [idle] active: 
  istio-ingressgateway/0 [idle] active: 
  jupyter-ui/0 [idle] active: 
  jupyter-controller/0 [executing] active: 
  admission-webhook/0 [idle] active: 
  kubeflow-profiles/0 [idle] active: 
  kubeflow-dashboard/0 [idle] active: 
  prometheus-k8s/0 [allocating] waiting: agent initializing
  grafana-k8s/0 [allocating] waiting: installing agent
  prometheus-scrape-config-k8s/0 [allocating] waiting: installing agent
INFO     juju.model:model.py:2715 Waiting for model:
  jupyter-controller/0 [idle] active: 
  prometheus-k8s/0 [idle] waiting: Waiting for resource limit patch to apply
  grafana-k8s/0 [allocating] waiting: agent initializing
  prometheus-scrape-config-k8s/0 [executing] active: 
INFO     juju.model:model.py:2715 Waiting for model:
  jupyter-controller/0 [idle] active: 
  prometheus-k8s/0 [idle] waiting: Waiting for resource limit patch to apply
  grafana-k8s/0 [executing] unknown: 
INFO     juju.model:model.py:2715 Waiting for model:
  jupyter-ui/0 [idle] active: 
  prometheus-k8s/0 [idle] waiting: Waiting for resource limit patch to apply
  grafana-k8s/0 [idle] unknown: 
INFO     juju.model:model.py:2715 Waiting for model:
  prometheus-k8s/0 [idle] active: 
  grafana-k8s/0 [idle] unknown: 
INFO     juju.model:model.py:2715 Waiting for model:
  grafana-k8s/0 [idle] unknown: 
INFO     juju.model:model.py:2715 Waiting for model:
  grafana-k8s/0 [idle] maintenance: Waiting for resource limit patch to apply
INFO     juju.model:model.py:2715 Waiting for model:
  grafana-k8s/0 [executing] maintenance: 
INFO     test_charms:test_charms.py:303 Prometheus available at http://10.1.59.93:9090
INFO     test_charms:test_charms.py:306 Testing prometheus deployment (attempt 1)
INFO     test_charms:test_charms.py:316 Response status is success
PASSED
------------------------------------------------- live log teardown --------------------------------------------------
INFO     pytest_operator.plugin:plugin.py:768 Model status:

Model     Controller  Cloud/Region        Version  SLA          Timestamp
kubeflow  uk8s        microk8s/localhost  2.9.34   unsupported  21:15:57-05:00

App                           Version                         Status  Scale  Charm                         Channel   Rev  Address         Exposed  Message
admission-webhook             res:oci-image@129fe92           active      1  admission-webhook             edge       85  10.152.183.206  no       
grafana-k8s                   9.2.1                           active      1  grafana-k8s                   edge       67  10.152.183.51   no       
istio-ingressgateway                                          active      1  istio-gateway                 edge      253  10.152.183.111  no       
istio-pilot                                                   active      1  istio-pilot                   edge      270  10.152.183.160  no       
jupyter-controller            .../notebook-controller:v1.6.1  active      1  jupyter-controller                        0                  no       
jupyter-ui                                                    active      1  jupyter-ui                                0  10.152.183.23   no       
kubeflow-dashboard                                            active      1  kubeflow-dashboard            edge      205  10.152.183.64   no       
kubeflow-profiles             res:profile-image@cfd6935       active      1  kubeflow-profiles             1.6/edge   94  10.152.183.227  no       
prometheus-k8s                2.42.0                          active      1  prometheus-k8s                edge      107  10.152.183.120  no       
prometheus-scrape-config-k8s  n/a                             active      1  prometheus-scrape-config-k8s  beta       39  10.152.183.161  no       

Unit                             Workload  Agent  Address     Ports              Message
admission-webhook/0*             active    idle   10.1.59.88  4443/TCP           
grafana-k8s/0*                   active    idle   10.1.59.94                     
istio-ingressgateway/0*          active    idle   10.1.59.79                     
istio-pilot/0*                   active    idle   10.1.59.78                     
jupyter-controller/0*            active    idle   10.1.59.87                     
jupyter-ui/0*                    active    idle   10.1.59.82                     
kubeflow-dashboard/0*            active    idle   10.1.59.86                     
kubeflow-profiles/0*             active    idle   10.1.59.89  8080/TCP,8081/TCP  
prometheus-k8s/0*                active    idle   10.1.59.93                     
prometheus-scrape-config-k8s/0*  active    idle   10.1.59.91                     

INFO     pytest_operator.plugin:plugin.py:774 Juju error logs:
INFO     pytest_operator.plugin:plugin.py:839 Forgetting main...
====================================== 2 passed, 1 skipped in 557.53s (0:09:17) ======================================

Tests are passing closing.