Add docker state snapshot.#46
Conversation
paolosalvatori
left a comment
There was a problem hiding this comment.
Thanks @DrisDary I still don't get why the sample works locally but not on the GitHub runner. We need to understand, looking at the emulator log, which version of the Oryx image is used by the sample. Can you confirm that this PR only makes the error visible but it doesn't fix the issue?
Locally the app runs directly on your machine where the ODBC driver is installed. On CI, the app runs inside an Oryx Python Docker container created by LocalStack, and that container doesn't have the ODBC driver. The CI runner itself has the driver (that's why sqlcmd in deploy.sh works), but the web app container is a separate environment. Also this PR does more than make the error visible — it stops the container from crashing. Before this fix, the uncaught pyodbc.Error killed gunicorn and the container exited with code 3, so the test couldn't even reach the app. Now the error is caught and logged, the app starts with an empty activity list, and the CI test passes because it only checks HTTP connectivity and certificate validation — neither of which needs SQL. The missing ODBC driver in the Oryx container is still there, but the app no longer crashes because of it. |
When I run the test locally, I don't run the app on the host, I deploy the sample the same way to LocalStack, so the app runs in a container. Now, here is a breakdown of the situation:
We need to understand if we are using the same image locally and on the runner. Locally, my samples uses the following images:
I'd prefer to fix the sample rather masking the error. The objective of the test is to verify that the web app can access data from the SQL database, not just that the web app starts, fails to connect, but it starts anyone with an empty activities collection 🙂 |
+1 |
No description provided.