Database Error during make demo
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 60
- Forks
- 50
- PR merge metrics
- No merged PRs in 30d
Description
I followed the installation instructions and everything worked well until the the creation of the demo projects. I'm getting this when running the make demo command:
sudo make demo
docker compose exec -T server python -m demogen < demo/feature.json; docker compose exec -T server python -m demogen < demo/commercial.json; docker compose exec -T server python -m demogen < demo/episodic.json;
2023-09-26 11:16:43 INFO Log collector initialized
2023-09-26 11:16:44 INFO Connecting to database
2023-09-26 11:16:44 INFO Deleting old project if exists
2023-09-26 11:16:45 INFO Creating folders for project demo_Big_Feature
Traceback (most recent call last):
File "/backend/ayon_server/entities/core/projectlevel.py", line 247, in save
await transaction.execute(
File "/usr/local/lib/python3.11/site-packages/asyncpg/connection.py", line 319, in execute
_, status, _ = await self._execute(
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/asyncpg/connection.py", line 1658, in _execute
result, _ = await self.__execute(
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/asyncpg/connection.py", line 1683, in __execute
return await self._do_execute(
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/asyncpg/connection.py", line 1730, in _do_execute
result = await executor(stmt, None)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "asyncpg/protocol/protocol.pyx", line 201, in bind_execute
asyncpg.exceptions.ForeignKeyViolationError: insert or update on table "workfiles" violates foreign key constraint "workfiles_created_by_fkey"
DETAIL: Key (created_by)=(admin) is not present in table "users".
There are several more errors but always with the same ConstraintViolationException.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure with make demo, then inspect ayon_server/entities/core/projectlevel.py around the reported save operation and the demo/feature.json, demo/commercial.json, and demo/episodic.json inputs. Done means demo project creation completes without the workfiles_created_by_fkey or related constraint violations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, docker-compose, python
- Domain
- databases, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100