canonical / notebook-operators

Charmed Jupyter Notebooks
Apache License 2.0
5 stars 9 forks source link

chore: use the latest JWA image (#346) #354

Closed DnPlas closed 5 months ago

DnPlas commented 5 months ago

canonical/kubeflow-rocks#81 introduced changes in the rockcraft project that improved readability and set a standard. This commit uses the version of the container image that corresponds to that PR.

DnPlas commented 5 months ago

Re-running the CI as the Integration tests step ran for more than 2h. If this happens again, let's check the CI.

DnPlas commented 5 months ago

The CI is failing with the following msg:

websockets.exceptions.ConnectionClosedError: code = 1006 (connection closed abnormally [internal]), no reason

tests/integration/test_charm.py::test_remove_with_resources_present ERROR

This suggests the test_remove_with_resources_present ends in error with no reason. This is a weird error because this PR should not affect that test case. I see the test case passing in the branch CI, so I need to investigate a bit more.

kimwnasptd commented 5 months ago

I tried to use this image and run it with upstream KF 1.8. The pod becomes ready (because pebble doesn't crash) but I see the following logs:

2024-04-18T12:26:13.881Z [pebble] Started daemon.
2024-04-18T12:26:13.894Z [pebble] POST /v1/services 6.295847ms 202
2024-04-18T12:26:13.898Z [pebble] Service "jupyter-ui" starting: /bin/bash -c gunicorn -w 3 --bind 0.0.0.0:5000 --access-logfile - entrypoint:app
2024-04-18T12:26:13.985Z [jupyter-ui]
2024-04-18T12:26:13.985Z [jupyter-ui] Error: No application module specified.
2024-04-18T12:26:14.001Z [pebble] Change 1 task (Start service "jupyter-ui") failed: cannot start service: exited quickly with code 1
2024-04-18T12:26:14.010Z [pebble] GET /v1/changes/1/wait 116.367625ms 200
2024-04-18T12:26:14.011Z [pebble] Started default services with change 1.

After ssh-ing into the pod and trying to run the command printed above from the /src/ directory I get the same error


Error: No application module specified.

After looking closer at the upstream command I see the following differences:

ROCK https://github.com/canonical/kubeflow-rocks/blob/main/jupyter-web-app/rockcraft.yaml#L19

"/bin/bash -c gunicorn -w 3 --bind 0.0.0.0:5000 --access-logfile - entrypoint:app"

Upstream Image https://github.com/kubeflow/kubeflow/blob/v1.8-branch/components/crud-web-apps/jupyter/Dockerfile#L59

ENTRYPOINT ["/bin/bash","-c","gunicorn -w 3 --bind 0.0.0.0:5000 --access-logfile - entrypoint:app"]

If I instead run /bin/bash -c "gunicorn -w 3 --bind 0.0.0.0:5000 --access-logfile - entrypoint:app" inside the container then the command succeeds.

DnPlas commented 5 months ago

I have fixed the issue here. The reason why the charm is working is because the charm code sets the correct command in the code. I will close this PR as the image that we need to use will be different.