Closed pietos closed 1 week ago
most likely this is related to changing INFRAHUB_ADDRESS
& INFRAHUB_INTERNAL_ADDRESS
to localhost
Similar to #3407, we need to fix the error message to provide something more actionable that helps with the resolution
I could reproduce a similar issue when I followed the backend development guide steps: https://develop.infrahub.pages.dev/development/backend
I started running the e2e tests: INFRAHUB_LOG_LEVEL=CRITICAL pytest -v backend/tests/unit
but abandoned them partway through. This leaves the database in an inconsistent state. The fix in my case was:
infrahub db init
Note this applies to the development workflow only.
I'm removing this from the milestones for now as I've not been able to reproduce it, please add more comments if this shows up again.
Closing this issue since this hasn't come up recently, please reopen it if the issue is still present
Component
No response
Current Behavior
On a fresh installation one of our developers gets the following error:
[2m2024-05-20T20:01:15.962019Z[0m [[31m[1merror [0m][1mTraceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/starlette/routing.py", line 734, in lifespan async with self.lifespan_context(app) as maybe_state: File "/usr/local/lib/python3.12/contextlib.py", line 210, in aenter return await anext(self.gen) ^^^^^^^^^^^^^^^^^^^^^ File "/source/backend/infrahub/server.py", line 78, in lifespan await app_initialization(application) File "/source/backend/infrahub/server.py", line 59, in app_initialization await initialization(db=db) File "/source/backend/infrahub/core/initialization.py", line 77, in initialization hash_in_db = default_branch.active_schema_hash.main ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/source/backend/infrahub/core/branch.py", line 97, in active_schema_hash raise InitializationError("The schema_hash has not been loaded for this branch") infrahub.exceptions.InitializationError: The schema_hash has not been loaded for this branch [0m [[34m[1muvicorn.error[0m] [2m2024-05-20T20:01:15.962292Z[0m [[31m[1merror [0m][1mApplication startup failed. Exiting.[0m [[34m[1muvicorn.error[0m]
Expected Behavior
No response
Steps to Reproduce
Latest code from the Development branch Docker compose pull In the compose file only changed the INFRAHUB_ADDRESS & INFRAHUB_INTERNAL_ADDRESS to localhost docker compose up --build
Additional Information
Tested on: Develop branch Docker 26.1.1 Ubuntu 22.04 LTS 64bit
We tried removing all the volumes and starting from scratch, but he kept having this error.